Skip to content

feat: filter timetable nav and warn on export#72

Merged
condyl merged 3 commits intomasterfrom
cb/filter-timetable-nav-warn-export
Jan 18, 2026
Merged

feat: filter timetable nav and warn on export#72
condyl merged 3 commits intomasterfrom
cb/filter-timetable-nav-warn-export

Conversation

@condyl
Copy link
Copy Markdown
Collaborator

@condyl condyl commented Jan 11, 2026

Closes #35, #77

This pull request refactors the calendar view and timetable filtering logic to improve how visible timetables are determined and displayed based on the current calendar view range. It removes the old duration change and pinning logic, introduces a new approach for filtering and deduplicating timetables by visible date range, and simplifies related state management throughout the calendar component.

Timetable Filtering and Calendar View Improvements:

  • Added viewRange state and a handleDatesSet callback to CalendarComponent.jsx to track the currently visible calendar date range and trigger updates when the view changes.
  • Introduced getVisibleTimetables and related helper functions to filter and deduplicate timetables based on the visible date range, replacing the previous duration-based logic. Now, only unique timetables relevant to the visible range are shown.
  • Updated all relevant usages in CalendarComponent.jsx to use visibleTimetables instead of the full timetables array, ensuring the UI and navigation only operate on filtered timetables.

Removal of Old Duration/Pinning Logic:

  • Removed handleDurationChange, previousDuration, and aprioriDurationTimetable logic from both the calendar view and timetable management hooks, as this is now handled by the new visible timetable logic.

FullCalendar Integration:

  • Passed the new handleDatesSet callback to the FullCalendar config to update the view range whenever the calendar view changes.

These changes make the calendar more responsive to the current view, ensure only relevant and unique timetable options are presented, and remove complex, error-prone state related to duration and component pinning.

@condyl condyl requested a review from OhNoBigO January 11, 2026 03:46
@condyl condyl merged commit 76f2f0c into master Jan 18, 2026
3 checks passed
@condyl condyl deleted the cb/filter-timetable-nav-warn-export branch March 16, 2026 20:47
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.

Rework automatic course pinning when switching durations

1 participant