Repository navigation
fix(theme): remove bare prop and state classes - #6121
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
af27da0 to
c0ee31a
Compare
c0ee31a to
7a0f66c
Compare
cixzhang
left a comment
There was a problem hiding this comment.
Semantic verdict: request changes
The release currently removes bare .astryx-*.<value> selectors without giving 0.5.4 consumers a working migration. astryx upgrade selects no codemod from 0.5.4, and the older optional transform only recognizes .xds-*, so apps using the documented compatibility classes remain unchanged and silently lose themed styling; prebuilt custom themes also need to be regenerated.
Please add a current-version migration for safely rewritable Astryx selectors, concrete instructions for ambiguous selectors and prebuilt CSS, and name the changed return behavior of the exported themeProps, parseStyleKey, and theme CSS generators.
[Reviewed by Robohands]
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsAspectRatio (@astryxdesign/core) · View in Storybook
AvatarGroup (@astryxdesign/core) · View in Storybook
Badge (@astryxdesign/core) · View in Storybook
Banner (@astryxdesign/core) · View in Storybook
Button (@astryxdesign/core) · View in Storybook
Calendar (@astryxdesign/core) · View in Storybook
Card (@astryxdesign/core) · View in Storybook
Chat (@astryxdesign/core) · View in Storybook
CheckboxList (@astryxdesign/core) · View in Storybook
Code (@astryxdesign/core) · View in Storybook
DateInput (@astryxdesign/core) · View in Storybook
DateRangeInput (@astryxdesign/core) · View in Storybook
DateTimeInput (@astryxdesign/core) · View in Storybook
Divider (@astryxdesign/core) · View in Storybook
FieldStatus (@astryxdesign/core) · View in Storybook
FormLayout (@astryxdesign/core) · View in Storybook
Heading (@astryxdesign/core) · View in Storybook
Item (@astryxdesign/core) · View in Storybook
Link (@astryxdesign/core) · View in Storybook
List (@astryxdesign/core) · View in Storybook
Markdown (@astryxdesign/core) · View in Storybook
MultiSelector (@astryxdesign/core) · View in Storybook
NumberInput (@astryxdesign/core) · View in Storybook
Outline (@astryxdesign/core) · View in Storybook
RadioList (@astryxdesign/core) · View in Storybook
Section (@astryxdesign/core) · View in Storybook
Selector (@astryxdesign/core) · View in Storybook
Spinner (@astryxdesign/core) · View in Storybook
Stepper (@astryxdesign/core) · View in Storybook
Switch (@astryxdesign/core) · View in Storybook
Text (@astryxdesign/core) · View in Storybook
TextArea (@astryxdesign/core) · View in Storybook
TextInput (@astryxdesign/core) · View in Storybook
TimeInput (@astryxdesign/core) · View in Storybook
Token (@astryxdesign/core) · View in Storybook
Tokenizer (@astryxdesign/core) · View in Storybook
Toolbar (@astryxdesign/core) · View in Storybook
TreeList (@astryxdesign/core) · View in Storybook
ListInput (@astryxdesign/lab) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 8 accessibility violation(s) found — 1 critical, 7 serious. CheckboxList - 1 issue(s)
DateRangeInput - 1 issue(s)
Heading - 1 issue(s)
RadioList - 1 issue(s)
Stepper - 1 issue(s)
Text - 1 issue(s)
Token - 1 issue(s)
Tokenizer - 1 issue(s)
Visual RegressionStatus: Skipped — Broad stable scope is deferred to the daily release gate. It covers 380 trusted baseline shots instead of recapturing them for this PR. View the report Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
7a0f66c to
0978503
Compare
98a4ed1 to
60dde05
Compare
cixzhang
left a comment
There was a problem hiding this comment.
Semantic verdict: request changes
0.5.4 consumers still do not have a complete path through this break. The new Changeset documents manual selector edits, but astryx upgrade still has no current transform for safely identifiable .astryx-<target>.<value> selectors. It also does not tell custom-theme owners to rebuild precompiled CSS or tell callers that the exported themeProps, parseStyleKey, and theme generators now return different values.
Please add the current-version migration, document regeneration for prebuilt themes, and name those exported behavior changes. Also update the five remaining AvatarGroup assertions; test-ui is red because they still expect the removed size classes.
[Reviewed by Robohands]
60dde05 to
0d8731a
Compare
cixzhang
left a comment
There was a problem hiding this comment.
Semantic verdict: request changes
Builders upgrading from 0.5.4 can still lose custom styling silently because the codemod leaves known released selectors unchanged when the Astryx target is only one branch of a functional selector. :is(.astryx-button, .other).primary returns unchanged with no TODO, so a primary Button stops matching after bare classes disappear; .astryx-button:nth-child(2n of .primary) does too. The current tests accept the first case unchanged.
Please either preserve each known branch’s match without broadening unrelated branches, or leave an actionable TODO for every known selector the transform cannot safely rewrite.
[Reviewed by Robohands]
afdb83c to
f5f38cf
Compare
f5f38cf to
640e9e1
Compare
cixzhang
left a comment
There was a problem hiding this comment.
Semantic verdict: request changes
Builders upgrading from 0.5.4 can still lose or unexpectedly gain custom styling because nested known selectors remain unchanged with no TODO. :is(.astryx-button, .other):not(.primary), :is(...):where(.primary), and .astryx-button:nth-child(2n of :is(.primary)) all diverge in Chromium after bare classes disappear.
Please preserve known target/value matches through these nesting boundaries without broadening unrelated branches, or leave an actionable TODO, and add fixtures for each boundary.
[Reviewed by Robohands]
640e9e1 to
df7ed86
Compare
df7ed86 to
f17204f
Compare
cixzhang
left a comment
There was a problem hiding this comment.
Semantic verdict: request changes
Builders upgrading from 0.5.4 can still lose custom styling silently because the codemod leaves some standard nested selectors unchanged with no TODO. :not(:not(.astryx-button)).primary and :nth-child(2n of .astryx-button).primary both match primary Buttons before the class removal, but the exact-head transform returns them unchanged; Chromium then goes from 2→0 and 1→0 matches after v0.6 data attributes replace .primary.
Please either migrate these known target/value relationships without broadening unrelated elements, or leave an actionable TODO whenever the transform cannot prove a safe rewrite.
[Reviewed by Robohands]
f17204f to
555c5ff
Compare
555c5ff to
fe02233
Compare
cixzhang
left a comment
There was a problem hiding this comment.
Semantic verdict: request changes
Thanks, the two selectors from the last review now preserve their match sets. Native CSS nesting still has the same silent migration hole: .astryx-button { &.primary { … } } is valid CSS, but the exact-head codemod returns it unchanged with no TODO. Chromium matches three primary Buttons before the class removal and zero afterward. The transform walks each rule independently, so &.primary never inherits its parent target.
Please either migrate known target/value relationships expressed through nesting &, or leave an actionable TODO whenever parent selector context is required.
[Reviewed by Robohands]
fe02233 to
451ba29
Compare
451ba29 to
553ae4c
Compare
cixzhang
left a comment
There was a problem hiding this comment.
Semantic verdict: approve
This exact head now gives v0.5.4 users a complete, behavior-preserving migration for the bare selector-class removal.
- The frozen runtime inventory covers 186 targets, 988 finite tokens, same-element primitive composition, legacy aliases, and every unbounded v0.5.4 domain.
- The CSS parser preserves consumer class matches while adding exact data-attribute arms, including nested functional selectors,
offilters,@scope, and native CSS nesting without changing specificity. - Prebuilt-theme regeneration and all six exported helper behavior changes are documented and regression-tested.
Exact-head full CI, accessibility, RTL, stable visual, Vercel, smoke, lint, and codemod gates pass. Broad stable visual scope is deferred under the repository's release policy. No blocking findings remain.
[Reviewed by Robohands]
Summary
data-*attributesastryx upgrade --applymigration frozen to the complete public v0.5.4 runtime contract: 186 targets, 988 finite tokens, four unbounded value domains, legacy aliases, and same-element primitive composition:is(.old-class, [data-*], …)unions while leaving unknown/custom and unqualified classes unchangedTest plan
pnpm buildpnpm check:repopnpm -F @astryxdesign/cli typecheck:strictpnpm install --frozen-lockfile.cssfixtures: 0 failures, 22 attribute arms added, consumer-owned classes/comments preserved, all outputs idempotent@scopeselector preludes covered.astryx-<target>.<value>selectorspr-a11y, andpr-visualRisk / rollback
classNamematches and adds every v0.6 data-attribute arm that could have produced the v0.5.4 class.