Skip to content

[ASAP-1598] - new dashboard events component - #5235

Open
AkosuaA wants to merge 8 commits into
masterfrom
ASAP-1598-new-dashboard-events-component
Open

AkosuaA wants to merge 8 commits into
masterfrom
ASAP-1598-new-dashboard-events-component

Conversation

@AkosuaA

@AkosuaA AkosuaA commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

ref: https://asaphub.atlassian.net/browse/ASAP-1598

Summary

  • Replace the CRN dashboard's separate "Upcoming Events" and "Past Events" sections with a single combined DashboardEventsCard (tabbed Upcoming/Past). Old UpcomingEventsSection/PastEventsSection and their tests are removed.

  • Extend EventInfo with optional titlePrefix/titleSuffix/titleAction/footer slots and alwaysShowDateBlock flag, so it can be reused on the dashboard, event list and event detail page.

  • Updated EventTime's multi-day display. Previously, when an event spanned multiple days, it looked like this

Screenshot 2026-09-25 at 12 54 33 After discussing with Elena, the designs have been updated, see below Screenshot 2026-09-25 at 15 02 49

Basically the logic for the displaying the event dates is:

  • Single day: Display the date and time rows

  • Multi-day date ranges: The time row is not displayed. End date is always in full:
    Same month & year: start date shows just weekday + day, eg: "Friday 10 - Saturday 11 September 2026"
    Same year, different months: start date adds the month, eg: "Sunday 31 August - Tuesday 1 September 2026"
    Different years: start shows the full date, eg: "Thursday 31 December 2026 - Friday 1 January 2027"

  • Updated useDateHasPassed to accept an enabled flag that skips its useInterval timer when false. This was added as past events don't need to run this check

I tried to match the designs as closely as possible. For the colours, I used similar colours where we didn’t already have an equivalent in our colour palette (Elena mentioned it was fine to use colours that were as close as possible).
Since Amin is working on updating our colour palette to follow the CAS Design System colours, I thought that if those changes are merged before this PR, I could update this PR accordingly, or follow up with a separate PR to make the colour updates.

Update: Below is a screenshot of the variations agreed on with Elena on how do display the date ranges and time.
A4 · Days rounded up@1x

@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

'EEEE, d MMMM yyyy',
);
const formattedEndDay = formatDateToTimezone(endDate, 'EEEE, d MMMM yyyy');
const multiDay = formattedStartDay !== formattedEndDay;

@diegonvs diegonvs Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey, multiDay compares the start and end day in the browser's timezone, so any event that crosses the viewer's midnight goes into the multi-day branch and loses its time row. A 2-hour meeting shows as "2 days" with no time.

Tokyo:

Image

I believe the day count and date range should be based on the event's own timezone, which EventTime already receives.

Maybe something like this?

const multiDay = formatDateToTimezone(startDate, 'yyyy-MM-dd', startDateTimeZone) !== formatDateToTimezone(endDate, 'yyyy-MM-dd', endDateTimeZone);

if (multiDay) {
	const dayCount = getMultiDayCount(startDate, endDate, startDateTimeZone);
	const dateRange = getMultiDayDateRange(startDate, endDate, startDateTimeZone);

@AkosuaA AkosuaA Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for raising. I discussed with Elena and we agreed to base the count on the actual duration of the event since that will be consistent across timezones. I've attached a screenshot of design variations (to the pr description) for how we should display the day count pill, the date range and time. Basically, the day count pill only shows up for events 24 hours and up and is rounded up to the nearest day. When an event spans multiple days we add a shortened version of the day to the time to make it clearer for the user.

@AkosuaA
AkosuaA force-pushed the ASAP-1598-new-dashboard-events-component branch from f5ee6d3 to ce3347a Compare September 28, 2026 15:43

This branch was successfully deployed

1 active deployment
Branch — 06f2b9d0 Deployed Oct 2, 2026 by AkosuaA via branch-pipeline-success #20683
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.

2 participants