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, Jan 22, 9:57 PM
Unknown Object (File)
Dec 22 2024, 10:14 AM
Unknown Object (File)
Dec 22 2024, 10:14 AM
Unknown Object (File)
Dec 22 2024, 10:13 AM
Unknown Object (File)
Dec 22 2024, 10:11 AM
Unknown Object (File)
Nov 26 2024, 7:34 PM
Unknown Object (File)
Nov 7 2024, 11:37 PM
Unknown Object (File)
Nov 6 2024, 8:41 AM
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