Timezone controls (optional, default turned on)#1327
Open
cwant wants to merge 9 commits into
Open
Conversation
…zone override. (Part 1 of timezone controls.)
(Part 2 of timezone controls.)
(Part 3 of timezone controls.)
(Part 4 of timezone controls.)
…gem). (Part 5 of timezone controls.)
Also, localize dates for longer events. (Part 7 of timezone controls.)
… specified time zone. (Otherwise they have to do mental math to add times in GMT.)
Contributor
|
Many thanks @cwant for taking the time to do this PR – really appreciated and really helpful! Before this PR, I tried on my side to cherry-pick some of your commits from your forked TeSS, so far I picked up almost the same one :
I'll test on my side if everything seems ok for me and if I don't need the last I've added on my side. I can definitely help review this PR @fbacall – if you want to throw a copilot, please do so. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
This ports over the timezone controls from Explora to Elixir/TeSS.
Motivation and context
It's helpful to see events in your own timezone. This PR gives a toggle between showing times in the timezone of each event, and showing times in the timezone detected by the webbrowser.
The timezone control widget shows up on any page where there is an event listed (e.g.
events#index,events#show, upcoming events, etc.).The timezone controls can be opened and closed for visibility.
An added feature: the event edit page allows you to enter times in the timezone of the event (rather than having to do the mental math of entering it in GMT and hoping you've done that correctly).
Note : this uses the
ffi-icugem. For our TeSS we use this so that the timezone names appear in the language that is selected in our user interface. E.g.heure d’été du Pacifique nord-américainwhen French is selected instead ofPacific Daylight Time.Screenshots
Here is the initial hit on
event#index, with option "event timezones" selected by default. Two events with different timezones are shown.Here is the same page, with the timezones controls displayed via the
Change...link. (Clicking thexhides the controls again.)Here is the page with my timezone (detected by the browser) is clicked:
Here is the editing link for start/end times, done in the timezone selected for the event (converted to GMT when saved to the database):
Checklist