-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Framework: Refuse to persist any UI state #3337
Conversation
Failing tests seem to be partly related to intermingling server state hydration with persisted state deserialization. We'd probably want to rethink this if we decide to move forward with these changes. |
It does seem our concerns are mixing a bit with regards to server initialization. Maybe we should be a bit more explicit about this. We could do an unbalanced serialize that only returns an object, and a deserialize method that still attempts to hydrate state. Alternatively there could be a separate hydration pipeline for server state. cc @seear |
This would be perfectly fine. The only reason for passing bootstrapped server state through the deserializer is to take advantage of the conversion to immutable data. That can be done elsewhere to keep bootstrapping separate from deserialization. |
👍 Added a quick approach for this in #3343 |
c8faa44
to
f4b11ec
Compare
54aa904
to
6f0e22a
Compare
👍 I don't believe we have any blockers left. 🚢 |
… localforageState but no serverState
6f0e22a
to
b03a15e
Compare
Rebased to account for additional UI state added in #3430 . Will plan to merge shortly. |
Framework: Refuse to persist any UI state
This pull request seeks to update the base
state.ui
reducer to always return an empty object on theDESERIALIZE
andSERIALIZE
action types, thereby preventing any state contained within from persisting or restoring persisted state.Open questions:
Is this desirable? Effectively, this treats UI state as disposable to the extent that it should not be restored upon revisiting the application. This seems reasonable (arguably required) in the web client, but is more debatable in the context of the desktop application. We should ask ourselves whether it seems reasonable that UI state be persisted between sessions of using the desktop application.
/cc @gwwar , @mtias