fix: switch activity picker to native iOS sheet behavior#84
fix: switch activity picker to native iOS sheet behavior#84thisislvca wants to merge 8 commits intokingstinct:mainfrom
Conversation
|
@robertherber lmk if you need me to make any changes, it'd be smart to add the table in this PR to the README.md too in my opinion, happy to do so if you agree :) I'm also working on the reporting feature, will PR tomorrow once I'm happy with the code quality. |
|
Awesome, thanks for digging into this! We had this initially as the only option in the library. The reason I switched it was to make it easy to create your own UI around the system view. Both for customizability and being able to provide a fallback view when the native view crashes. Could you add it as a separate view here to keep the flexibility, and preferably keep both implementations in the example? I'd be happy to merge that! :) |
Fix a pre-existing bug in the example app where tapping "Select apps" inside the Create Activity modal did not open the picker flow.
Align example UI wording with the split component model (Sheet View vs Selection View) to avoid implying the custom path is deprecated.
|
Should be good now. I also fixed a small bug in the example app where the Create Activity picker didn't work, which was introduced back in 2024 :) |
commit: |
robertherber
left a comment
There was a problem hiding this comment.
Looks great - thanks! 👍 Only thing is I think we need to keep isUserInteractionEnabled to allow interactions with the fallback error view
packages/react-native-device-activity/ios/ReactNativeDeviceActivityViewPersisted.swift
Show resolved
Hide resolved
|
shoot my bad, totally missed that part |
This PR updates picker presentation by introducing dedicated sheet components while keeping the existing customizable selection view path.
Main changes:
DeviceActivitySelectionViewDeviceActivitySelectionViewPersistedDeviceActivitySelectionSheetViewDeviceActivitySelectionSheetViewPersisted.familyActivityPicker(isPresented:), Cancel/Done, parent/child VC wiring) behind the new sheet components.systemGroupedBackgroundso the presented sheet matches system visuals.Why
The native sheet UX is better for standard iOS behavior, but the customizable selection view path is still useful for custom presentation and fallback handling.
This keeps both paths first-class and explicit.
API impact
No breaking changes.
Added components:
DeviceActivitySelectionSheetViewDeviceActivitySelectionSheetViewPersistedNotes:
DeviceActivitySelectionView*remain the customizable inline/custom-wrapper components.onDismissRequestis available on the new sheet components.Screenshots
Validation
bun run pre-push(typecheck/lint/SwiftLint strict).