HomePhabricator
Diffusion Comm 23f6660f18d8

[web] Don't hide pinned messages on reload

Tags
None
Referenced Files
F558838: image.png
Jun 2 2023, 7:49 AM
File Not Attached
F558837: image.png
Jun 2 2023, 7:49 AM
File Not Attached
F558836: image.png
Jun 2 2023, 7:49 AM
File Not Attached
F558835: Screen Recording 2023-05-25 at 16.04.16.mov
Jun 2 2023, 7:49 AM
File Not Attached
Subscribers
None

Description

[web] Don't hide pinned messages on reload

Summary:
issue: https://linear.app/comm/issue/ENG-3896/message-pin-view-on-web-refreshes-when-user-navigates-back-and-away
When the user navigates to a different tab / app the connectionStatus is changed to disconnected. This indirectly causes the callFetchPinnedMessages variable in MessageResultsModal to change when the user comes back to comm, which
in turn calls the Effect hook that fetches pinned messages.
Previously in such case we stopped showing the old results, and show only the loading indicator. Now we show the old results and the loading indicator above them, and once the fetch is completed the results are updated.
Some changes to css were made to stop the modal from resizing when the loading indicator appears / disappears (resulting in jumping screen effect).

Test Plan:

image.png (956×1 px, 67 KB)

image.png (974×1 px, 68 KB)

image.png (364×982 px, 24 KB)

Reviewers: kuba, michal, ginsu, rohan

Reviewed By: rohan

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D7981

Details

Provenance
InkaSokolowskaAuthored on May 25 2023, 10:06 AM
Reviewer
rohan
Differential Revision
D7981: [web] Don't hide pinned messages on reload
Parents
rCOMMc014a677a83a: [web] Include stateVersion in web PlatformDetails
Branches
Unknown
Tags
Unknown