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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIS-1207, CIS-1232] Fix crash and swapping the long-pressed message on ChatMessagePopupVC #1596

Merged
merged 1 commit into from Nov 3, 2021

Conversation

evsaev
Copy link
Contributor

@evsaev evsaev commented Nov 3, 2021

馃敆 Issue Link

CIS-1207, CIS-1232

馃幆 Goal

  • Fix crash when ChatMessagePopupVC is dismissed when the message is outside the visible area of the message list
  • Fix behavior when a long-pressed message is swapped with a newly received message when they have the same style

馃洜 Implementation

Stop passing ChatMessageContentView across the message list and pop-up view hierarchies and pass the copy instead.

Therefore, the following subviews are removed from MessageActionsTransitionController:

  • messageContentViewFrame
  • messageContentViewActivateConstraints
  • messageContentViewDeactivateConstraints
  • messageContentView
  • messageContentViewSuperview
  • mainContainerTopAnchor

馃И Testing

Manual testing:

  • Launch DemoApp on 2 devices
  • Sign in as Luke and Leia
  • Open the channel where both users are members
  • Send text message as Luke, observe the message received by Leia
  • Long press the message by Leia
  • Send another text message as Luke

Expected result:
The message long-pressed by Leia is not swapped with the new message

馃帹 Changes

The message inside the pop-up is not swapped:

no-swap.mov

When the pop-up is shown giffy restarts but plays smoothly because the actual view is used while the transition and not the snapshot:

smooth.gif.mp4

鈽戯笍 Checklist

  • I have signed the Stream CLA (required)
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Affected documentation updated (docusaurus, tutorial, CMS (task created)

@evsaev evsaev added the 馃帹聽SDK: StreamChatUI Tasks related to the StreamChatUI SDK label Nov 3, 2021
@evsaev evsaev requested a review from a team November 3, 2021 10:42
@evsaev evsaev self-assigned this Nov 3, 2021
@evsaev evsaev marked this pull request as ready for review November 3, 2021 10:56
@evsaev evsaev force-pushed the fix/CIS-1207-pop-up-stability branch from 4aa1fc9 to a611e70 Compare November 3, 2021 10:59
@codecov
Copy link

codecov bot commented Nov 3, 2021

Codecov Report

Merging #1596 (2b7b218) into main (10ff049) will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1596      +/-   ##
==========================================
- Coverage   85.29%   85.24%   -0.05%     
==========================================
  Files         232      232              
  Lines       10838    10838              
==========================================
- Hits         9244     9239       -5     
- Misses       1594     1599       +5     
Flag Coverage 螖
llc-tests 85.24% <酶> (-0.05%) 猬囷笍

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage 螖
...eamChat/APIClient/Endpoints/Payloads/RawJSON.swift 84.61% <0.00%> (-12.83%) 猬囷笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 10ff049...2b7b218. Read the comment docs.

b-onc
b-onc previously approved these changes Nov 3, 2021
@evsaev evsaev force-pushed the fix/CIS-1207-pop-up-stability branch 2 times, most recently from 4f68c2a to 6908ff4 Compare November 3, 2021 13:08
nuno-vieira
nuno-vieira previously approved these changes Nov 3, 2021
Copy link
Member

@nuno-vieira nuno-vieira left a comment

Choose a reason for hiding this comment

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

LGTM! 馃帀 Nice job 馃憤

@evsaev evsaev force-pushed the fix/CIS-1207-pop-up-stability branch 5 times, most recently from 707a8f4 to 80e6dd4 Compare November 3, 2021 13:39
@evsaev evsaev force-pushed the fix/CIS-1207-pop-up-stability branch from 80e6dd4 to 2b7b218 Compare November 3, 2021 13:44
@evsaev evsaev merged commit 838eb64 into main Nov 3, 2021
@evsaev evsaev deleted the fix/CIS-1207-pop-up-stability branch November 3, 2021 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃帹聽SDK: StreamChatUI Tasks related to the StreamChatUI SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants