Repository navigation
Allow events to have a "TBD" or "All Day" time - #302
Merged
Merged
Conversation
…e not in UTC time format
…utter and Typewind events
cthow83
requested review from
AndreaGriffiths11,
LadyKerr,
cassidoo and
karasowles
as code owners
April 25, 2025 23:01
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the events system to allow for events to have a "TBD" time or span multiple days by incorporating an optional end date and adjusting the API’s date formatting behavior.
- Updated event API to handle an optional end date and fallback to "TBD" for non-UTC start times.
- Modified event templates and tests to support events with a range of dates.
- Updated the events list display to show a date range for multi-day events.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/testData/2025-05-02-typewind.js | New test data with an invalid start time to exercise fallback logic. |
| tests/testData/2025-05-02-Cookie-Cutter.js | New test data supporting multi-day events with an end date. |
| tests/events.test.js | Added tests covering end dates and fallback behavior for invalid start times. |
| components/events-list/EventsList.jsx | Updated UI to display a date range when an end date is provided. |
| api/events.js | Updated event parsing to include an end date and adjust time fallback logic. |
| .github/ISSUE_TEMPLATE/add-to-calendar.yml | Updated template for consistency in quoting and added an optional end date field. |
Comments suppressed due to low confidence (1)
api/events.js:117
- Missing explicit check for 'TBD' in startTime handling may lead to an attempt to parse invalid time strings. Consider reverting to the previous condition (startTime && startTime !== TBD) to correctly default invalid times to 'TBD'.
if (startTime) {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
karasowles
reviewed
Apr 25, 2025
karasowles
left a comment
Contributor
There was a problem hiding this comment.
Looks great - thank you for tackling this so thoroughly and cleaning up a bit while you were in there too!
Contributor
|
5pm on a Friday, the perfect time to merge |
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.
#245
Context
Currently they must have a specific time range within the one day, which is limiting for future events, and limiting for all day, multi-day conferences. At present, if anything except a specific UTC time range is entered, the event does not appear on the site.
Changes
Important
"All Day" has not been added, currently it will show a multi day pill at the top of the event and the start and end times as normal. This could/should be updated to not display times on a multi day event
Testing
A few tests have been added. It's also possible to show it on the page by updating the content of the events.
E.G.
Demo Screenshot