iOS: time picker for reminder is buggy #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The way we handle onChange events works on Android but causes the iOS picker to be dismissed on the first drag. We'll fix this by making our own JS picker component and removing the community package.
Hey @claude make one that looks like the native iOS time picker but.. don't over-do it. Keep it simple and make sure you give tiny haptics on the drag just like the native ones. Again, it shouldn't look like an iOS rip-off. I attached an image I hope you can see it. This is a sketch of how i'd like it to be, Go ahead
Pushed to
claude/ios-time-picker-fix.Summary
Replaced
@react-native-community/datetimepickerwith a custom in-house time picker to fix the iOS dismiss-on-first-drag bug.What changed:
src/components/WheelPicker.tsx(new): a reusable vertical wheel column built onreact-native-reanimated+ a plainScrollViewwithsnapToInterval. Items fade/scale by distance from center, and a tiny selection haptic fires each time the centered value changes while scrolling — mirroring the native tick feel without copying iOS's chrome.src/features/settings/TimePickerModal.tsx(new): the reminder-time modal, using the app's existing centered-card modal style (matchesLogDeedModal/SettingsOptionModalconventions) with an hours/minutes wheel pair, a shared highlight bar, and Cancel/Done actions.src/screens/NotificationsScreen.tsx: swapped the communityDateTimePickerforTimePickerModal.src/core/utils/haptics.ts: addedtriggerSelectionHaptic(wrapsHaptics.selectionAsync(), respecting the existing haptics setting).package.json/package-lock.json/app.json: removed the@react-native-community/datetimepickerdependency and its Expo config plugin entry.settings.donei18n string (en/ar).Verified with
tsc --noEmit,expo lint, andprettier --check— all clean. I didn't have a way to run the actual iOS app in this CI environment, so the interaction should be manually verified on-device, but the drag-dismiss bug can no longer occur since the community picker is gone entirely.One note: the issue included a sketch image attachment that I couldn't view from this environment, so the visual design (wheel columns with a single highlight bar, colon separator, simple fades) is my best interpretation of "looks native but simple, not a rip-off" rather than a pixel match to that sketch — worth a visual check against the original sketch before merging.
Nice, @claude
PR #12 created successfully: #12
Summary
Pushed a fix to
claude/ios-time-picker-fixand opened PR #12: #12Root cause of "can't scroll at all":
TimePickerModalwrapped the card in a nestedTouchableWithoutFeedbackwhose only job was to stop backdrop-dismiss taps from bubbling up. That put the wheel-pickerScrollViews inside aTouchable's responder subtree — on iOS, that ancestor Touchable claims the touch responder on touch-down before the ScrollView's native pan gesture recognizer gets a chance to activate, so the wheels never received any drag at all (not just a first-drag dismiss).Fix: replaced the nested
TouchableWithoutFeedbackwrapper with aPressablebackdrop that's a sibling of the card (absolutely positioned behind it) instead of an ancestor. The card and itsWheelPickers are no longer inside any touch-consuming parent, so drags reach the ScrollView directly.Verified
tsc --noEmit,expo lint, andprettier --checkall pass. I still don't have a real iOS device in this CI environment, so please give the drag feel and haptics a manual check on-device before merging.