feat(phases): pre-schedule/planning edition UX#145
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR introduces phase-driven EditionView UX for the Pre-Schedule vs Planning phases by deriving the current festival phase and using it to control the default landing tab, the primary tab label, and a compact phase banner message—without adding or hiding any tabs.
Changes:
- Add a reusable
PhaseBannerrendered inEditionLayout, with phase-specific copy for Pre-Schedule vs Planning (including a start-date countdown in Planning). - Make the
$editionSlugroute redirect to a phase-driven default tab (instead of hardcoding/sets). - Update main tab navigation so the primary tab label becomes “Lineup” in Pre-Schedule and “Vote” in Planning (and centralize tab route patterns in
tabRoutes).
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/routes/festivals/$festivalSlug/editions/$editionSlug.tsx | Redirects edition root route to a phase-driven default tab by deriving phase from edition + festival timezone. |
| src/pages/EditionView/TabNavigation/tabRoutes.ts | Centralizes route patterns for main tabs for reuse across navigation and redirects. |
| src/pages/EditionView/TabNavigation/TabNavigation.tsx | Makes the primary tab label phase-aware (“Lineup” vs “Vote”). |
| src/pages/EditionView/TabNavigation/MobileTabButton.tsx | Switches to shared tabRoutes instead of an in-file route map. |
| src/pages/EditionView/TabNavigation/DesktopTabButton.tsx | Switches to shared tabRoutes instead of an in-file route map. |
| src/pages/EditionView/TabNavigation/defaultTab.ts | Adds a phase→default-tab mapping function. |
| src/pages/EditionView/TabNavigation/defaultTab.test.ts | Adds unit coverage for getDefaultTab. |
| src/pages/EditionView/PhaseBanner.tsx | Adds a compact, phase-aware banner for Pre-Schedule and Planning. |
| src/pages/EditionView/EditionLayout.tsx | Renders PhaseBanner between the header and main tab navigation. |
| src/lib/festivalCountdown.ts | Adds daysUntilStart helper for day-countdown messaging. |
| src/lib/festivalCountdown.test.ts | Adds unit coverage for daysUntilStart edge cases. |
| docs/prd/festival-phases/0-epic.md | Adds the festival-phases epic documentation. |
| docs/prd/festival-phases/1-foundation-pre-schedule-planning.md | Adds PRD for phase foundation + Pre-Schedule/Planning. |
| docs/prd/festival-phases/2-live-phase.md | Adds PRD for Live phase follow-up work. |
| docs/prd/festival-phases/3-post-festival.md | Adds PRD for Post-Festival follow-up work. |
a3b71a6 to
25776d3
Compare
Adds the first phase-driven UI behavior on top of getFestivalPhase/useFestivalPhase (#136): - Compact PhaseBanner in EditionLayout with phase-aware copy (lineup-is-live in Pre-Schedule, schedule-out countdown in Planning), backed by a small pure daysUntilStart helper. - Phase-driven default landing tab: the $editionSlug beforeLoad redirect now resolves via a phase-to-tab map (getDefaultTab) instead of a hardcoded /sets redirect, so Live/Post can slot in later without reshaping the mechanism. - Primary tab label is phase-aware ("Lineup" in Pre-Schedule, "Vote" otherwise). - Deduplicated the tab-key-to-route map (tabRoutes) shared by the tab buttons and the route's default-tab redirect. No tab is added or hidden by phase; the tab set stays stable.
daysUntilStart compared the festival's start_date against the viewer's local calendar day, so the countdown could be off by one for viewers outside the festival timezone. Convert "now" to the festival's calendar day first.
- Fetch the festival once in the parent /festivals/$festivalSlug beforeLoad and expose it via router context instead of re-fetching it in the child edition route. - Fetch the edition once per beforeLoad invocation instead of once inside the redirect branch and again in the fallthrough branch. - Default to the schedule tab (which itself lands on timeline) in the Live phase, instead of sets. - Soften the Pre-Schedule banner copy: artists can be announced incrementally before the schedule drops, so "the lineup is live" overstated completeness.
location.pathname.endsWith(params.editionSlug) misfires whenever an edition slug happens to match a tab segment (e.g. slug "sets" against .../editions/sets/sets), sending users on a tab back to the default tab. Compare against the exact base path instead.
25776d3 to
72ac660
Compare
Adds the Pre-Schedule/Planning phase banner, a phase-driven default landing tab, and phase-aware "Lineup"/"Vote" primary-tab labeling, per #137.
No tab is ever added or hidden — only the default route, label, and banner copy change by phase.
Verification
schedule_reveal_level = "draft": lands on the sets tab, tab reads "Lineup", banner explains the schedule is coming soon.draftbut before the Live window: lands on the sets tab, tab reads "Vote", banner shows a countdown of days tostart_date.start_dateof null: banner/tab still render sensibly without throwing.Closes #137.
Generated by Claude Code