Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💄 CMS UI | Updating the Events Component Editor #2288

Merged
merged 16 commits into from
Nov 5, 2024

Conversation

isaaclombardssw
Copy link
Contributor

The two big things here were adding a time picker instead of a number box, and associating major cities to offset values for context (via the moment timezone library).

🤖🤖🤖

This pull request includes significant updates to the Events component to improve timezone handling and date formatting, as well as some changes to the JSON data and package dependencies.

Updates to Events Component:

  • components/blocks/Events.template.tsx:

    • Replaced manual timezone formatting with moment-timezone for better accuracy and added Datetime for date-time input. Updated date and time formatting functions. [1] [2] [3] [4] [5]
    • Added a new utility function to map cities to their respective timezones using moment-timezone.
  • components/blocks/Events.tsx:

    • Fixed start time parsing to handle both string and numeric formats and updated the calculation of startDateUTC. [1] [2]

JSON Data Updates:

Dependency Updates:

Code Cleanup:

🤖🤖🤖

### General Contributing:

All New Content Submissions: (To be confirmed by reviewer)

  • Title is short & specific
  • Headers are logically ordered & consistent
  • Purpose of document is explained in the first paragraph
  • Procedures are tested and work
  • Any technical concepts are explained or linked to
  • Document follows structure from templates
  • All links work
  • The spelling and grammar checker has been run
  • Graphics and images are clear and useful
  • Any prerequisites and next steps are defined.
Screenshot 2024-10-02 at 10 46 35 am Screenshot 2024-10-02 at 10 46 23 am

Copy link

vercel bot commented Oct 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tina-io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 10:40pm

@isaaclombardssw isaaclombardssw marked this pull request as ready for review October 2, 2024 00:49
@isaaclombardssw isaaclombardssw requested a review from a team as a code owner October 2, 2024 00:49
@isaaclombardssw isaaclombardssw changed the title Updating events ux 💄 CMS UI | Updating the Events Component Editor Oct 2, 2024
@isaaclombardssw
Copy link
Contributor Author

Closes #2173.

Copy link
Member

@bradystroud bradystroud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per our conversation, we need to pick a city, not a timezone. Timezones can change. (daylight savigns)

image

e.g.
in June, Bob books NDC London for Jan 15th 9am, and sets timezone to Londons current time zone (+1:00 GMT)
London changes from +1:00 GMT to +0:00 GMT on last day of Oct
The event will change from 9am to 8am

components/blocks/Events.template.tsx Show resolved Hide resolved
components/blocks/Events.tsx Outdated Show resolved Hide resolved
Copy link
Member

@bradystroud bradystroud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me.
As per our conversation, there are already PBIs in the backlog to improve this so lets merge it as-is

@isaaclombardssw isaaclombardssw merged commit 39b30ef into main Nov 5, 2024
4 checks passed
@isaaclombardssw isaaclombardssw deleted the updating-events-ux branch November 5, 2024 23:19
Calinator444 pushed a commit that referenced this pull request Nov 12, 2024
* adding in react-datetime

* adding in the hardcoded list of IANA timezone to city name mappings, to give offsets some context

* updating the events component by injecting and determining the cities in the offset options list, and also the use of a the time picker for the CMS window

* auto-linting stuff and fields added from experimentation (no visual changes

* linting error fix

* offset hour linting issue – truncation option not recognised

* trying new ts ignore locations...

* realised I didn't even need the format and can just use trunc

* updating the UI message

* updating comments and labels

* updating pnpm lock

* fixes
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.

3 participants