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

P2: signup: initial styling #43021

Merged
merged 30 commits into from
Jun 16, 2020
Merged

P2: signup: initial styling #43021

merged 30 commits into from
Jun 16, 2020

Conversation

lamosty
Copy link
Member

@lamosty lamosty commented Jun 5, 2020

Part of introducing the revamped signup flow for the P2 project.

In this PR, we add the redesigned "site" signup step for P2.

Testing instructions

Navigate to http://calypso.localhost:3000/start/p2 and go through the flow. It should look and work fine. Try both in an incognito window (=> new wp.com account) and with your current wp.com account.

@lamosty lamosty requested a review from a team June 5, 2020 14:35
@lamosty lamosty self-assigned this Jun 5, 2020
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

matticbot commented Jun 5, 2020

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~311 bytes added 📈 [gzipped])

name    parsed_size           gzip_size
signup      +1371 B  (+0.6%)     +311 B  (+0.6%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~105 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
async-load-signup-steps-p2-site       -104 B  (-0.4%)     +105 B  (+1.6%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@lamosty lamosty force-pushed the p2-signup/apply-initial-styling branch from 62deddf to c3cd652 Compare June 8, 2020 10:40
@lamosty lamosty force-pushed the p2-signup/apply-initial-styling branch from b28fbad to 06b587e Compare June 9, 2020 13:25
@lamosty
Copy link
Member Author

lamosty commented Jun 10, 2020

I still need to add translations and unify the css to variables, but it's ready for testing and feedback!

@lamosty lamosty added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account. and removed [Status] In Progress labels Jun 10, 2020
Base automatically changed from p2-signup/refactor-to-p2 to master June 10, 2020 11:29
@lezama
Copy link
Contributor

lezama commented Jun 10, 2020

Tests great!

@evilluendas you can use https://hash-acc9b837d2f8b890fc904fe0947d13aab31fed76.calypso.live/start/p2/p2-site

This feels too static while waiting
Screen Shot 2020-06-10 at 09 50 40
do we have plans to make it look as something is going on?

@lamosty
Copy link
Member Author

lamosty commented Jun 10, 2020

@griffbrad hey, could you give this a look too, please? :)

@lamosty lamosty requested a review from griffbrad June 10, 2020 14:54
@lamosty lamosty force-pushed the p2-signup/apply-initial-styling branch from 7eb608a to d1c33ea Compare June 10, 2020 15:19
Copy link
Contributor

@griffbrad griffbrad left a comment

Choose a reason for hiding this comment

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

Overall, LGTM. Left a few comments about minor JS API changes you could make, but I realize you were mostly mirroring surrounding usages already present. On the simpler, purely presentation components (e.g. P2StepWrapper) it probably also makes sense to use a function component rather than a class component with just a render method.

return;
}

document.body.className = document.body.className.split( 'is-p2-signup' ).join( '' );
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -70,6 +88,18 @@ export default {
context.params.flowName === 'account'
) {
removeWhiteBackground();
next();
} else if ( context.pathname.indexOf( 'p2' ) >= 0 ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

<div className="p2-processing-screen">
<div className="p2-processing-screen__logo">
<img
src="https://wpcom.files.wordpress.com/2020/06/p2-logo-light.png"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably add this to static assets in Calypso:
https://github.com/Automattic/wp-calypso/tree/master/static/images

@nsakaimbo
Copy link
Contributor

Bump: runtime error with wp-desktop. I think this looks like the issue that was fixed in Calypso master a couple days ago. Hopefully a rebase will help, otherwise it's probably something else unique to this branch.

Screen Shot 2020-06-10 at 3 17 36 PM

@lamosty
Copy link
Member Author

lamosty commented Jun 11, 2020

Thank you for the great feedback @griffbrad! Addressed.

@lamosty lamosty force-pushed the p2-signup/apply-initial-styling branch from 99e3ac5 to a6fb114 Compare June 11, 2020 12:58
@@ -253,7 +251,7 @@ class P2Site extends React.Component {
className="p2-site__validation-site-title"
>
<FormLabel htmlFor="site-title-input">
{ this.props.translate( "What's the name of your team or project?" ) }
{ this.props.translate( 'Name your team or project' ) }
Copy link

Choose a reason for hiding this comment

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

ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 20 times:
translate( 'Please enter your team or project name.' ) ES Score: 7

@evilluendas
Copy link
Contributor

evilluendas commented Jun 12, 2020

I just pushed a few tweaks to the css, mostly overwriting the Calypso styles in the form inputs. I'd like to tweak a couple of things so it looks better in mobile, I'll do it asap and commit the changes.

I've noticed a couple of things that I don't know how to fix:

  • When you click on the button it immediately changes to "Creating your site", even if you haven't entered anything. Instead of changing the label, I would disable the button while it's thinking (it'll probably require some tweaks to the CSS of the disabled button too, I'll do them after the change).

2020-06-12 14-39-47 2020-06-12 14_40_08

  • In the gif above you can also see that the first field doesn't get the is-error red border when there is an error. I think it's a matter of adding the class.

  • In the old-style login signup screen the contents aren't centered but on the left side. I'd say it's this class limiting the width:

image

Aside from that, looks great! I'd like to add some animation to the background of the "Hooray, site is creating" screen but I'd need to pause the flow there instead of automatically go to the frontend and I'll need your help, as we've talked in Slack. 😄

We'll also need to implement the second step explaining (461-gh-p2) that P2 works with wpcom accounts, but we can do it in a separate PR.

@lamosty lamosty force-pushed the p2-signup/apply-initial-styling branch from 8124f75 to 66956ab Compare June 15, 2020 11:18
@lamosty
Copy link
Member Author

lamosty commented Jun 15, 2020

Thanks for the styling fixes @evilluendas and sorry for missing those.

I'll look at the rest of the things you've mentioned.

@lamosty lamosty force-pushed the p2-signup/apply-initial-styling branch from fb93191 to ef35d10 Compare June 15, 2020 14:27
@nsakaimbo nsakaimbo added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jun 15, 2020
@lamosty lamosty force-pushed the p2-signup/apply-initial-styling branch from 131c94c to c8e2757 Compare June 16, 2020 12:33
@lamosty lamosty merged commit 6540609 into master Jun 16, 2020
@lamosty lamosty deleted the p2-signup/apply-initial-styling branch June 16, 2020 13:03
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jun 16, 2020
@a8ci18n
Copy link

a8ci18n commented Jun 16, 2020

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/3857978

Hi @lamosty, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include all of the following strings:

  • {{h2}}Hooray!{{br/}}Your new P2 is{{br/}}almost ready.{{/h2}}
  • Name your team or project
  • Share, discuss, review, and collaborate across time zones, without interruptions.

Thank you in advance!

@a8ci18n
Copy link

a8ci18n commented Aug 4, 2020

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants