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

Framework: Fix errors on transition from themes to signup #4820

Merged
merged 6 commits into from
Apr 19, 2016

Conversation

seear
Copy link
Contributor

@seear seear commented Apr 18, 2016

Used to be #4467 so a lot of the review comments are there.

Addresses #3549

Because the signup pages use the logged-in Layout component, and logged-out theme showcase uses the lighter-weight logged-out layout, transitioning from logged-out showcase to the signup does not work properly as the signup components are rendered into the wrong layout component:

screen shot 2016-04-15 at 17 04 09

This PR adds the capability to render a complete logged-in layout (signup uses the logged-in layout), and changes all the signup routes to use the isomorphic router and render a complete tree, meaning that on transition from logged-out showcase to signup, a correct layout is rendered.

To Test

  1. Check that the following routes are all working as before:
    /start*
    /log-in*
    /phone*
    /jetpack
    (Jetpack testing instructions detailed in Jetpack Connect: logged out users #4155)

  2. Showcase --> signup flow

  • Go to http://calypso.localhost:3000/design, logged-out
  • Click on the ... button for a theme and click Choose this design
  • The signup page should appear, and work, without errors in the console
  • the back button should return to /design, without errors
  1. Maybe necessary to check that signup still works properly in the desktop app?

@seear seear self-assigned this Apr 18, 2016
@seear seear added [Feature Group] Appearance & Themes Features related to the appearance of sites. Framework [Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account. labels Apr 18, 2016
@seear seear added this to the Themes: Showcase M4-ThemeSheets milestone Apr 18, 2016
@seear seear added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Apr 18, 2016
@seear seear force-pushed the fix/showcase-to-signup branch 2 times, most recently from c8f6ecb to 4862a28 Compare April 18, 2016 14:49
@seear
Copy link
Contributor Author

seear commented Apr 18, 2016

@mcsf, @ehg: I've tested the /design -> /start signup flow, and /start on it's own. Anything else I should be looking out for from an NUX perspective?

);
context.secondary = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Giving this some more thought, this is probably unneeded. This will cause unmountComponentAtNode to run for #secondary. So if this piece of code wasn't calling unmountComponentAtNode before, we don't need to introduce it now -- continuing to assume it's not necessary. (Same for the other new occurrences of context.secondary in this diff.)

@ockham
Copy link
Contributor

ockham commented Apr 18, 2016

  1. Check that the following routes are all working as before:
    [...]
    /log-in*

When logging in with my email address, I'm stuck at 'Logging you in...' and seeing the following error:

Uncaught TypeError: this.renderLocaleSuggestions is not a function
app:///./client/signup/log-in-form/index.jsx:180
resolve @ app:///./~/wpcom-proxy-request/index.js:442

@ockham
Copy link
Contributor

ockham commented Apr 18, 2016

  1. Check that the following routes are all working as before:
    [...]
    /phone*

When entering my verification code, I get an error:

Uncaught TypeError: this.formatNumber is not a functionReactErrorUtils.invokeGuardedCallback @
app:///./client/signup/phone-signup-form/index.jsx:47
app:///./~/react/lib/ReactErrorUtils.js:71

(I'm then also told that the code is invalid, but that might be because I waited too long to enter it. However, I'm not presented with any way to re-request a verification code.)

seear and others added 4 commits April 19, 2016 01:23
Change the signup routes to render a complete react tree
including the top-level layout, allowing a transition from
the showcase logged-out layout to the signup logged in one.

* Allow elements as props to the layout component
* Add a ReduxWrappedLayout helper function
* change signup routes to use the isomorphic router
* Split the entry points for the isomorphic router controller
(allowing client-specific dependencies)
@ockham ockham force-pushed the fix/showcase-to-signup branch from b769900 to 0d6ed23 Compare April 18, 2016 23:23
@ockham
Copy link
Contributor

ockham commented Apr 18, 2016

The /log-in* error is also present on master.

@ockham
Copy link
Contributor

ockham commented Apr 18, 2016

So is the /phone one. 😅

@seear
Copy link
Contributor Author

seear commented Apr 19, 2016

Why remove the setSection dispatch?

hasSidebar is obsolete, no? We use secondary in client/sections.js now:

secondary: false,

@ehg
Copy link
Member

ehg commented Apr 19, 2016

I've tested the /design -> /start signup flow, and /start on it's own. Anything else I should be looking out for from an NUX perspective?

I can't think of anything else. Looping @michaeldcain in :)

@seear
Copy link
Contributor Author

seear commented Apr 19, 2016

The /log-in* error is also present on master.
So is the /phone one

Yeah, I don't think we're introducing any regressions here.

@ockham
Copy link
Contributor

ockham commented Apr 19, 2016

Am 19.04.2016 12:14 schrieb Steve Seear notifications@github.com:

Why remove the setSection dispatch?

hasSidebar is obsolete, no?
But this was also setting a section name...

@seear
Copy link
Contributor Author

seear commented Apr 19, 2016

But this was also setting a section name...

not used anywhere

@ockham
Copy link
Contributor

ockham commented Apr 19, 2016

Okay, I'm buying it :-D

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Appearance & Themes Features related to the appearance of sites. [Feature] Signup & Account Creation All screens and flows for making a new WordPress.com account. Framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants