fix: resolve review comments on Drawer native implementation - #3754
Draft
rzp-slash-public[bot] wants to merge 16 commits into
Draft
fix: resolve review comments on Drawer native implementation#3754rzp-slash-public[bot] wants to merge 16 commits into
rzp-slash-public[bot] wants to merge 16 commits into
Conversation
Implements .native.tsx files for the Drawer component, replacing the stub implementations with real native rendering using styled-components/native and react-native-reanimated. - Add AnimatedDrawerContainer.native.tsx (reanimated slide-in/overlay) - Implement Drawer.native.tsx via conditional @gorhom/portal mount (mirrors the working Popover/Tooltip native pattern) - Implement DrawerSubcomponents.native.tsx (header/body) - Register a BladeBottomSheetPortal PortalHost in the RN Storybook preview so portal-based components render in Storybook, and add flex:1 sizing - Fix invalid bare string children in Drawer.stories.tsx (native crash) - Add native tests + snapshot Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
- Remove empty noop arrow function, guard onExitComplete call directly - Rename unused isLazy to ignoredIsLazy to satisfy no-unused-vars rule Co-authored-by: admin <admin>
Co-authored-by: admin <admin>
…een width [resolved by agent] Co-authored-by: admin <admin>
- Initialize the surface shared values at the closed/off-screen state so the slide-in has a frame to animate from (enter was snapping into place) - Mirror web's Drawer transition timings (xmoderate/entrance, moderate/exit) - Use Dimensions.get for screen width and a noop exit callback fallback - Refine DrawerSubcomponents native layout and update the Drawer stories - Regenerate Drawer native snapshots Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: admin <admin>
- Add closeButtonRef useRef and include it in DrawerContext - Fall back to closeButtonRef when focusing on open - Honor isLazy: initialize isMounted with isOpen || !isLazy - Guard onUnmount behind hasEverOpenedRef - Update isLazy test for web parity
… typo [resolved by agent] Co-authored-by: admin <admin>
Co-authored-by: admin <admin>
Co-authored-by: admin <admin>
Resolve comment conflict in RN Storybook preview to mention both Drawer and BottomSheet portal content. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve Storybook preview comment conflict keeping Drawer, BottomSheet, and DatePicker mentions. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # packages/blade/.storybook/react-native/preview.tsx
…d by agent] Co-authored-by: admin <admin>
🦋 Changeset detectedLatest commit: 5b39742 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Summary
Resolves the following review comments from PR #3645:
[MAJOR] onExitComplete stale closure (
AnimatedDrawerContainer.native.tsx): StoredonExitCompletein a ref (onExitCompleteRef) so the reanimatedwithTimingcallback always invokes the latest identity without re-triggering the animation.[MINOR] screenWidth stale on rotation/resize (
AnimatedDrawerContainer.native.tsx): ReplacedDimensions.get('window').widthwith the reactiveuseWindowDimensions()hook soscreenWidthupdates on device rotation or multitasking resize.[MINOR] z-index useEffect missing stackingLevel dep (
Drawer.native.tsx): AddedstackingLevelto the dependency array of the z-indexuseEffectso the z-index updates when the drawer stack changes.[MINOR] HSL color parsing guard (
DrawerSubcomponents.native.tsx): Guarded theopaqueColortransform so thehslatohsl+ alpha removal only applies when the regex match succeeds; otherwisesubtleColoris used as-is.[MINOR] Native Drawer missing forwardRef (
Drawer.native.tsx): Wrapped_DrawerinReact.forwardRefand attached the ref toAnimatedDrawerContainer'sStyledDrawerWrapper, matching the web component's ref forwarding pattern.[resolved by agent]
Generated with Claude Code
Co-authored-by: admin