Page MenuHomePhabricator

[web-db] choose storage engine depending on whether database is supported or not
ClosedPublic

Authored by kamil on Apr 27 2023, 7:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 26 2024, 4:40 AM
Unknown Object (File)
Feb 22 2024, 10:10 PM
Unknown Object (File)
Feb 13 2024, 6:29 AM
Unknown Object (File)
Feb 13 2024, 3:18 AM
Unknown Object (File)
Feb 13 2024, 12:19 AM
Unknown Object (File)
Feb 13 2024, 12:19 AM
Unknown Object (File)
Feb 12 2024, 10:17 PM
Unknown Object (File)
Feb 10 2024, 8:28 AM
Subscribers

Details

Summary

Conditionally use default persist storage API or database depending on whether database is supported or not.

Depends on D7666

Test Plan

Switch to commReduxStorageEngine and test if it works for not supported database

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Apr 27 2023, 8:00 AM

Wondering if this is the best solution. How about having two separate storage engines, one with only db and one with redux storage? Then we could conditionally set one or the other, but each of them would be a lot simpler.

This revision is now accepted and ready to land.Apr 28 2023, 4:37 AM
web/redux/comm-redux-storage-engine.js
3 ↗(On Diff #25853)

Is this the right import? Do we have to include index in the path?

web/redux/comm-redux-storage-engine.js
3 ↗(On Diff #25853)

We have an ESLint rule that forces this. It can be ignored, but generally prefer to use index.js instead. This is the same import path we use in web/root.js currently