-
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
Migrate block editor nux to createReduxStore #74454
base: trunk
Are you sure you want to change the base?
Conversation
This PR modifies the release build for editing-toolkit To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PCYsg-mMA-p2 |
@@ -153,16 +147,10 @@ function WelcomeTour( { siteIntent }: { siteIntent?: string } ) { | |||
tourRating: { | |||
enabled: true, | |||
useTourRating: () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this use of hooks is interesting 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They told us React was "just JavaScript", so why not hooks as config 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha, fair enough! It stood out since I hadn't seen hooks used like this before :P
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a new account and sandbox the new test site. At that point it might show up?
You can also choose "Welcome Guide" from the kebab menu to make it reappear.
Everything else is working as expected
@@ -153,16 +147,10 @@ function WelcomeTour( { siteIntent }: { siteIntent?: string } ) { | |||
tourRating: { | |||
enabled: true, | |||
useTourRating: () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They told us React was "just JavaScript", so why not hooks as config 😄
actions, | ||
selectors, | ||
controls, | ||
persist: true, // TODO @noahtallen: persist plugin probably doesn't work here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do persist store data. This is it what the store looks like without the ETK patch.
And we do rely on it for caching so we're not always fetching the "should they see the welcome tour" flag from the server forever into the future.
And you're right it no longer appears to work with this patch applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunate! I think the persist plugin may not have been migrated to work with the new store registration, so that may require more work before we can migrate this one.
Thanks for taking a look!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for context, the persistence plugin definitely isn't compatible with the more modern registration methods :( See WordPress/gutenberg#11449
Another question is whether we could use the editor preferences layer instead, which does support browser persistence
Labeling as blocked until we get more info on what to do about the persistence plugin |
4400ee2
to
5137bf3
Compare
see #74399 for more info
Proposed Changes
Migrates the block editor nux (new user experience) ETK feature to
createReduxStore
While there are other references to
automattic/wpcom-welcome-guide
in the codebase, they're in different webpack bundles, so I continued using the string-based store identifier approach.Testing Instructions
TBD... you definitely start by syncing ETK. Create a new account and sandbox the new test site. At that point it might show up?
Added a couple people who recently touched these files for tips and maybe a review ;)