Repository navigation
fix: accept the iOS sheet keywords on cupertino_bottom_sheet - #33
Merged
Merged
Conversation
The legacy cupertino_bottom_sheet spelling rejected draggable, dismissible, fullscreen, scrollable, show_drag_handle, use_safe_area, maintain_bottom_view_insets_padding, size_constraints and barrier_color, which the canonical bottom_sheet contract already accepts and the iOS renderer now honors. None of them gets a Ruby default, so the renderer can derive draggable from fullscreen.
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.
Engine counterpart (renderer fix): AdamMusa/ruflet-engine#17
Item D1 (P0), keyword parity. The canonical
bottom_sheetcontract (PlatformControlContracts::Components::BottomSheetControl) already accepted every iOS sheet keyword. The deprecatedcupertino_bottom_sheetspelling rejected most of them withArgumentError.Change
controls/cupertinos/cupertinobottomsheet_control.rbnow accepts:barrier_color dismissible draggable fullscreen maintain_bottom_view_insets_padding scrollable show_drag_handle size_constraints use_safe_area(alphabetical ininitialize, copied only when non-nil).None of them gets a Ruby default. This matters for
draggable: the iOS renderer derives its default fromfullscreen(decision D-8, page sheets drag and popups do not). Material-only keys (elevation shape clip_behavior animation_style) are still rejected on the Cupertino spelling, because the iOS renderer ignores them.Wire keys: unchanged (Ruby keyword = wire key). Event:
on_dismiss→"dismiss", unchanged.Material vs Cupertino (rendered by the engine PR)
systemBackgroundsurface with optional grabber, safe area, keyboard lift, 9/16 or scrollable sizing,size_constraints/height/padding, and drag-to-dismiss whendraggable.fullscreen: trueopens the native stacked page sheet, which drags by default.showModalBottomSheet, unchanged.Usage
Tests
test/cupertino_bottom_sheet_compatibility_test.rb, with 5 new tests:cupertino_bottom_sheetbottom_sheetnorcupertino_bottom_sheetsends a default for these keysbottom_sheetserializesbgcolor height padding fullscreen show_drag_handleelevationis rejected on the Cupertino spellingBefore the change: 1 failure and 1 error. After it: 9 runs, 138 assertions, 0 failures.
verify_pr.sh(Ruby 4.0.5 + Flutter 3.41.2, against the engine PR):