Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 18: clicking profile picture sometime does nothing #2370

Closed
Tracked by #2371 ...
jb55 opened this issue Aug 7, 2024 · 10 comments
Closed
Tracked by #2371 ...

iOS 18: clicking profile picture sometime does nothing #2370

jb55 opened this issue Aug 7, 2024 · 10 comments
Assignees
Labels
ios 18 regression Something that was working before now doesn't unexpected

Comments

@jb55
Copy link
Collaborator

jb55 commented Aug 7, 2024

Noticing this sometimes, its likey an iOS 18 issue

@jb55
Copy link
Collaborator Author

jb55 commented Aug 9, 2024

It seems this happens if there is no profile or no lightning address ?

@alltheseas
Copy link
Collaborator

I may have experienced this on iOS 17

@danieldaquino
Copy link
Contributor

This is still an issue on the official (non-beta) iOS 18.0 release

Device: iPhone 13 mini (physical device)
iOS: 18.0
Damus: Current tip of 1.10 dfa72fc

@alltheseas
Copy link
Collaborator

I've asked previously if anyone experiences a similar cannot tape on share note externally icon (bottom right of any note)

@alltheseas alltheseas added unexpected regression Something that was working before now doesn't labels Sep 19, 2024
@danieldaquino danieldaquino self-assigned this Sep 20, 2024
@danieldaquino
Copy link
Contributor

Looking into this

@danieldaquino
Copy link
Contributor

I traced back the issue to KFAnimatedImage. When I replace that with SwiftUI's AsyncImage the tap gesture is recognized. It seems like that view is not capturing tap gestures on iOS 18.

Very likely #2342 has the exact same root cause and fix

@danieldaquino
Copy link
Contributor

I tried updating Kingfisher (the library that defines KFAnimatedImage) to see if they have fixed this on their end:

  • The latest version of Kingfisher (8.0.2) is not compatible with our implementation (I won't try to fix compatibility issues yet to save time for the release)
  • The latest 7.x Kingfisher version (7.12.0) also has the same issue.

I will try implementing a quick solution on our end that should fix the issue while we don't fix this on the Kingfisher side

@danieldaquino
Copy link
Contributor

Implemented #2498 as a tentative PR which improves the iOS 18 situation. Not a final fix, but addresses this if we can't get a proper fix in on time.

@danieldaquino
Copy link
Contributor

I will keep investigating to find a better fix.

@danieldaquino
Copy link
Contributor

I created a minimal reproducible Xcode project that shows the issue is present on the latest Kingfisher version too (8.0.2).

Not actively debugging this right now, I am focusing on #2458

danieldaquino added a commit to danieldaquino/damus that referenced this issue Sep 21, 2024
The introduction of iOS 18 brought a new bug that made `KFAnimatedImage`
not recognize tap gestures and become unclickable. (onevcat/Kingfisher#2295)

This commit addresses the issue with a workaround found here:
onevcat/Kingfisher#2046 (comment)

The workaround was suggested by the author of the library to fix a
slightly different issue, but that property seems to work for our
purposes.

The issue is addressed by adding a `contentShape` property to usages
of `KFAnimatedImage`, in order to make them clickable. A custom modifier
was created to make the solution less obscure and more obvious.

Furthermore, one empty tap gesture handler was removed as it was
preventing other tap gesture handlers on the image carousel from being
triggered on iOS 18

Testing
-------

PASS

Configurations:
- iPhone 13 mini on iOS 18.0
- iPhone SE simulator on iOS 17.5
Damus: This commit
Coverage:
- Check that the following views are clickable:
    - Images in the carousel
    - Profile picture on notes
    - Profile picture on thread comments
    - Profile picture on profile page

Changelog-Fixed: Fix items that became unclickable on iOS 18
Closes: damus-io#2342
Closes: damus-io#2370
Signed-off-by: Daniel D’Aquino <[email protected]>
@jb55 jb55 closed this as completed in 823c256 Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ios 18 regression Something that was working before now doesn't unexpected
Projects
Archived in project
Development

No branches or pull requests

3 participants