Repository navigation
Automated Testing: Refine design system review routing rules #86609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| team: WordPress/gutenberg-components | ||
| --- | ||
|
|
||
| Does this change how a component, a design token or a Sass mixin of the design system packages `@wordpress/components`, `@wordpress/ui`, `@wordpress/theme`, `@wordpress/base-styles` or `@wordpress/icons` looks or behaves for the people who use it, for example its styles, its interactions or its accessibility? Only changes to these packages count, not changes to application code that uses them. Answer no when what people see and do stays the same, such as for a refactor, or for a change to dependencies, tooling, tests, types or build configuration that keeps the same runtime behavior. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| team: WordPress/gutenberg-components | ||
| --- | ||
|
|
||
| Does this change add or change tooling that helps people use the design system correctly? This includes tools that check or support how code uses design system components and design tokens, such as lint rules and Stylelint plugins, build plugins for design tokens, tools that support the move from `@wordpress/components` to `@wordpress/ui`, and tools that give design system guidance to developers or agents, such as the design system MCP server. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider a DS migration also migrating CSS from / to WPDS tokens, or using ThemeProvider from the theme package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a separate routing configuration specifically for tokens
design-system-tokens.md, which should cover how new code uses design tokens.That being said, there are some opportunities:
I pushed a couple small improvements to address some of this:
@wordpress/uiand@wordpress/componentsas the only packages. It intentionally excludes DataViews for now; I don't know that the components team is prepared to be looped into all of these right now, and may deserve its own configuration similar to how it's set up in CODEOWNERS today.† Refined wording in
migration:More detailed analysis on theme tokens usage findings against real PRs (AI-generated)
migration:The three known positives still pass: 80500 0.89, #86501 0.95 and #85799 0.92.
tokens:The "Answer no" sentence is the same as before. I tested three wordings on the same 19 PRs (threshold 0.8):
--wpds-*(chosen)Why I chose the
--wpds-*wording:--wpds-*name matches text that the model can see in the diff. This is the same lesson as the@wordpress/componentsto file path question.Costs to know about:
cursor: pointerto the token) and 81653 (a change to an existing ThemeProvider) are below it. These are small mechanical adoptions, so I think losing them is acceptable. If you disagree, a 0.75 threshold would catch three of them and still exclude the no-token PRs. But that would put the threshold just above the scores we observed, and I advised against that before.tokensfell on 80500 and UI: Use LoadingIndicator in remaining popup consumers #86501 (0.24–0.27). That is correct: they are component migrations, andmigrationcatches them.Other notes:
migration(before: about 0.05). "A component of the design system" picks up a little of the token meaning. All are below the threshold, andtokenscatches them anyway.bespoke-uistill has the closed pair "@wordpress/componentsand@wordpress/ui". I did not change it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That, or even cross-referencing across documents for easier discovery?
Yeah, I guess consuming ThemeProvider is a different task type than consuming WPDS tokens
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might not be exactly what you had in mind, but one of the improvements I was thinking about in #86325 was "generated context for rules like component or tokens lists", which in my mind would be related external resources that could be attached to the request context, like a full list of tokens or components, so that the decision model can know if e.g. a pull request could leverage an existing token or component.