HomePhabricator
Diffusion Comm 6ca82c09dbfa

[web] Update `DisconnectedBar` to display based on `useNetworkConnected()`

Tags
None
Referenced Files
F1010488: 0be6a7.png
Dec 28 2023, 3:39 PM
File Not Attached
F1010487: 9c74cc.png
Dec 28 2023, 3:39 PM
File Not Attached
Subscribers

Description

[web] Update DisconnectedBar to display based on useNetworkConnected()

Summary:
Part of https://linear.app/comm/issue/ENG-6137/modify-disconnectedbar-so-it-pulls-from-connectivityinfo.

To begin, I'm going to update the web and native components to skip eg useShouldShowDisconnectedBar, etc. and just get the boolean they need (is the network connected or not) "directly" from useNetworkConnected on web and (state => state.connectivity.connected) on native.

I'll then go ahead and rename all of eg useDisconnectedBarVisibilityHandler to make it clear that they're no longer connected to the DisconnectedBar. I think we'll still want all the Redux actions and whatnot for the "Keyserver status"? page that @ginsu is working on, so I won't rip them out.

Test Plan:

  1. Open local web app
  2. Kill local keyserver
  3. Observe that nothing happens:

9c74cc.png (2×3 px, 1 MB)

  1. Disconnect laptop from WiFi
  2. Observe the DisconnectedBar:

0be6a7.png (612×3 px, 435 KB)

Reviewers: ashoat, ginsu, tomek

Reviewed By: ashoat, ginsu

Subscribers: inka, ginsu

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

Details

Provenance
atulAuthored on Dec 28 2023, 3:10 PM
Reviewer
ashoat
Differential Revision
D10469: [web] Update `DisconnectedBar` to display based on `useNetworkConnected()`
Parents
rCOMM038aad4a2924: [lib] Make useAncestorThreads more efficient
Branches
Unknown
Tags
Unknown