worldcubeassociation.org
worldcubeassociation.org copied to clipboard
Use Event and Schedule React Component from Registrations
Currently untested, will do later
I had to change the location of the dropdown a bit, because otherwise we can't localize it (because we still aren't using react i18n and can't render a dropdown in the middle of an i18n string :upside_down_face: )
@kr-matthews Does this still convey the ideas you had around the custom timezones?
Your current way of rendering the timezone dropdown picker has a flaw. Once you pick "custom", the timezone picker switches into custom mode and offers you a list of all supported timezones. You cannot go back to "your local TZ" mode or "follow this venue's TZ" mode.
I guess I could add a reset button?
My suggestion: Don't have competing dropdowns. Keep the old behaviour but decouple it from the need of embedding it into a "nice phrase" for I18N's sake:
You are viewing this schedule in the following timezone setting: [Dropdown with "your local"/venue 1/venue 2/.../venue N/"custom"]
{If the above is custom} The current custom timezone setting is [Dropdown]
Done!
I will try and take a look tomorrow, or the day after.
I haven't had time to look through the code, but from briefly running locally, the timezone selector seems decent but slightly awkward to me. Once in the custom mode, if I select a time zone corresponding to me or a venue, then the timezone sentence/dropdown disappears, which feels counter-intuitive. I feel like both dropdowns should always be present/visible, but maybe that's just me.
Also, the wording "your local" and "a custom" doesn't sound right to me in the new format.
I have added another suggestion for the time zone picker. Basically, you always have one dropdown that allows you to select any timezone. For following the currently selected venue, there is a "follow selected venue" button which is turned on by default. You can turn it off, which makes a "use this zone" appear in ech venue's individual menu tab. You can also press a "set to local" button to use your local timezone.
UI is still a bit rough around the edges and needs proper layout, but here's the proposal:
Totally open about ideas for better button placement
Issues that have been raised since merging:
- Cumulative time limits are not surfaced
- Table appears sub-par on mobile.
Because of the way that the table is rendered such that the event name doesn't get duplicated, "First Round" isn't bolded like Second Round is.
I share similar personal sentiment:
The alternating row colors is inconsistent across the event name column and the rest.