Repository navigation
Conversation
Apple's three label classes were named six ways (unlinked / linked / track, tracking / linked / unlinked, Not linked / Linked / Tracking, Not linked to you / Linked to you / Used to track you, glyph only, the full Apple names) and coloured from four places, and the app cards' count chips were 10px glyphs with 11px numerals. The design review of PR #398 ranked this first. One vocabulary (`label_class.*`, en and zh): Tracks you, Linked to you, Not linked, Not collected, with the full Apple name in the chip's title. One component, LabelClassChip (co-located CSS, mapping in lib/label-class.ts): glyph plus short word, a count form with the numeral in its own span, 20px tall at 12px, an 18px inline size. One colour per class, set only by the severity-* rules in globals.css: the tint is now opaque, mixed from the card colour, so the plain token hue clears 4.5:1 on every stack in light, dark and high contrast (red 4.9 / 5.1 / 6.2, orange 7.5 / 5.6 / 10.4, cream 8.9 / 5.2 / 16.6, neutral 6.2 / 5.4 / 17.1); the 70% text mix that kept the change-review chip legible read as khaki and still fell short on a plain row in dark. Used on the app cards (stacked under the risk pill), the dashboard's risk rows and Consider-replacing sentences, the review queue cards, the privacy map and Privacy Labels headers, the change-review panel, the shortlist banner and drawer rows and the Compare grid; the Stats legends and the shared image read the same words. The per-surface chip families and the stale tier and swatch keys are gone. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Brings in d31cd29 from the PR 398 branch, which this branch is stacked on: the welcome action bar and the shared app-count read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Follow-up to #398 (UI polish overhaul). Stacked on
feat/ui-polish-rating-e229b1; retarget tomainonce #398 merges. The one finding every design judge still shared after seven rounds: Apple's three privacy-label classes were named and coloured differently on every surface, and the per-card count chips were too small to read.What changes
One vocabulary, one colour per class, one chip component.
Vocabulary (
label_class.*, en and zh; the full Apple name stays in the chip'stitle):--red)--orange)--cream)--text-2on a--text-3tint)Before this PR the same three classes read as "unlinked / linked / track" (dashboard rows), "tracking / linked / unlinked" (review queue), "Not linked / Linked / Tracking" (mismatch sentences, Stats small multiples), "Not linked to you / Linked to you / Used to track you" (heatmap legend), "Not linked / Linked to you / Used to track" (shared image), glyph-only (app cards) and the full Apple names (privacy map, Privacy Labels tab, change review).
One layout change rode along: on the app cards the chips stack in a column under the risk pill (
.risk-chip-row), because the rail does not shrink and a row of three word chips pushed the app's name out of the card; at phone width the rail spans the card and they sit in a row again.Chip:
app/components/LabelClassChip.tsxwith co-locatedlabel-class-chip.css(docs/CSS.md convention) and the mapping inlib/label-class.ts. Glyph (PrivacyTypeIcon, aria-hidden) + short label;countprop renders the count form with the numeral in its own<num>span (tabular figures);size="md"is 20px tall with 12px text,size="sm"is 18px for inline sentences. It keepsseverity-badgeand theseverity-*class, sotests/e2e/a11y.spec.ts(which waits for.severity-badge.severity-unlinkedon the privacy map) andlabel-hints.spec.tsselect it unchanged.Colour: only the four
severity-*rules inapp/globals.csscolour a class pill. The per-surface chip families are gone:.risk-chip*(cards),.home-row-chip*(dashboard rows),.review-queue-card-chip*(hard-coded light hexes#b91c1cetc.),.change-review-sev-chip-*(the 70% text mix) and.compare-slot-chip-declared..risk-chip-rowand.review-queue-card-chipsstay as layout containers.Surfaces changed
AppGrid.tsx): three 16px glyph-and-numeral chips (10px glyph, 11px numeral, muted until hover) → count chips with words, coloured at rest, wrapping under the risk pill.HomeView.tsx): "{n} unlinked / linked / track" → count chips.HomeView.tsx): the mismatch sentence renders both classes as inlinesmchips throughtemplate_richtags; the redundant icon-only chip at the right is gone.ReviewQueue.tsx): "{n} tracking / linked / unlinked" → count chips.PrivacyGroupedView.tsx): full Apple name → chip (full name on hover).detail/PrivacyTypeSection.tsx): same; the mismatch tooltip uses the shared words.detail/ChangeReviewPanel.tsx):change-review-sev-chippills → chip.ShortlistView.tsx): the mismatch banner sentence and the preview drawer's per-category rows (which also drop a hard-coded English "you allow") → inline chips.CompareAppsView.tsx): the grid's own cells (were a colour dot plus the untranslated full Apple name), the profile column's tolerance badge (was untranslatedTIER_META.shortLabel) and the Data Not Collected slot chip → chip; the ✓/⚠ mark titles use the shared words.charts/PrivacyHeatmap.tsx,charts/SmallMultiples.tsx) and the shared image (SocialShareModal.tsx): same words (swatches, not pills).profile-presets.spec.ts).Contrast
Measured by compositing each stack bottom-first (page → panel tint → card surface → row tint → chip tint) with a WCAG script, in light, dark and the app's high-contrast theme.
The brief suggested reusing #398's
color-mix(var(--red) 70%, var(--text))text fix. On the change-review panel's tinted rows that fix does not reach 4.5:1 in dark mode for red (a plainsurface-activerow + red tint composites to 3.85:1 at 70%; the row #398 measured was 4.78:1), and it is what made the linked pill read as khaki. So the fix moved to the background: the chip tint is opaque,color-mix(in srgb, var(--hue) 12%, var(--bg-2)), so the text meets the same background on every surface and the plain token hue is used everywhere.--red--orange--cream--text-2For reference, the translucent tint it replaces put the red text at 3.67:1 (dark, change-review added+track row), 2.96:1 (dark, plain change-review row) and 4.48:1 (light, added+track row).
Checks
tsc --noEmit(TypeScript 7.0.2): cleannode scripts/check-i18n-parity.mjs: zh.json at parity (5324 keys)tests/app/**/*.test.ts: 1169 passed, 0 failed, 4 skipped (newlabel-class.test.ts; the i18n text ratchet baseline drops the ShortlistView "you allow" literal this PR translated, plus two StatsView export-button strings that were already stale on the polish branch)tests/e2e/a11y.spec.tson a webpack production build served bynext start: 12 passed (light, dark and high contrast), run twice (before and after the grid-rail and Compare-cell fixes)CHANGELOG: one line under Unreleased / Changed. AGENTS.md: a paragraph under UI naming the chip, the vocabulary and the colour rule.
🤖 Generated with Claude Code