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

Fix reaction author's view with shrinked reaction images in iOS 18 #3568

Merged

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Jan 22, 2025

🔗 Issue Links

Resolves https://linear.app/stream/issue/IOS-652/[uikit]-reaction-icons-have-invalid-size-in-reactions-overlay

🎯 Goal

Fixes reaction author's view with shrinked reaction images introduced on iOS 18.

We did not spot the bug when re-recording iOS 18 snapshots here: #3509

🛠 Implementation

The root of the issue is that on iOS 18, the Button.image.size is nil in the ChatMessageReactionItemView.intrinsicContentSize when it is inside the reaction author cell view. The best way I found to fix the issue without breaking changes is to provide a default size instead of super.intrinsicContentSize in case the image does not have any size.

🧪 Manual Testing Notes

It is not necessary to do manual tests since it is covered by snapshots.

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@nuno-vieira nuno-vieira added the 🐞 Bug An issue or PR related to a bug label Jan 22, 2025
@nuno-vieira nuno-vieira requested a review from a team as a code owner January 22, 2025 16:26
@Stream-SDK-Bot
Copy link
Collaborator

SDK Performance

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 3.34 ms 66.6% 🔼 🟢
Duration 2.6 s 2.55 s 1.92% 🔼 🟢
Hitch time ratio 4 ms per s 1.31 ms per s 67.25% 🔼 🟢
Frame rate 75 fps 77.93 fps 3.91% 🔼 🟢
Number of hitches 1 0.4 60.0% 🔼 🟢

Copy link
Contributor

@testableapple testableapple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Jan 22, 2025

SDK Size

title develop branch diff status
StreamChat 7.02 MB 7.02 MB 0 KB 🟢
StreamChatUI 4.77 MB 4.77 MB 0 KB 🟢

@nuno-vieira nuno-vieira merged commit 596e9a6 into develop Jan 23, 2025
4 checks passed
@nuno-vieira nuno-vieira deleted the fix/iOS-18-reaction-author-views-with-shrinked-images branch January 23, 2025 12:21
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug An issue or PR related to a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants