Skip to content

fix: Fix modifier types#3896

Draft
alanbsmith wants to merge 1 commit into
Workday:masterfrom
alanbsmith:ISSUE-3895
Draft

fix: Fix modifier types#3896
alanbsmith wants to merge 1 commit into
Workday:masterfrom
alanbsmith:ISSUE-3895

Conversation

@alanbsmith

@alanbsmith alanbsmith commented Apr 22, 2026

Copy link
Copy Markdown
Member

Summary

Fixes: #3895
Update type of createStencil to allow modifier merging when extending stencils.

Release Category

Components


Checklist

For the Reviewer

  • PR title is short and descriptive
  • PR summary describes the change (Fixes/Resolves linked correctly)
  • PR Release Notes describes additional information useful to call out in a release message or removed if not applicable
  • Breaking Changes provides useful information to upgrade to this code or removed if not applicable

Where Should the Reviewer Start?

Areas for Feedback? (optional)

  • Code
  • Documentation
  • Testing
  • Codemods

Testing Manually

Screenshots or GIFs (if applicable)

Thank You Gif (optional)

@alanbsmith alanbsmith added 14.x ai author This pull request is primarily or entirely written by an agent, not a human. Review carefully. labels Apr 22, 2026
@cypress

cypress Bot commented Apr 22, 2026

Copy link
Copy Markdown

Workday/canvas-kit    Run #10734

Run Properties:  status check passed Passed #10734  •  git commit b64442dc02 ℹ️: Merge 3ee85ad1ddb3bda4f4aace1f0f3350d4f48832dc into 0a0ab9c73205f581f7a50d7a2e7b...
Project Workday/canvas-kit
Branch Review ISSUE-3895
Run status status check passed Passed #10734
Run duration 02m 36s
Commit git commit b64442dc02 ℹ️: Merge 3ee85ad1ddb3bda4f4aace1f0f3350d4f48832dc into 0a0ab9c73205f581f7a50d7a2e7b...
Committer Alan B Smith
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 86
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 863
View all changes introduced in this branch ↗︎
UI Coverage  19.46%
  Untested elements 1550  
  Tested elements 372  
Accessibility  99.33%
  Failed rules  6 critical   5 serious   0 moderate   2 minor
  Failed elements 78  

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/MergeModifiers to prevent index-signature-driven inference issues when combining modifier configs.
  • Apply MergeModifiers in the relevant Stencil* 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

14.x ai author This pull request is primarily or entirely written by an agent, not a human. Review carefully.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Modifier type issue

2 participants