Fix overflowing schedule detail bottom sheet#85
Conversation
- 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
|
Warning Review limit reached
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 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesDraggable bottom sheet for schedule entry detail
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
- 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
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
docs/solutions/ui-bugs/schedule-detail-bottom-sheet-overflow-20260624.mdis excluded by!**/*.md
📒 Files selected for processing (2)
lib/schedule/ui/weeklyschedule/schedule_entry_detail_bottom_sheet.darttest/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
|
@codex review |
There was a problem hiding this comment.
💡 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".
| await _controller.animateTo( | ||
| target, | ||
| duration: _snapDuration, | ||
| curve: _snapCurve, | ||
| ); |
There was a problem hiding this comment.
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
Summary
DraggableScrollableSheet.isScrollControlledfor the modal bottom sheet.docs/solutions/ui-bugs/schedule-detail-bottom-sheet-overflow-20260624.md.Testing
flutter test test/schedule/ui/weeklyschedule/schedule_entry_detail_bottom_sheet_test.dartdetailscontent no longer triggers a bottom overflow.Summary by CodeRabbit
New Features
Bug Fixes
Tests