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

FSE: Update NUX slides #41966

Merged
merged 5 commits into from
May 11, 2020
Merged

FSE: Update NUX slides #41966

merged 5 commits into from
May 11, 2020

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented May 8, 2020

Changes proposed in this Pull Request

We're updating the copy and image based on the description in #41960

After unsuccessful attempts to render <NuxPage /> inside <Guide /> conditionally^, I went with a filtered collection approach.

All suggestions for improvement wanted. :)

Testing instructions

Easiest way I found is to check out this branch

Sandbox a test site

Comment out the following lines:

	/* if ( ! isWpcomNuxEnabled || isSPTOpen ) {
		return null;
	} */

Run cd apps/full-site-editing && yarn dev --sync

Test Gutenboarding and non-Gutenboarding versions by setting isGutenboarding to true/false

isGutenboarding === true

isGutenbergNUX

isGutenboarding === false

notGutenbergNUX

Fixes #41960

^ The result of trying something like { isGutenboarding && <NuxPage { ...props } /> }
nux-oops

@ramonjd ramonjd added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Goal] Full Site Editing [Goal] New Onboarding previously called Gutenboarding labels May 8, 2020
@ramonjd ramonjd requested review from a team May 8, 2020 01:47
@ramonjd ramonjd self-assigned this May 8, 2020
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

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.

@roo2 roo2 self-assigned this May 8, 2020
Copy link
Contributor

@roo2 roo2 left a comment

Choose a reason for hiding this comment

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

Tested this and it works, displays the old three step help for non gutenboarding editor and the new one on gutenboarding. @joanrho it looks like all of the copy is up to date, it's still using the old blue colors and the new image with the circle instead of W logo already. It looks like this PR is good to go 🚀

@ramonjd the one thing I'm confused about is that the translations for the non-gutenboarding case seem to have changed? When I look at the site in spanish, they are not translated! But actually that's the same with the onboarding text before this PR too... 🤔

@ramonjd
Copy link
Member Author

ramonjd commented May 8, 2020

When I look at the site in spanish, they are not translated! But actually that's the same with the onboarding text before this PR too

Oh! Thanks for pointing that out. I'm going to double check. Probably a good argument for just replacing the NUX journey completely then with @joanrho's new designs/copy.

@simison
Copy link
Member

simison commented May 8, 2020

Hmm, indeed, I don't find some of those older strings from translation tool at all. That's worrying!

Could it be they need textdomain? __( 'Example', 'full-site-editing' )?

👋 @Automattic/i18n

@simison
Copy link
Member

simison commented May 8, 2020

Could it be they need textdomain?

Looks like that: https://github.com/Automattic/wp-calypso/search?q=full-site-editing&unscoped_q=full-site-editing

@ramonjd
Copy link
Member Author

ramonjd commented May 8, 2020

Could it be they need textdomain? __( 'Example', 'full-site-editing' )?

Oh! 🤦

I added the domain in the master branch code just to check, but didn't see any changes:

Screen Shot 2020-05-08 at 6 54 32 pm

Funny that the buttons don't have the text domain, but they are translated

@akirk
Copy link
Member

akirk commented May 8, 2020

Inside Calypso we don't need the text domain / ignore it. When in Gutenberg, translations are loaded via inlined JS in the HTML (using wp_set_script_translations()), there the text domain is important since the translations are loaded into the text domain. I'm unsure which context we're talking about here.

@simison
Copy link
Member

simison commented May 8, 2020

This code would run in wp-admin context in Gutenberg, so sounds like we will need it.

Additionally, this (FSE plugin) code gets sent to .org repo and shipped as a plugin to Atomic sites. I'm not entirely sure where the translation happen but I'm assuming it happens at .org repo?

@ramonjd
Copy link
Member Author

ramonjd commented May 11, 2020

I've also made the new copy the default as per the comments over at #41960 (comment)

We were originally hiding the privacy slide so I've kept that for now for non-Gutenboarding sites until further instruction

@simison
Copy link
Member

simison commented May 11, 2020

We were originally hiding the privacy slide so I've kept that for now for non-Gutenboarding sites until further instruction

Yup, that's good. That's because users who have old published sites also can see the modal.

@Addison-Stavlo Addison-Stavlo mentioned this pull request May 11, 2020
3 tasks
/>
*/ }
{ getWpcomNuxPages( isGutenboarding ).map( ( nuxPage ) => (
<NuxPage { ...nuxPage } />
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't complain about missing key?

Copy link
Member

Choose a reason for hiding this comment

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

We test on wp-admin where these warnings don't seem to show up.

Copy link
Member

Choose a reason for hiding this comment

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

Added heading as the key in c0af4f6

Copy link
Member Author

Choose a reason for hiding this comment

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

This doesn't complain about missing key?

Doh, forgot the key. Thanks for adding.

Copy link
Member

@simison simison left a comment

Choose a reason for hiding this comment

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

Tests well on both Gutenboarding and non-gutenboarding sites.

there's little jump when image loads to<img> tag that I think if we decide to keep the modal, we should work out by inlining the SVG in JS.

"Preview your site" picture has different height and propotions than other images, which feels off. We can fix that in follow-up tho:

Screenshot 2020-05-11 at 15 04 58

Screenshot 2020-05-11 at 15 04 55

@simison simison mentioned this pull request May 11, 2020
ramonjd and others added 5 commits May 11, 2020 16:14
Updated the preview image with new one that replaces the W icon with a circle
…er them out using `isGutenboarding`. I'm doing it this way because `<Guide />` was counting children regardless of whether we were rendering them via `{ true ? </> : null }`. I'm not sure if this is a bug or that I missed something.
@simison simison force-pushed the update/fse-nux-slides branch from c0af4f6 to f057ac9 Compare May 11, 2020 13:15
@simison
Copy link
Member

simison commented May 11, 2020

Rebased to get build-fse-plugin / Build FSE plugin step pass.

@simison simison added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 11, 2020
@simison simison merged commit 2bb8525 into master May 11, 2020
@simison simison deleted the update/fse-nux-slides branch May 11, 2020 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update the NUX modal
6 participants