Conversation
Contributor
Reviewer's GuideThe PR hardens controlled bottom-sheet backdrop closing against presentation/dismissal races by propagating provider-assigned sheet ids, isolating stale onClose callbacks, and making presentation and closing bookkeeping idempotent during rapid reopen and dismiss cycles. Sequence diagram for race-safe controlled bottom-sheet dismissalsequenceDiagram
participant Controlled as BottomSheetModalControlled
participant Provider as BottomSheetModalProvider
participant Sheet as BottomSheetBase
participant Parent as Parent
Controlled->>Provider: showBottomSheet(render, options)
Provider->>Sheet: present() once for id
Sheet-->>Controlled: render(closeSheet, id)
Controlled->>Controlled: activeSheetIdRef = id
alt isOpen flips false during presentation
Controlled->>Controlled: didQueueCloseRef = true
Controlled->>Provider: closeSheet()
Provider->>Sheet: dismiss() once for id
else backdrop closes active sheet
Sheet->>Provider: onDismiss(id)
Provider->>Controlled: onClose(id)
Controlled->>Parent: notify close
end
Sheet->>Provider: onDismiss(id)
Provider->>Controlled: onClose(id)
alt id is stale
Controlled->>Controlled: ignore superseded dismissal
else id is active
Controlled->>Controlled: clear active refs
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
🚀 Expo continuous deployment is ready for betterangels!
iOS Simulator Build: Simulator Build Link |
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.
RN BottomSheets don’t close when clicking backdrop
DEV-2541
Summary by Sourcery
Ensure bottom sheet backdrop and external dismissals close controlled sheets reliably without duplicate callbacks or stale-sheet interference.
Bug Fixes:
Enhancements:
Tests: