refactor(edition): tokenize schedule view colors - #371
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Playwright test resultsDetails
|
There was a problem hiding this comment.
🟡 Changes recommended
The updated vote token classes in VOTE_CONFIG can render incorrectly outside the .edition-view scope, and several schedule filter states lose prior hover/opacity behavior, undermining the “zero visual change” requirement.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR refactors the EditionView Schedule tab UI (Now/Timeline/List + filters) to use .edition-view semantic color tokens and updates voteConfig.ts to use the new vote-* token families, aiming for no visual changes while centralizing color definitions.
Changes:
- Replaced hardcoded Tailwind color utilities in Schedule tab components with edition-view semantic tokens (
surface*,border*,accent*,live*, etc.). - Updated schedule filter UI (sheet + lineup filters) and navigation styles to token-based colors.
- Migrated
src/lib/voteConfig.tsvote colors tovote-*token classes for reuse across schedule-related voting UI.
File summaries
| File | Description |
|---|---|
| src/pages/EditionView/tabs/ScheduleTab/VoteFilterChips.tsx | Tokenizes vote chip hover/selected text/background behavior. |
| src/pages/EditionView/tabs/ScheduleTab/VoteButtons.tsx | Updates vote button hover/selected text colors to token-based foregrounds. |
| src/pages/EditionView/tabs/ScheduleTab/TimeFilterSelect.tsx | Tokenizes time filter select trigger/content colors. |
| src/pages/EditionView/tabs/ScheduleTab/StageFilterButtons.tsx | Tokenizes stage filter button colors and hover states. |
| src/pages/EditionView/tabs/ScheduleTab/ScheduleNotRevealedPlaceholder.tsx | Updates placeholder copy color to subtle foreground token. |
| src/pages/EditionView/tabs/ScheduleTab/ScheduleNavigationItem.tsx | Tokenizes active/inactive schedule nav item colors. |
| src/pages/EditionView/tabs/ScheduleTab/ScheduleNavigation.tsx | Tokenizes schedule navigation container background. |
| src/pages/EditionView/tabs/ScheduleTab/ScheduleFilterSheet.tsx | Tokenizes filter trigger/sheet UI colors and action button styles. |
| src/pages/EditionView/tabs/ScheduleTab/list/TimeSlotGroup.tsx | Tokenizes list time slot group header background/text/border. |
| src/pages/EditionView/tabs/ScheduleTab/list/MobileSetCard.tsx | Tokenizes list card background/border and primary text colors. |
| src/pages/EditionView/tabs/ScheduleTab/list/ListDayGroup.tsx | Tokenizes sticky day header background/border/text colors. |
| src/pages/EditionView/tabs/ScheduleTab/lineup/StagesLineupGrid.tsx | Tokenizes lineup empty state + grid stage section styling. |
| src/pages/EditionView/tabs/ScheduleTab/lineup/LineupSetItem.tsx | Tokenizes lineup set item card + title text colors. |
| src/pages/EditionView/tabs/ScheduleTab/lineup/LineupFilters.tsx | Tokenizes lineup filter trigger/sheet UI colors and action button styles. |
| src/pages/EditionView/tabs/ScheduleTab/lineup/LineupDayHeader.tsx | Tokenizes lineup day header background/border/text colors. |
| src/pages/EditionView/tabs/ScheduleTab/lineup/DaysLineupView.tsx | Tokenizes lineup empty state text color. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/TimeScaleContainer.tsx | Tokenizes timeline header strip background. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/TimelineToolbar.tsx | Tokenizes timeline toolbar container + divider + toggle button colors. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/TimelineOverview.tsx | Tokenizes overview panel border/background and boundary label styling. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/StageRow.tsx | Tokenizes stage row track background. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/StageLabels.tsx | Tokenizes stage label text color. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/SetHeader.tsx | Tokenizes set header link color + hover color. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/SetBlock.tsx | Tokenizes set block card styling and metadata text. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/OverviewViewportWindow.tsx | Tokenizes overview viewport window fill while keeping white focus ring. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/OverviewStageRow.tsx | Tokenizes overview stage row background. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/NowButton.tsx | Migrates “Now” live indicator colors to live* tokens. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/HourMarkers.tsx | Tokenizes hour marker text and divider colors. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/DayJumpButtons.tsx | Tokenizes day jump separators, focus ring, and active/hover states. |
| src/pages/EditionView/tabs/ScheduleTab/horizontal/DateBand.tsx | Tokenizes date band border and date label text colors. |
| src/pages/EditionView/tabs/ScheduleTab/DayFilterSelect.tsx | Tokenizes day filter select trigger/content colors. |
| src/lib/voteConfig.ts | Replaces literal vote colors with vote-* token families. |
Review details
Suppressed comments (2)
src/pages/EditionView/tabs/ScheduleTab/ScheduleFilterSheet.tsx:127
- The “Done” button hover color no longer changes (
bg-accent+hover:bg-accent), but previously it darkened on hover. If this is intended to be visually identical, the hover shade should remain distinct.
<Button type="button" className="bg-accent hover:bg-accent">
src/pages/EditionView/tabs/ScheduleTab/lineup/LineupFilters.tsx:116
- The “Done” button hover color no longer changes (
bg-accent+hover:bg-accent), which removes the previous hover darkening and may be a visible regression.
<Button type="button" className="bg-accent hover:bg-accent">
- Files reviewed: 31/31 changed files
- Comments generated: 6
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
VOTE_CONFIG now depends on .edition-view-scoped --vote-* CSS variables, but it’s consumed in non-edition-view pages (e.g. SetDetails) which will regress vote styling.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
src/lib/voteConfig.ts:19
VOTE_CONFIGnow relies onvote-*Tailwind colors (e.g.text-vote-must,bg-vote-must) whose CSS variables are only defined under the.edition-viewscope (seesrc/index.css:105-139). There are existing consumers outside that scope (e.g.src/pages/SetDetails/SetVotingButtons.tsx:79,src/pages/SetDetails/SetGroupVoting.tsx:90-94), so these classes will compute to invalid colors and regress styling (especiallydark:bg-vote-*-soft, which will stop overriding the lightbg-*-50). Consider either wrapping those routes/sections inEditionViewRoot(or adding an.edition-viewancestor) or moving the--vote-*variables to a global scope.
bgColor: "bg-orange-50 dark:bg-vote-must-soft",
iconColor: "text-vote-must",
textColor: "text-orange-900 dark:text-vote-must-foreground",
descColor: "text-vote-must dark:text-vote-must-foreground",
circleColor: "bg-vote-must",
buttonSelected: "bg-vote-must hover:bg-orange-700",
buttonUnselected:
"border-vote-must-foreground text-vote-must-foreground hover:bg-vote-must-foreground hover:text-white",
spinnerColor: "border-vote-must-foreground",
- Files reviewed: 32/32 changed files
- Comments generated: 2
- Review effort level: Lite
Migrate all hardcoded color classes in Schedule view components (Now, Timeline, and List) to semantic role token utilities per the edition-color-vocabulary.md mapping. This includes: - Text colors (foreground, muted-foreground, subtle-foreground, etc.) - Backgrounds (surface, surface-raised, surface-active, popover, accent, accent-soft, live) - Borders (border, border-strong) - Vote chip colors (vote-must, vote-interested, vote-skip and their variants) Changes affect 31 files across schedule views, controls, and voteConfig.ts. No visual changes—tokens currently resolve to today's exact color values. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtnAr22sTrdCMn9rcKrwQn
…357) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtnAr22sTrdCMn9rcKrwQn
#357) Portaled Sheet/Select content escapes .edition-view, so bg-popover resolved to the light root token (white filter sheet). Re-apply the scope class on portaled content, restore literal hover shades, and use popover-foreground for select text (was purple-100). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtnAr22sTrdCMn9rcKrwQn
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtnAr22sTrdCMn9rcKrwQn
6fc23a6 to
170df2b
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Several “zero visual change” replacements use accent-soft where the token value does not match the previous literal tints, so the refactor risks unintended color shifts.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (4)
src/pages/EditionView/tabs/ScheduleTab/lineup/LineupFilters.tsx:69
bg-accent-softmaps topurple-600/40(src/index.css:49), which doesn’t match the previousbg-purple-600/50andhover:bg-purple-400/10. If “zero visual change” is a hard requirement, keep these literal values (or update the token to match).
variant="secondary"
data-testid="schedule-filters-badge"
className="bg-accent-soft text-foreground"
>
{activeFilterCount}
src/pages/EditionView/tabs/ScheduleTab/lineup/LineupFilters.tsx:78
bg-accent-softispurple-600/40(src/index.css:49), so this badge will be noticeably lighter than the priorbg-purple-800/50. If the PR is targeting no visual change, keepbg-purple-800/50here.
<SheetContent
side="bottom"
data-testid="schedule-filter-sheet"
className="bg-popover border-border max-h-[85vh] overflow-y-auto"
>
src/pages/EditionView/tabs/ScheduleTab/ScheduleFilterSheet.tsx:69
bg-accent-softmaps to--accent-soft(src/index.css:49), which ispurple-600/40; this differs from the previous literalbg-purple-600/50andhover:bg-purple-400/10. If the intent is “zero visual change”, these classes should stay literal (or the token value should match the old alpha).
className={
hasActiveFilters
? "flex items-center gap-2 bg-accent-soft text-foreground hover:bg-purple-600/60"
: "flex items-center gap-2 text-subtle-foreground hover:bg-accent-soft hover:text-foreground"
}
src/pages/EditionView/tabs/ScheduleTab/ScheduleFilterSheet.tsx:78
bg-accent-softuses--accent-soft(purple-600/40, src/index.css:49) so this badge background won’t match the priorbg-purple-800/50(darker). If the PR needs zero visual change, keep the literal class here.
<Badge
variant="secondary"
data-testid="schedule-filters-badge"
className="bg-accent-soft text-foreground"
>
- Files reviewed: 31/31 changed files
- Comments generated: 5
- Review effort level: Lite
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtnAr22sTrdCMn9rcKrwQn
There was a problem hiding this comment.
🔵 Needs a closer look
Several token substitutions provably change colors/hover states versus the prior Tailwind values (e.g. vote text shades and filter trigger/badge backgrounds), conflicting with the stated “zero visual change” requirement.
Review details
Suppressed comments (8)
Previously missed (6) — in code that hasn't changed since the last review.
src/lib/voteConfig.ts:15
VOTE_CONFIG.mustGo.textColor/descColornow usevote-must-foreground, but that token is defined as orange-400 insrc/index.css, whereas the previous dark-mode text/description colors were orange-100/orange-300. This likely changes the vote tile/button text colors in dark mode and breaks the PR's “zero visual change” goal.
bgColor: "bg-orange-50 dark:bg-vote-must-soft",
iconColor: "text-vote-must",
textColor: "text-orange-900 dark:text-vote-must-foreground",
descColor: "text-vote-must dark:text-vote-must-foreground",
circleColor: "bg-vote-must",
src/lib/voteConfig.ts:45
VOTE_CONFIG.wontGo.textColor/descColornow usevote-skip-foreground(gray-400 persrc/index.css), but the previous dark-mode text/description shades were gray-100/gray-300. This likely changes vote tile/button text contrast in dark mode.
bgColor: "bg-gray-50 dark:bg-vote-skip-soft",
iconColor: "text-vote-skip",
textColor: "text-gray-900 dark:text-vote-skip-foreground",
descColor: "text-vote-skip dark:text-vote-skip-foreground",
circleColor: "bg-vote-skip",
src/lib/voteConfig.ts:30
VOTE_CONFIG.interested.textColor/descColornow usevote-interested-foreground(blue-400 persrc/index.css), but the prior dark-mode text/description shades were blue-100/blue-300. If the intent is zero visual change, keep those original dark-mode text classes (or introduce dedicated tokens for them).
bgColor: "bg-blue-50 dark:bg-vote-interested-soft",
iconColor: "text-vote-interested",
textColor: "text-blue-900 dark:text-vote-interested-foreground",
descColor: "text-vote-interested dark:text-vote-interested-foreground",
circleColor: "bg-vote-interested",
src/pages/EditionView/tabs/ScheduleTab/ScheduleFilterSheet.tsx:78
- The filters-count badge background changed from
bg-purple-800/50tobg-accent-soft(purple-600/40 persrc/index.css), which is a different shade/opacity and likely changes the badge appearance.
<Badge
variant="secondary"
data-testid="schedule-filters-badge"
className="bg-accent-soft text-foreground"
>
src/pages/EditionView/tabs/ScheduleTab/lineup/LineupFilters.tsx:68
- Same as ScheduleFilterSheet: the filters-count badge background moved to
bg-accent-soft(purple-600/40), which doesn't match the previousbg-purple-800/50visual.
{hasActiveFilters && (
<Badge
variant="secondary"
data-testid="schedule-filters-badge"
className="bg-accent-soft text-foreground"
>
src/pages/EditionView/tabs/ScheduleTab/horizontal/NowButton.tsx:15
- Hover text color changed from
hover:text-fuchsia-100tohover:text-live-foreground(fuchsia-200 persrc/index.css), which removes the lighter hover state and likely violates the PR's “zero visual change” requirement. Since there's nolive-hovertoken, keeping the literalhover:text-fuchsia-100preserves the prior behavior.
data-testid="now-jump-button"
className="shrink-0 gap-1.5 self-center text-live-foreground hover:bg-live/10 hover:text-live-foreground"
onClick={onJumpToNow}
src/pages/EditionView/tabs/ScheduleTab/ScheduleFilterSheet.tsx:69
- The active/inactive filter trigger uses
bg-accent-soft/hover:bg-accent-soft, but--accent-softis defined asbg-purple-600/40insrc/index.css, which doesn't match the previousbg-purple-600/50(active) andhover:bg-purple-400/10(inactive). This is a likely visual change despite the PR goal of no visual diffs.
className={
hasActiveFilters
? "flex items-center gap-2 bg-accent-soft text-foreground hover:bg-purple-600/60"
: "flex items-center gap-2 text-subtle-foreground hover:bg-accent-soft hover:text-foreground"
}
src/pages/EditionView/tabs/ScheduleTab/lineup/LineupFilters.tsx:59
- Same as ScheduleFilterSheet:
bg-accent-soft/hover:bg-accent-softcorresponds tobg-purple-600/40(seesrc/index.css) and does not match the prior active/inactive filter trigger backgrounds (bg-purple-600/50,hover:bg-purple-400/10). This likely introduces a visual change.
className={
hasActiveFilters
? "flex items-center gap-2 bg-accent-soft text-foreground hover:bg-purple-600/60"
: "flex items-center gap-2 text-subtle-foreground hover:bg-accent-soft hover:text-foreground"
}
- Files reviewed: 31/31 changed files
- Comments generated: 0 new
- Review effort level: Lite
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtnAr22sTrdCMn9rcKrwQn
There was a problem hiding this comment.
🟡 Changes recommended
Some replacements use accent-soft (defined as 40% opacity) where the previous UI used 50% opacity (bg-purple-600/50), which conflicts with the PR’s “zero visual change” requirement.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (2)
src/pages/EditionView/tabs/ScheduleTab/ScheduleFilterSheet.tsx:68
- The active-filters trigger background switched from the old
bg-purple-600/50tobg-accent-soft(which is--accent-soft= purple-600/0.4 in src/index.css). Since this PR targets zero visual change andaccentnow supports opacity modifiers, usebg-accent/50to preserve the previous 50% tint.
hasActiveFilters
? "flex items-center gap-2 bg-accent-soft text-foreground hover:bg-accent/60"
: "flex items-center gap-2 text-subtle-foreground hover:bg-accent-soft hover:text-foreground"
src/pages/EditionView/tabs/ScheduleTab/lineup/LineupFilters.tsx:58
- The active-filters trigger background switched from the old
bg-purple-600/50tobg-accent-soft(which is--accent-soft= purple-600/0.4 in src/index.css). Since this PR targets zero visual change andaccentnow supports opacity modifiers, usebg-accent/50to preserve the previous 50% tint.
className={
hasActiveFilters
? "flex items-center gap-2 bg-accent-soft text-foreground hover:bg-accent/60"
: "flex items-center gap-2 text-subtle-foreground hover:bg-accent-soft hover:text-foreground"
- Files reviewed: 32/32 changed files
- Comments generated: 2
- Review effort level: Lite
Migrates the schedule area (Now/Timeline/List views, filters, and
voteConfig.tsvote families) to the edition semantic tokens (#357), with zero visual change.Hover/pressed shades that step outside the token vocabulary (e.g. vote button
hover:bg-orange-700, timeline white focus ring) stay literal on purpose.Follow-up commits restore hover shades the tokenization had flattened and re-wrap the onboarding vote list so
vote-*tokens resolve; after #367 hoisted the tokens to:root, the interimedition-viewscope classes on portaled Select/Sheet content became dead and were removed.Verification
Closes #357
🤖 Generated with Claude Code
https://claude.ai/code/session_01GtnAr22sTrdCMn9rcKrwQn