Conversation
GitchalWoo
left a comment
There was a problem hiding this comment.
Two more things:
BottomSheet creates PanResponder in useRef with closure over SHEET_MAX_HEIGHT
SHEET_MAX_HEIGHT is derived from the snapHeight prop, but PanResponder.create() captures it in a closure at initial render only. If snapHeight changes, the PanResponder will use a stale value. This is a functional bug — consider recreating the pan responder when snapHeight changes, or using a useRef for the computed height.
Missing testID props
Per CONVENTIONS.md: "Add testID props for E2E testing."
BottomSheet.tsx — no testID on Modal, Pressable backdrop, or Animated.View
CreateChatModal.tsx — no testID on any interactive element (buttons, input, touchables)
CreateChatButton.tsx — the existing button still has no testID
Added ref for SHEET_MAX_HEIGHT, although it is not really an issue and would not cause a bug. Because the only time this value could change, is when user opens this screen on device with different dimensions, or when we create another bottom sheet on another screen and may give different snapHeight. Either way, this value will always be same on the same screen on the same device. But for the peace of mind, I have added ref and replaced where necessary. Added testID to the instance of in CreateChatModal.tsx, added testID to the button as well. |
Merging locally to ensure no conflicts
Adding Bottom Sheet custom component:
NOTE: contents of file CreateChatModal.tsx are placeholder! A lot of it will be replaced, it was just there to verify that steps in "wizard" behave as expected
Screenshots