Skip to content

Fix filter-bar regressions in calendar view and external feeds [#251] - #317

Merged
dgershman merged 1 commit into
mainfrom
feature/mayo-251-filters-display-options
Jul 29, 2026
Merged

Fix filter-bar regressions in calendar view and external feeds [#251]#317
dgershman merged 1 commit into
mainfrom
feature/mayo-251-filters-display-options

Conversation

@dgershman

Copy link
Copy Markdown
Contributor

Closes #251

Follow-up bug-fix pass on the display filters reported after the 1.9.0 feature shipped.

Fixes

1. Selecting a filter reset the calendar to the current month.
The activeFilters effect clears events and flips loading, which tripped the list-level loading && !events.length early return and unmounted CalendarView — remounting reset its internal month state back to today. Now:

  • CalendarView's displayed month is controlled by EventList's calendarDate (which is preserved across filter changes), so even a remount shows the navigated month.
  • The list-level loading/error/empty early returns no longer fire in calendar view (the calendar renders from its own calendarEvents / calendarLoading), so the calendar stays mounted and just shows its loading overlay while events refetch.

2. Filter dropdown didn't auto-close on selection.
Toggling a value now closes the panel, so it stops covering the calendar. Combined with a slightly reduced panel max-height, this addresses long Service Body / Category lists covering the first days of the calendar.

3. External feeds ignored the Event Type filter.
Only categories was re-applied locally on external events; event_type was forwarded but a remote on an older Mayo (before event_type filtering existed) or a non-Mayo feed ignores it and returns every type. Added local re-enforcement of event_type (mirroring the existing categories block, #292), so filtering on Service actually hides Activity events from external feeds. Empty filter = no constraint.

Testing

  • composer test — 550 tests pass (added 6 unit tests for the event_type matcher: include/exclude/mixed/empty).
  • npm run build — bundles compile.
  • Root-file PHPCS errors are pre-existing (unchanged with these changes stashed).

- Preserve the navigated month when a filter is selected in calendar
  view. CalendarView's month is now controlled by EventList's
  calendarDate (which survives filter changes), and the list-level
  loading/error/empty early returns no longer fire in calendar view,
  so the calendar is not unmounted-and-reset to today on each toggle.
- Auto-close the facet dropdown after a value is selected so long
  Service Body / Category lists stop covering the first calendar days;
  also trim the panel max-height.
- Re-enforce the event_type filter locally on external-feed events
  (mirrors the existing category enforcement). A remote on an older
  Mayo or a non-Mayo feed may ignore the forwarded param and return
  every type, so filtering on Service now actually hides Activity
  events from external feeds. Adds unit tests for the matcher.

🐦‍⬛ Generated with Claude Code, orchestrated by Crow

Co-Authored-By: Claude <noreply@anthropic.com>
Crow-Session: DA55342E-3D9A-4EB7-B980-B360EDA30629
@dgershman
dgershman merged commit 27b12c4 into main Jul 29, 2026
3 checks passed
@dgershman
dgershman deleted the feature/mayo-251-filters-display-options branch July 29, 2026 03:48
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.

Add Filters to display options

1 participant