Page MenuHomePhabricator

[web/lib] move reading and populating data to state gate
ClosedPublic

Authored by kamil on Nov 22 2023, 6:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 6, 8:41 AM
Unknown Object (File)
Wed, Nov 6, 8:41 AM
Unknown Object (File)
Wed, Nov 6, 8:41 AM
Unknown Object (File)
Wed, Nov 6, 8:37 AM
Unknown Object (File)
Sat, Oct 26, 12:30 AM
Unknown Object (File)
Sep 29 2024, 2:08 PM
Unknown Object (File)
Sep 28 2024, 9:30 PM
Unknown Object (File)
Sep 28 2024, 9:30 PM
Subscribers

Details

Summary

We need to:

  1. See what's in DB before calling callGetInitialReduxState() - based on this we can add params to fetch/skip some store parts.
  2. Wait with rendering app until data from DB is read - similar thing as on native.
  3. Migrate data if needed - we don't have data in redux-persist like on native, if there is no data in DB we need to get it from keyserver and put into DB.

Depends on D9949

Test Plan

Check if app still loads after refresh, and if persistence (drafts) works.

Diff Detail

Repository
rCOMM Comm
Branch
publish-web-persistence
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Nov 22 2023, 6:51 AM
tomek added inline comments.
web/redux/initial-state-gate.js
53–58

Can we await these in parallel?

This revision is now accepted and ready to land.Nov 23 2023, 2:21 AM
web/redux/initial-state-gate.js
53–58

No because in D9959 callGetInitialReduxState depends on the result of getClientStore - sorry for not commenting on this earlier