Skip to content

Add schedule event type filters#393

Merged
ashleywolf merged 1 commit intomainfrom
schedule-event-filters-244
Apr 25, 2026
Merged

Add schedule event type filters#393
ashleywolf merged 1 commit intomainfrom
schedule-event-filters-244

Conversation

@ashleywolf
Copy link
Copy Markdown
Contributor

Summary

  • Adds event type filter controls to the schedule page.
  • Builds filter options from the existing event type source of truth so newer types stay included.
  • Shows only filter options that have events in the current schedule.
  • Adds a component test that verifies filtering and restoring all events.

Context

Validation

  • npm test -- --runInBand
  • npm run build
  • Verified /schedule renders filter controls for the current 2026 events.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 25, 2026 16:37
@ashleywolf ashleywolf merged commit bf56627 into main Apr 25, 2026
7 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds event-type filtering controls to the schedule page so users can narrow down visible events by type, addressing usability concerns from #244.

Changes:

  • Introduces an EventFilter component (with styles) and wires it into EventsList to filter displayed schedule cards by event type.
  • Builds filter options dynamically from the existing event-type “source of truth” and only shows types present in the current schedule.
  • Adds a component test to verify filtering behavior and restoring the full event list.
Show a summary per file
File Description
tests/events-list.test.jsx Adds a test covering event-type filtering and reset-to-all behavior.
styles/styles.scss Globally imports the new event-filter SCSS.
content/commons.json Adds i18n strings for the filter label and “All event types” option.
components/events-list/EventsList.jsx Adds selected-type state, builds filter options, filters the rendered events, and shows a “no matches” empty state.
components/event-filter/event-filter.scss Styles the new filter control and active/hover/focus states.
components/event-filter/EventFilter.jsx Implements the filter UI as a button group using event type labels and counts.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 6/6 changed files
  • Comments generated: 2

Comment on lines +8 to +12
<div className="event-filter" aria-label={getLiteral('schedule:filter-label')}>
<span className="event-filter__label">
{getLiteral('schedule:filter-label')}
</span>
<div className="event-filter__options">
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

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

aria-label on a plain <div> typically isn’t exposed unless the element has an explicit/implicit ARIA role, so the filter group may be unlabeled for assistive tech. Consider using role="group" with aria-labelledby pointing at the visible label, or use a <fieldset> + <legend> so the control group has proper semantics.

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +11
const baseEvent = {
formattedDate: {
date: 'May 14',
startTime: { utc: '7:00 pm', pt: '12:00 pm' },
endTime: { utc: '8:00 pm', pt: '1:00 pm' },
timeDisplay: 'specific',
},
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

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

The test fixtures don’t include the raw date field (mm/dd) that EventsList uses for the same-date class logic (event.date === ...). Using an event shape that differs from parseEvent() output can make this test pass while masking regressions; add a realistic date (and optionally endDate) to the test events.

Copilot uses AI. Check for mistakes.
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