worldcubeassociation.org icon indicating copy to clipboard operation
worldcubeassociation.org copied to clipboard

Use Event and Schedule React Component from Registrations

Open FinnIckler opened this issue 10 months ago • 10 comments

Currently untested, will do later

FinnIckler avatar Apr 24 '24 15:04 FinnIckler

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: )

FinnIckler avatar Apr 29 '24 13:04 FinnIckler

@kr-matthews Does this still convey the ideas you had around the custom timezones?

FinnIckler avatar Apr 29 '24 13:04 FinnIckler

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.

gregorbg avatar Apr 29 '24 16:04 gregorbg

I guess I could add a reset button?

FinnIckler avatar Apr 29 '24 16:04 FinnIckler

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]

gregorbg avatar Apr 29 '24 16:04 gregorbg

Done!

FinnIckler avatar Apr 29 '24 17:04 FinnIckler

I will try and take a look tomorrow, or the day after.

kr-matthews avatar Apr 30 '24 05:04 kr-matthews

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.

kr-matthews avatar May 01 '24 05:05 kr-matthews

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.

gregorbg avatar May 06 '24 09:05 gregorbg

UI is still a bit rough around the edges and needs proper layout, but here's the proposal: image

Totally open about ideas for better button placement image

gregorbg avatar May 06 '24 09:05 gregorbg

Issues that have been raised since merging:

  • Cumulative time limits are not surfaced
  • Table appears sub-par on mobile.
    image

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: image

The alternating row colors is inconsistent across the event name column and the rest.

coder13 avatar May 07 '24 18:05 coder13