feat: add vertical week mode to WeekView for improved layout and scroll#546
Open
kavantrivedi wants to merge 1 commit into
Open
feat: add vertical week mode to WeekView for improved layout and scroll#546kavantrivedi wants to merge 1 commit into
kavantrivedi wants to merge 1 commit into
Conversation
738d476 to
1f8bf88
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new verticalWeek layout mode to WeekView (days fixed on the left, hours scrolling horizontally, weeks paging vertically) and a parallel verticalMonth mode to MonthView. The example app and a single widget test are updated to demonstrate/verify the new modes, and unrelated improvements are added to the example's add-event form (start/end-time validation and keeping single-day events aligned when the start date changes).
Changes:
- Introduce
WeekViewModeandMonthViewModeenums and propagate the new mode throughWeekView/MonthView(page scroll axis, boundary drag detection, and a substantial new_buildVerticalWeekModerendering path inInternalWeekViewPage). - Update example widgets/pages to opt into the new vertical modes and add a
weekTitleHeighttweak. - Add
add_event_formvalidation for incomplete/invalid start/end times and align end date when only the start date is changed; addweek_view_vertical_mode_test.dart.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/src/week_view/week_view.dart | Adds WeekViewMode enum, exposes weekViewMode, switches PageView axis, and adjusts page sizing for vertical mode. |
| lib/src/week_view/_internal_week_view_page.dart | Adds full vertical-week rendering path: weekday/full-day columns, hour markers, day rows, live indicators, timeline band, and a compact event tile. |
| lib/src/month_view/month_view.dart | Adds MonthViewMode enum and monthViewMode field; renames onHorizontalDragEnd to _onBoundaryDragEnd and supports vertical boundary drag detection. |
| example/lib/widgets/week_view_widget.dart | Plumbs enableVerticalWeekMode and bumps weekTitleHeight. |
| example/lib/widgets/month_view_widget.dart | Plumbs enableVerticalMonthMode to MonthView. |
| example/lib/widgets/calendar_views.dart | Enables vertical modes by default in the demo. |
| example/lib/pages/week_view_page.dart | Enables vertical week mode in the week-view demo page. |
| example/lib/widgets/add_event_form.dart | Adds start/end-time presence and ordering validation; aligns end date with start date for single-day non-recurring events. |
| test/week_view_vertical_mode_test.dart | New widget test asserting page scroll axis and presence of horizontal scroll view in vertical mode. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1f8bf88 to
3746f5f
Compare
3746f5f to
0b8cb30
Compare
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.
Description
This pull request introduces significant enhancements to the calendar view widgets, adding vertical scrolling modes for both month and week views, improving event form validation, and updating the example app to showcase these features. The changes are grouped below by theme.
Vertical Scrolling Modes for Calendar Views
MonthViewModeandWeekViewModeenums to control the scroll direction and layout behavior forMonthViewandWeekViewwidgets, enabling both standard (horizontal) and vertical modes. [1] [2]MonthViewandWeekViewto accept new mode parameters, and adjusted their internal logic to handle vertical page scrolling and layout accordingly. This includes dynamic setting ofPageViewscroll direction and drag gesture handling. [1] [2] [3] [4] [5] [6] [7] [8] [9]Example App Updates
enableVerticalMonthModeandenableVerticalWeekModeflags to the respective widgets, and updated the UI to reflect the new behaviors. [1] [2] [3] [4] [5] [6] [7]titleStylefor demonstration in the home page.Event Form Validation Improvements
SnackBar.Testing
week_view_vertical_mode_test.dartto verify correct behavior of the new vertical mode inWeekView, ensuring scroll direction and layout are as expected.…llingChecklist
fix:,feat:,docs:etc).docsand added dartdoc comments with///.examplesordocs.Breaking Change?
Related Issues
#222