fix: Fix modifier types - #3896
Conversation
Workday/canvas-kit
|
||||||||||||||||||||||||||||||||||||||||
| Project |
Workday/canvas-kit
|
| Branch Review |
ISSUE-3895
|
| Run status |
|
| Run duration | 02m 36s |
| Commit |
|
| Committer | Alan B Smith |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
17
|
|
|
0
|
|
|
824
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
19.41%
|
|
|---|---|
|
|
1563
|
|
|
374
|
Accessibility
99.44%
|
|
|---|---|
|
|
5 critical
5 serious
0 moderate
2 minor
|
|
|
68
|
There was a problem hiding this comment.
Pull request overview
This PR updates the TypeScript typing for createStencil so modifier types merge correctly when a stencil extends another stencil, addressing the modifier inference issue reported in #3895.
Changes:
- Introduce
RemoveIndexSignature/MergeModifiersto prevent index-signature-driven inference issues when combining modifier configs. - Apply
MergeModifiersin the relevantStencil*conditional types so extended + local modifiers compose cleanly. - Update unit tests to no longer require
modifiers: {}on a base stencil for boolean modifier scenarios.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| modules/styling/lib/cs.ts | Fixes extended-stencil modifier type composition by merging modifier types while stripping index signatures that break inference. |
| modules/styling/spec/cs.spec.tsx | Removes now-unnecessary modifiers: {} setup in tests, validating improved type inference/usage ergonomics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3ee85ad to
35462e4
Compare
|
Warning Review limit reachedNext included review available in 24 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
Summary
Fixes: #3895
Update type of
createStencilto allow modifier merging when extending stencils.Release Category
Components
Checklist
ready for reviewhas been added to PRFor the Reviewer
Where Should the Reviewer Start?
Areas for Feedback? (optional)
Testing Manually
Screenshots or GIFs (if applicable)
Thank You Gif (optional)