chore: Migrate PropertyFilter tokens to internal Token#4754
Draft
ernst-dev wants to merge 1 commit into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4754 +/- ##
==========================================
- Coverage 97.60% 97.60% -0.01%
==========================================
Files 951 951
Lines 30744 30739 -5
Branches 11281 11276 -5
==========================================
- Hits 30007 30002 -5
Misses 690 690
Partials 47 47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Description
Replace PropertyFilter's inline token implementation with the shared internal
Tokencomponent (src/token/internal.tsx), following the same pattern established in b24a0ee (file-token migration).What changed:
src/property-filter/filtering-token/index.tsx: The localTokenGroupcomponent's token-box rendering (the inner<div class="token">+ content div + action button) is now delegated toInternalTokenwithrole="presentation"(the outerdiv[role="group"]still provides the accessibility grouping).__customContentcarries the popover-trigger content and the dismiss/edit button;__tokenBoxClassNameapplies the filtering-token's own border/background/radius classes on top of thetoken-boxmixin;disableInnerPaddingremoves the token-box default padding so the content div's own padding takes effect.src/property-filter/filtering-token/styles.scss: Removed theborder-inline-startdivider from.dismiss-button,.inner-dismiss-button, and.edit-button. This is the one intentional visual change: the divider between the token label and the dismiss/edit button is gone.What is NOT changed:
role="group",aria-label,aria-disabledon the outer group wrapper are all preserved exactlyTokencomponent (src/token/internal.tsx) — not touchedfiltering-token-dismiss-button,filtering-token-inner-dismiss-button, etc.) — preserved by keepingTokenDismissButtonwith its original class namesRelated links, issue #, if available: n/a
How has this been tested?
Unit tests: All 345 existing PropertyFilter tests pass (17 test suites including
filtering-token.test.tsxwith 14 tests). No tests weakened. No snapshot tests affected (no snapshot tests in this suite).Visual parity: Captured before/after screenshots of
property-filter/property-filter-tokens-permutationsdev page (single token, token with operation, grouped tokens, long labels, disabled states). Pixel-by-pixel diff: zero differences (PILImageChops.differencebounding box = None). The only intentional visual change — divider removal — is confirmed by code inspection of the removedborder-inline-startline instyles.scss.Evidence screenshots:
/home/ernstka/workplace/chat-bubble-reference/pf-tokens-before-permutations.png/home/ernstka/workplace/chat-bubble-reference/pf-tokens-after-permutations.pngBuild:
gulp buildsucceeds. TypeScript compilation clean (tsc --noEmitno errors). ESLint clean on changed files.Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md. — ✅ No public API changes. The one intentional visual change (divider removal) is by design.CONTRIBUTING.md. — ✅ No new browser features used.role="group",aria-label,aria-disabledon group wrappers preserved exactly.role="presentation"on the innerInternalTokenprevents a redundant nested group from being exposed to assistive tech.Security
checkSafeUrlfunction. — No URL handling in this change.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.