fix: emit CSS for enum-valued state variants without explicit value (#157)#161
Closed
nathanacurtis wants to merge 2 commits into
Closed
fix: emit CSS for enum-valued state variants without explicit value (#157)#161nathanacurtis wants to merge 2 commits into
nathanacurtis wants to merge 2 commits into
Conversation
…ldren (ADR-056) (#158) * chore(release): improve changelog quality guidance in release agents Require human-friendly prose in release summaries and individual bullets ("So what?" framing, not API descriptions). Add empty-section pruning. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(schema): rename SlotProp.minItems/maxItems to minChildren/maxChildren (ADR-056) Aligns slot constraint field names with Figma native slotSettings API. Adds anyOf to SlotProp, populated from preferredValues when allowPreferredValuesOnly is true. Bumps schema to 0.25.0 (breaking change). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * adr(056): mark ADR-056 as accepted Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: update slot constraints docs for minChildren/maxChildren rename (ADR-056) Updates schema/props, config/slot-constraints, guides/slot-constraints, and analyze/props to reflect the minItems/maxItems → minChildren/maxChildren rename and the new native slotSettings source alongside code-only props. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
Author
|
Closing — recreating with correct head branch (fix/css-enum-state-variants-157). |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
When
config.processing.statesmaps a prop to a concept without specifying avalue(e.g.selected: { prop: selected }), enum-valued variants likeSelected=Selectedwere silently skipped — onlyselected::truewas registered in the lookup, so the enum value never matched and its styling never reachedstyles.css.The fix registers the concept name itself as a secondary lookup key when no
valueis specified, and uses a case-insensitive fallback in the CSS transformer soSelected=Selectedresolves to theselectedconcept and emits[aria-selected="true"].Test coverage
buildStateLookupnow registersprop::conceptNamein addition toprop::truewhen novalueis configured; confirmed it does NOT add the extra key for explicit-value entries.selected: { prop: 'selected' }emits[aria-selected="true"]forSelected=Selected,:indeterminatefor explicitIndeterminatevalue, and skips the rest valueUnselected.disabled::true) continue to work unchanged.Closes #157