Skip to content

Fix overflowing schedule detail bottom sheet#85

Merged
FarisZR merged 4 commits into
v2from
synara/fix-lesson-overflow-expandable-sheet
Jun 24, 2026
Merged

Fix overflowing schedule detail bottom sheet#85
FarisZR merged 4 commits into
v2from
synara/fix-lesson-overflow-expandable-sheet

Conversation

@FarisZR

@FarisZR FarisZR commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaced the fixed-height schedule entry detail sheet with an expandable DraggableScrollableSheet.
  • Made the sheet content scrollable and enabled isScrollControlled for the modal bottom sheet.
  • Added widget coverage for overflow prevention, expandability, and rendering of core lesson details.
  • Documented the issue and fix in docs/solutions/ui-bugs/schedule-detail-bottom-sheet-overflow-20260624.md.

Testing

  • flutter test test/schedule/ui/weeklyschedule/schedule_entry_detail_bottom_sheet_test.dart
  • Verified long details content no longer triggers a bottom overflow.
  • Verified the sheet can drag upward and expands beyond its initial size.
  • Verified title, professor, room, and details render for a normal entry.

Summary by CodeRabbit

  • New Features

    • Schedule entry details now open in a draggable, scrollable bottom sheet with snapping between expanded sizes.
    • Improved presentation of entry timing and metadata, including better handling for long content.
  • Bug Fixes

    • Bottom sheet is now scroll-controlled for more consistent interaction.
    • Added snap-to-stops behavior with selection haptics, and improved long “details” rendering to prevent overflow.
  • Tests

    • Added widget tests covering sheet display, snap/dismiss behavior, haptics, and key visible fields (title, professor, details).

- Make the lesson detail bottom sheet draggable and scrollable
- Allow modal sheets to expand for long lesson details
- Add regression tests for overflow and expansion
Copilot AI review requested due to automatic review settings June 24, 2026 08:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@FarisZR, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 9 minutes and 21 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ca6ee252-0fc5-4f9d-8a3b-8d11803efca5

📥 Commits

Reviewing files that changed from the base of the PR and between ea6c1ec and 58d4326.

⛔ Files ignored due to path filters (1)
  • docs/solutions/ui-bugs/schedule-detail-bottom-sheet-overflow-20260624.md is excluded by !**/*.md
📒 Files selected for processing (2)
  • lib/schedule/ui/weeklyschedule/schedule_entry_detail_bottom_sheet.dart
  • test/schedule/ui/weeklyschedule/schedule_entry_detail_bottom_sheet_test.dart
📝 Walkthrough

Walkthrough

ScheduleEntryDetailBottomSheet now uses a stateful draggable sheet with manual snap stops and extracted content rendering. WeeklySchedulePage enables scroll-controlled modal presentation. A new widget test suite covers the sheet structure, snap behavior, dismissal, and displayed fields.

Changes

Draggable bottom sheet for schedule entry detail

Layer / File(s) Summary
Manual snap control
lib/schedule/ui/weeklyschedule/schedule_entry_detail_bottom_sheet.dart
Adds controller-backed snap stop thresholds, target-stop selection, scroll-end snapping, and selection haptic feedback.
Draggable sheet rendering and content
lib/schedule/ui/weeklyschedule/schedule_entry_detail_bottom_sheet.dart, lib/schedule/ui/weeklyschedule/weekly_schedule_page.dart
Replaces the fixed-height body with a DraggableScrollableSheet and scrollable content, extracts _buildContent() for the schedule-entry layout, and sets isScrollControlled: true in the sheet caller.
Widget tests for sheet behavior
test/schedule/ui/weeklyschedule/schedule_entry_detail_bottom_sheet_test.dart
Adds widget tests for sheet structure, drag snapping, dismissal, overflow handling, haptic triggering, and displayed entry fields.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing overflow in the schedule detail bottom sheet.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch synara/fix-lesson-overflow-expandable-sheet
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch synara/fix-lesson-overflow-expandable-sheet

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Replace fixed sheet with a draggable, manually snapped bottom sheet
- Add haptic feedback and tests for expand, snap, and dismiss behavior
- Document the overflow fix and motion rationale

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@test/schedule/ui/weeklyschedule/schedule_entry_detail_bottom_sheet_test.dart`:
- Around line 72-116: The two drag-snap tests are hardcoding sheet sizes that
duplicate the private snap settings in _SnapSheetState. Update the assertions in
the partial upward and downward drag cases to derive the expected values from
the DraggableScrollableSheet configuration, using the same pattern as the
existing config test and referencing the sheet’s maxChildSize and
initialChildSize instead of literal 0.9 and 0.4. This keeps the tests aligned
with the widget contract if the snap sizes change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4e09147b-e2b4-4d6d-b881-d6694af4d263

📥 Commits

Reviewing files that changed from the base of the PR and between 32fc086 and ea6c1ec.

⛔ Files ignored due to path filters (1)
  • docs/solutions/ui-bugs/schedule-detail-bottom-sheet-overflow-20260624.md is excluded by !**/*.md
📒 Files selected for processing (2)
  • lib/schedule/ui/weeklyschedule/schedule_entry_detail_bottom_sheet.dart
  • test/schedule/ui/weeklyschedule/schedule_entry_detail_bottom_sheet_test.dart

- Limit the detail sheet to standard and expanded settle states
- Fire selection haptics on arrival, including manual drags
- Update tests and overflow fix notes
@FarisZR

FarisZR commented Jun 24, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cad9b0d983

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +112 to +116
await _controller.animateTo(
target,
duration: _snapDuration,
curve: _snapCurve,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clear the snap guard when animations are interrupted

When the user touches or drags the sheet during the 200 ms snap, Flutter interrupts DraggableScrollableController.animateTo; that path is backed by an AnimationController future that can remain pending when canceled, so this await may never reach the finally that clears _isSnapping. After one interrupted snap, _onScrollEnd keeps ignoring later releases and the sheet stops snapping until it is reopened, so the guard needs to be reset from a cancellation-safe path rather than only after this await completes.

Useful? React with 👍 / 👎.

- Clear the snap guard on settle and drag start so interrupted snaps recover
- Add regression coverage for mid-snap interruption and align tests with sheet sizing
@FarisZR FarisZR merged commit d20b7ac into v2 Jun 24, 2026
2 checks passed
@FarisZR FarisZR deleted the synara/fix-lesson-overflow-expandable-sheet branch June 24, 2026 18:00
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