HomePhabricator
Diffusion Comm 20a810842acb

[web] Persist enabled apps using default storage engine

Description

[web] Persist enabled apps using default storage engine

Summary:
Persist only one property of the state - enabledApps. The persistence uses the default storage engine - localStorage. There are a couple of other options https://github.com/rt2zz/redux-persist#storage-engines, including indexedDB, but for our needs the default one should be good enough.

Depends on D4811 D4848

Test Plan:
Run the web app, choose enabled apps and refresh the page - the selection should remain. Open debugger and check application tab -> local storage: there should be a single entry associated with localhost that contains an object with enabledApps and _persist keys.

To test if the state is cleared, I disabled calendar, logged out and in and checked if calendar is enabled - just like in defaultWebEnabledApps.

Reviewers: jacek, atul, ashoat

Reviewed By: jacek, atul, ashoat

Subscribers: ashoat, adrian, abosh

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

Details

Provenance
tomekAuthored on Jul 29 2022, 9:23 AM
Reviewer
jacek
Differential Revision
D4812: [web] Persist enabled apps using default storage engine
Parents
rCOMMda6599eb4369: [lib] Clear enabled apps on logout
Branches
Unknown
Tags
Unknown