Skip to content
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

Move onboarding state to new persistence + reducer context #1835

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

pfrazee
Copy link
Collaborator

@pfrazee pfrazee commented Nov 7, 2023

Refactors onboarding state away from the mobx model and into reducer contexts which use the new persistence layer

Copy link
Member

@estrattonbailey estrattonbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dig this pattern

@@ -9,6 +9,7 @@ import {cleanError} from 'lib/strings/errors'
import {getAge} from 'lib/strings/time'
import {track} from 'lib/analytics/analytics'
import {logger} from '#/logger'
import {DispatchContext as OnboardingDispatchContext} from '#/state/shell/onboarding'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the rename 🙌

Comment on lines +10 to +12
handle: z.string().optional(),
displayName: z.string().optional(),
aviUrl: z.string().optional(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If our plan is to fetch this data to render screens that need it, should we just remove these entirely and only store the bare minimum in storage?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that might be better yeah

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we update onboarding, we should be able to localize this state a little more since the rest of the app doesn't really need to be aware of onboarding state, aside from the kinda boolean "is onboarding complete/active or not" we may need elsewhere

@pfrazee pfrazee force-pushed the onboarding-persist-update branch from 987614f to 3893acc Compare November 8, 2023 16:54
@pfrazee pfrazee merged commit 4afed4b into main Nov 8, 2023
3 of 4 checks passed
@pfrazee pfrazee deleted the onboarding-persist-update branch November 8, 2023 17:04
estrattonbailey added a commit that referenced this pull request Nov 8, 2023
…-state-into-separate-statecontext

* origin:
  Move invite-state to new persistence + context and replace the notifications with just showing uses in the modal (#1840)
  Move muted threads to new persistence + context (#1838)
  Move onboarding state to new persistence + reducer context (#1835)
  Move require alt-text to new persistence + context (#1839)
  Move reminders to new persisted state layer (#1834)
  Add persistent state provider (#1830)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants