You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: reduce test case duplication by merging 12 near-duplicate tests (#347)
* refactor: reduce test case duplication by merging 12 near-duplicate tests
Consolidate test cases that test the same patterns into existing cases,
preserving all unique patterns as additional components/variations:
- conditional-basic ← conditional-ternaryCssBlock (empty string ternary)
- conditional-nullishCoalescing ← conditional-nullishCoalescingWithUnit (numeric+unit)
- conditional-logicalAnd ← conditional-logicalAndTemplateLiteral (theme templates)
- conditional-runtimeCallBranch ← conditional-runtimeCallThemeBool (plain fn call)
- interpolation-arrowFunction ← interpolation-arrowBlockBody (block body syntax)
- attrs-labelAs ← attrs-asRefType (variant prop + ref typing)
- attrs-tabIndex ← attrs-tabIndexInStyle (tabIndex used in CSS)
- selector-pseudoExpand ← selector-pseudoExpandInline (single-use inlining)
- selector-sibling ← selector-adjacentSiblingDestructure + selector-siblingInterpolated
- selector-dynamicPseudoElement ← selector-dynamicPlaceholder (::placeholder)
- transientProp-notForwarded ← transientProp-toDom (DOM element filtering)
https://claude.ai/code/session_014eC8v66Xj9xpyaZbYpFT7G
* fix: use per-component defineMarker() for scoped sibling selectors
siblingBefore(":is(*)") with file-global defaultMarker() caused sibling
styles to leak across component boundaries when multiple sibling-using
components appeared as siblings in the same render tree. The first Row
was incorrectly getting margin-top:16px because ThingThemed (a different
component) preceded it and shared the same default marker.
Fix: generate a defineMarker() per component in a .stylex sidecar file
and pass it as the second argument to siblingBefore(":is(*)", Marker).
This scopes sibling matching to only same-component siblings.
https://claude.ai/code/session_014eC8v66Xj9xpyaZbYpFT7G
* refactor: collect markers before pushing to avoid mutation during iteration
https://claude.ai/code/session_014eC8v66Xj9xpyaZbYpFT7G
* chore: regenerate all test case outputs after rebase with main
https://claude.ai/code/session_014eC8v66Xj9xpyaZbYpFT7G
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments