Feat/centered presentation - #4
Merged
Merged
Conversation
added 12 commits
July 9, 2026 14:28
Also fix jest.setup.js: mark the @gorhom/portal mock virtual since the package is not a project dependency, which was breaking every test.
- plumb presentationStyle/centerAnimation strings SheetView.mm -> HostFittedSheet -> SheetOptions - center the card via centerY constraint; force modal path (center ignores inline) - widen tap-to-dismiss to the whole screen minus the card - translation-based pan-down-to-dismiss for centered mode - fade+scale or slide enter; dismiss slides fully off the bottom with dim fading in sync
- route every dismiss path (swipe, tap-outside, programmatic) through the custom slide-off + dim fade and disable the window exit animation (no flicker; parity with iOS); single teardown via setOnDismissListener so onDismiss always fires once - skip the RN view's translationX centering in centered mode (the FrameLayout centers the card) so it no longer double-shifts to the right in landscape
When the sheet is narrower than the screen (maxWidth / landscape) and sits at the bottom horizontally centered, tapping the dim strips beside the card did not dismiss it — only taps above the card did. - iOS: overlayTapView now covers the whole screen (not just above the card) and the card is brought to front, so taps anywhere but the card dismiss. - Android: the full-width design_bottom_sheet no longer swallows every touch; a tap landing outside the card's on-screen bounds cancels the dialog. Bump version to 7.10.1.
The width constraint is only created in addContentView() when options.maxWidth is non-nil (SheetOptions maps maxWidth == 0 -> nil). But setFittedSheetParams calls updateMaxWidth on every Fabric prop update (sheetMaxWidthSize defaults to 0), which force-unwrapped the never-initialized IUO constraint and crashed on the main thread. Make the constraint a real optional and access it via ?. so the update is a no-op when no max width was configured. Bump 7.10.1 -> 7.10.2.
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.