Hand the format ring down to the badge that draws it - #208
Merged
Merged
Conversation
A rule written in the rail's stylesheet cannot reach '.lang-tag': that element belongs to 'app-language-badge', and emulated encapsulation rewrites the selector with the rail's own '_ngcontent' attribute, so it matches nothing. The selected format lost its mark entirely. 'hue-badge' now reads '--badge-ring' and '--badge-surface' with its hue as the fallback, and the rail sets them on the chip: a custom property inherits across the boundary a rule cannot cross. The assertion that missed this counted how many boxes were drawn around the badge, and the badge's own hairline kept that count right. It now compares the same badge's border colour selected against at rest. Closes #207
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.
Closes #207. Regression from #205, reported from the running app: selecting a format
in the rail left no visible mark.
Cause
#205 moved the ring off the chip and onto the badge, with a rule in the rail's
stylesheet:
.lang-tagbelongs toapp-language-badge. Emulated encapsulation rewrites thatselector with the rail's
_ngcontentattribute, so it can never match an element thebadge rendered. Dead rule, no error, no mark.
Fix
hue-badgereads--badge-ring/--badge-surface, each falling back to what it drewbefore; the rail sets them on
.language-chip. A custom property inherits across theboundary a rule cannot cross. No visual change beyond restoring the mark — the ring
is still one ring, on the badge, as #201 asked.
Why the test let it through
badgeBoxesassertedoutlines === 1— it counted how many boxes were drawn, and thebadge's own hue hairline from #196 kept that count at 1 while the selection lost its
mark. The new assertion compares the same badge's border colour selected against at
rest, which is language-independent and cannot be satisfied by an unrelated border.
Confirmed to fail on the shipped code before the fix, with the other 21 scenarios of
06-search-and-filtersgreen.Verified
E2E 21/21 (the mixin is shared with the cards, so the whole suite ran, not just 06),
unit 1354/1354,
test:scripts32/32, lint clean. Visual result checked in the runningapp by @vmillet-dev.