Skip to content

Preserve selected schedule day when navigating away - #309

Merged
jonatanklosko merged 4 commits into
thewca:mainfrom
maxidragon:preserve-selected-schedule-day
Aug 24, 2026
Merged

jonatanklosko merged 4 commits into
thewca:mainfrom
maxidragon:preserve-selected-schedule-day

Conversation

@maxidragon

Copy link
Copy Markdown
Member

This PR fixes probably one of the most annoying issues in WCA Live. Currently, when a user opens a round that isn't on the first day of the competition and then goes back, they are taken back to the first day of the competition. After these changes, the selected day is preserved until the user returns to the homepage.

@maxidragon maxidragon self-assigned this Aug 23, 2026
@jonatanklosko

Copy link
Copy Markdown
Member

I agree that it's an issue, but I feel like the current solution has too many parts.

What I would suggest is that the schedule stores {competitionId,date} json inside session storage, the on mount it reads from storage and if the competition id is the same it restores the date, otherwise it can store the new competition, plus whenever the date tab changes. This should keep it all in a single file.

Comment thread client/src/components/Schedule/Schedule.jsx Outdated
Comment thread client/src/components/Schedule/Schedule.jsx Outdated
Comment thread client/src/components/Schedule/Schedule.jsx Outdated
@jonatanklosko
jonatanklosko merged commit 9fe43c5 into thewca:main Aug 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants