feat: filter timetable nav and warn on export#72
Merged
Conversation
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.
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:
viewRangestate and ahandleDatesSetcallback toCalendarComponent.jsxto track the currently visible calendar date range and trigger updates when the view changes.getVisibleTimetablesand 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.CalendarComponent.jsxto usevisibleTimetablesinstead of the fulltimetablesarray, ensuring the UI and navigation only operate on filtered timetables.Removal of Old Duration/Pinning Logic:
handleDurationChange,previousDuration, andaprioriDurationTimetablelogic from both the calendar view and timetable management hooks, as this is now handled by the new visible timetable logic.FullCalendar Integration:
handleDatesSetcallback 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.