fix: unstick the blur and touches after taking a profile photo on iOS - #341
Merged
Conversation
The backdrop blur set by ExpandedPhotoOverlay is global state cleared only by the DisposableEffect's onDispose inside the dialog's composition. On iOS devices, pushing the crop route right after the camera dismissal leaks that dialog composition, so the blur stayed on over the crop screen. WindowContentBlurEffect now also observes the nav entry's Lifecycle, which is driven from the main composition: ON_STOP / ON_DESTROY force the radius back to zero (and ON_START restores it), so the blur follows the back stack even if the dialog composition is never disposed. Also restores the launch feedback lost with the old hand-rolled camera picker: a scrim with a spinner shows from the camera tap until FileKit delivers a result, and the pickers now use the onError overload so a picker failure can't leave the overlay stuck. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
FileKit 0.15 presents the camera from the top-most view controller, which on CMP 1.11 sits below the Compose dialog window; after the picker dismissal, touch handling on the underlying screen was corrupted app-wide — the problem the pre-0.15 hand-rolled picker avoided. The iOS picker now reuses that proven presentation recipe through FileKit's own hook: FileKitOpenCameraSettings(presenter) points at the root view controller of a dedicated transparent UIWindow made key above alerts, attached at launch and detached (restoring the previous key window) when the result or an error arrives. FileKit still owns all the picker mechanics. Also composes ProfilePhotoPickers after the overlay/sheet content so the camera-launch spinner draws on top of it instead of behind it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
Author
|
Lets keep an eye in vinceglb/FileKit#639 it is related to this one |
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.
Fixes three problems in the profile photo camera flow on iOS, all rooted in how Compose Multiplatform 1.11 hosts dialogs in their own window above modal view controllers:
Crop screen stayed blurred. The backdrop blur set by the expanded photo overlay is global state that was cleared only by
onDisposeinside the dialog's composition. On real devices (never reproducible in the simulator), pushing the crop route right after the camera dismissal leaks that dialog composition, so the blur stayed on over the crop screen.WindowContentBlurEffectnow also observes the nav entry'sLifecycle, which is driven from the main composition: ON_STOP/ON_DESTROY force the radius back to zero and ON_START restores it, so the blur follows the back stack even if the dialog composition is never disposed. This also makes the blur behave correctly across backgrounding.Taps stopped working after closing the photo dialogs. FileKit presents the camera from the top-most view controller, which on CMP 1.11 sits below the Compose dialog window — the exact scenario that corrupted touch handling app-wide after dismissal and that the pre-0.15 hand-rolled picker (feature: edit profile name and photo #281) worked around. The picker now reuses that proven presentation recipe through FileKit's own hook:
FileKitOpenCameraSettings(presenter)points at the root view controller of a dedicated transparentUIWindowmade key above alerts, attached at launch and detached (restoring the previous key window) when the result or an error arrives. FileKit still owns all the picker mechanics, including the deliver-after-dismissal fix from 🐛 [iOS] Deliver camera result after dismissal and encode JPEG off the main thread vinceglb/FileKit#619.No feedback while the camera opens. The old workaround's spinner was lost in chore: bump FileKit to 0.15.0 and drop the iOS camera workaround #340. A scrim with a spinner now shows from the camera tap until FileKit delivers a result, composed after the overlay/sheet content so it draws on top, and the pickers use the
onErroroverload so a picker failure can't leave it stuck.Verified on a physical iPhone: crop opens sharp after taking a photo, taps keep working after closing the dialogs, the spinner shows while the camera opens, and the gallery path is unaffected. Release notes updated in the 2.5.0 slot for the three languages.
🤖 Generated with Claude Code