Page MenuHomePhabricator

[web] Don't hide pinned messages on reload
ClosedPublic

Authored by inka on May 25 2023, 10:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 27 2024, 5:34 AM
Unknown Object (File)
Feb 27 2024, 5:34 AM
Unknown Object (File)
Feb 27 2024, 5:34 AM
Unknown Object (File)
Feb 27 2024, 5:31 AM
Unknown Object (File)
Jan 11 2024, 10:37 AM
Unknown Object (File)
Dec 16 2023, 5:47 AM
Unknown Object (File)
Dec 15 2023, 11:41 PM
Unknown Object (File)
Nov 17 2023, 4:03 AM
Subscribers

Details

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)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka requested review of this revision.May 25 2023, 10:36 AM

What happens on a refresh? Wondering if the results get "replaced" after the load is complete, or if they get "merged"

Also wondering what happens if there are multiple pages of results loaded and a refresh occurs. Will the refresh "reset" to only showing one page of results? Or will the refresh only refresh the second page of results, or something like that?

What happens on a refresh? Wondering if the results get "replaced" after the load is complete, or if they get "merged"

Also wondering what happens if there are multiple pages of results loaded and a refresh occurs. Will the refresh "reset" to only showing one page of results? Or will the refresh only refresh the second page of results, or something like that?

We currently fetch all pinned messages for the thread in one server call (this is to be changed by this issue), so for now they are just all replaced

Ah – makes sense, thanks for explaining @inka!

Now that @rohan is back, setting him to blocking reviewer since he's the expert on this part of the codebase.

Makes sense to me if the messages all get replaced & a local test of this seemed to work as expected

This revision is now accepted and ready to land.Jun 2 2023, 4:53 AM