chore(table): reflect primitive props on the Host#3993
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 57 minutes and 41 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-3993/ |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/table/table.tsx`:
- Around line 115-116: The `@Prop` on the sorting property is using reflect: true
but sorting is a complex type (ColumnSorter[]), which cannot be safely reflected
to HTML; remove reflect: true from the sorting prop declaration (the `@Prop`({
reflect: true }) on sorting) so the property becomes a normal non-reflected Prop
and avoid serializing the complex ColumnSorter[] to attributes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 10888605-dbc7-4412-9a6f-e73236f3fd70
📒 Files selected for processing (1)
src/components/table/table.tsx
fbd1055 to
2ebedf4
Compare
2ebedf4 to
a0c40f0
Compare
In the CRM web client. consumer components need more information about tables, mostly for styling purposes.
But this is also a convention we use in this library
background info
In Stencil, reflecting a primitive prop can be a good practice when that prop represents public element state that should be visible in the DOM — but it is not automatically the right choice for every prop. Stencil itself frames reflect as useful “in some cases,” not as a blanket default.
A primitive prop like string, number, or boolean maps cleanly to HTML attributes, and Stencil already handles serialization/deserialization for these types well.
A good mental model is: reflect props that behave like real HTML attributes. Examples are things like disabled, open, required, name, value, variant, or size when you want those states to be inspectable and styleable from the outside. For booleans especially, this aligns with normal HTML behavior, where presence/absence of the attribute represents the state.
A few concrete benefits:
Summary by CodeRabbit
Review:
Browsers tested:
(Check any that applies, it's ok to leave boxes unchecked if testing something didn't seem relevant.)
Windows:
Linux:
macOS:
Mobile: