feat: add onRequestClose to ModalBottomSheet - #70
Draft
DanyKrk wants to merge 38 commits into
Draft
Conversation
Register Back and Escape handlers lazily when onRequestClose is first provided, then preserve their ordering by toggling eligibility instead of re-registering them. Reset registrations at structural host boundaries and add coverage for lifecycle changes, multiple sheets, predictive Back, and handler removal.
Supersede unfinished presses on a new initial key-down and retain short-lived tombstones so late events cannot finish the replacement.
Publish portal ownership and emission eligibility as a single state snapshot. Keep handlers stable while inactive portals yield new Back and Escape requests without retargeting input already in progress. Expand lifecycle, ownership, and controlled-dismissal coverage and update docs.
- remove redundant request-close handling updates - replace reflection-based assertions with explicit test snapshots - focus Robolectric coverage on platform-specific SDK paths - simplify bottom sheet rendering
…andler Forward Back to the host Activity and leave Escape in normal key routing when onRequestClose is omitted. Keep predictive Back actions pinned for the full gesture and ignore commits delivered after overlay teardown. Expand unit and instrumented coverage and update docs and examples.
Keep eligibility loss terminal for the current Escape sequence, even if the handler or modal state is restored before key-up. Reuse the shared dispatcher state for portal and native-overlay handling.
Keep portal and native-overlay presentations as close-input boundaries while visible close animations settle, consuming Back and Escape without emitting another onRequestClose. Unify request, consume, and pass-through transport states, stabilize predictive Back handling, and update tests, examples, and documentation.
DanyKrk
force-pushed
the
onRequestClose
branch
from
August 20, 2026 17:26
f1db99f to
4ec0487
Compare
DanyKrk
marked this pull request as draft
August 20, 2026 17:31
DanyKrk
force-pushed
the
onRequestClose
branch
from
August 24, 2026 13:41
bad433c to
8eebf23
Compare
- track closing presentation through a production state tracker - verify controllers through observable input routing and window flags - cover close-animation ownership with an instrumentation test
Rename request-close state, routing, lifecycle, and presentation symbols to reflect their actual responsibilities. Align the native bridge, tests, and documentation with the updated terminology.
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.
No description provided.