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

Goals first: Enable back button in the login step for the DIFM and Import flows #97722

Merged
merged 7 commits into from
Dec 24, 2024

Conversation

zaguiini
Copy link
Contributor

Closes #97706.

Proposed Changes

Title. I'm not sure if the chosen approach here is the best - please let me know if there's a better way of achieving it for both flows.

Why are these changes being made?

Continuity, UX.

Testing Instructions

Enter /setup/onboarding and click the DIFM link. You should be redirected to the login screen with the back button enabled and that button should send you back to the goals screen.

Do the same for the import link in the goals step.

@zaguiini zaguiini self-assigned this Dec 20, 2024
@zaguiini zaguiini requested review from a team December 20, 2024 21:20
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 20, 2024
@matticbot
Copy link
Contributor

matticbot commented Dec 20, 2024

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

Sections (~259 bytes added 📈 [gzipped])

name                        parsed_size           gzip_size
update-design-flow               +177 B  (+0.0%)      +63 B  (+0.0%)
link-in-bio-tld-flow             +177 B  (+0.0%)      +72 B  (+0.0%)
hosted-site-migration-flow       +156 B  (+0.1%)      +97 B  (+0.4%)
onboarding-flow                  +114 B  (+0.1%)      +27 B  (+0.2%)

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 (~75 bytes added 📈 [gzipped])

name                                                            parsed_size           gzip_size
async-load-signup-steps-woocommerce-install-transfer                 +177 B  (+0.3%)      +75 B  (+0.4%)
async-load-signup-steps-woocommerce-install-step-store-address       +177 B  (+0.2%)      +75 B  (+0.2%)
async-load-signup-steps-woocommerce-install-step-business-info       +177 B  (+0.2%)      +75 B  (+0.2%)
async-load-signup-steps-woocommerce-install-confirm                  +177 B  (+0.2%)      +75 B  (+0.3%)
async-load-signup-steps-website-content                              +177 B  (+0.1%)      +75 B  (+0.1%)
async-load-signup-steps-user                                         +177 B  (+0.1%)      +75 B  (+0.1%)
async-load-signup-steps-theme-selection                              +177 B  (+0.1%)      +75 B  (+0.1%)
async-load-signup-steps-test-step                                    +177 B  (+0.4%)      +75 B  (+0.5%)
async-load-signup-steps-store-features                               +177 B  (+0.3%)      +75 B  (+0.4%)
async-load-signup-steps-starting-point                               +177 B  (+0.3%)      +75 B  (+0.4%)
async-load-signup-steps-social-profiles                              +177 B  (+0.4%)      +75 B  (+0.5%)
async-load-signup-steps-site-picker                                  +177 B  (+0.1%)      +75 B  (+0.1%)
async-load-signup-steps-site-or-domain                               +177 B  (+0.3%)      +75 B  (+0.4%)
async-load-signup-steps-site-options                                 +177 B  (+0.3%)      +75 B  (+0.4%)
async-load-signup-steps-site                                         +177 B  (+0.3%)      +75 B  (+0.4%)
async-load-signup-steps-rewind-were-backing                          +177 B  (+0.4%)      +75 B  (+0.5%)
async-load-signup-steps-rewind-form-creds                            +177 B  (+0.2%)      +75 B  (+0.3%)
async-load-signup-steps-reader-landing                               +177 B  (+0.4%)      +75 B  (+0.5%)
async-load-signup-steps-page-picker                                  +177 B  (+0.0%)      +75 B  (+0.1%)
async-load-signup-steps-p2-site                                      +177 B  (+0.2%)      +75 B  (+0.3%)
async-load-signup-steps-p2-join-workspace                            +177 B  (+0.3%)      +75 B  (+0.4%)
async-load-signup-steps-p2-details                                   +177 B  (+0.4%)      +75 B  (+0.5%)
async-load-signup-steps-p2-confirm-email                             +177 B  (+0.4%)      +75 B  (+0.5%)
async-load-signup-steps-p2-complete-profile                          +177 B  (+0.1%)      +75 B  (+0.2%)
async-load-signup-steps-new-or-existing-site                         +177 B  (+0.3%)      +75 B  (+0.3%)
async-load-signup-steps-intent                                       +177 B  (+0.3%)      +75 B  (+0.4%)
async-load-signup-steps-initial-intent                               +177 B  (+0.2%)      +75 B  (+0.2%)
async-load-signup-steps-hosting-decider                              +177 B  (+0.4%)      +75 B  (+0.5%)
async-load-signup-steps-emails                                       +177 B  (+0.2%)      +75 B  (+0.3%)
async-load-signup-steps-difm-site-picker                             +177 B  (+0.1%)      +75 B  (+0.1%)
async-load-signup-steps-design-picker                                +177 B  (+0.2%)      +75 B  (+0.3%)
async-load-signup-steps-creds-permission                             +177 B  (+0.2%)      +75 B  (+0.3%)
async-load-signup-steps-creds-confirm                                +177 B  (+0.2%)      +75 B  (+0.3%)
async-load-signup-steps-courses                                      +177 B  (+0.2%)      +75 B  (+0.2%)
async-load-signup-steps-clone-start                                  +177 B  (+0.4%)      +75 B  (+0.5%)
async-load-signup-steps-clone-ready                                  +177 B  (+0.2%)      +75 B  (+0.3%)
async-load-signup-steps-clone-point                                  +177 B  (+0.1%)      +75 B  (+0.1%)
async-load-signup-steps-clone-destination                            +177 B  (+0.3%)      +75 B  (+0.4%)
async-load-signup-steps-clone-credentials                            +177 B  (+0.2%)      +75 B  (+0.2%)
async-load-signup-steps-clone-cloning                                +177 B  (+0.4%)      +75 B  (+0.5%)
async-load-calypso-signup-step-wrapper                               +177 B  (+0.5%)      +75 B  (+0.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.

@zaguiini zaguiini changed the title Goals first: Enable back click in the login step for the DIFM and Import flows Goals first: Enable back button in the login step for the DIFM and Import flows Dec 20, 2024
@@ -753,9 +753,13 @@ export class UserStep extends Component {
return null;
}

const backUrl = this.props.backUrl?.startsWith( '/' ) ? this.props.backUrl : undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking: maybe move this piece into the connect wrapper

Copy link
Contributor

@vykes-mac vykes-mac left a comment

Choose a reason for hiding this comment

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

The approach looks consistent with existing patterns in the codebase. looks good to me.

The back button overlaps the logo on mobile

image

@zaguiini zaguiini force-pushed the goals-first/allow-clicking-back-from-difm-and-import branch from 04c6218 to 718900a Compare December 23, 2024 20:17
@zaguiini
Copy link
Contributor Author

Thanks @vykes-mac this should be ready to go now

Copy link
Contributor

@vykes-mac vykes-mac left a comment

Choose a reason for hiding this comment

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

LGTM

@zaguiini zaguiini merged commit edaa82c into trunk Dec 24, 2024
11 checks passed
@zaguiini zaguiini deleted the goals-first/allow-clicking-back-from-difm-and-import branch December 24, 2024 16:43
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 24, 2024
candy02058912 pushed a commit that referenced this pull request Dec 25, 2024
…port flows (#97722)

* Accept back_url query parameter in signup/user

* Accept back_url query parameter in setup/hosted-site-migration

* Add back_url to DIFM and hosted-site-migration flows

* Move back_url conciliation within redux connect function

* Update implementation so it uses back_to instead of back_url

* Push back button to the right so it doesn't conflict with the WP Logo

* Update unit tests
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.

Task: DIFM and Import should have back buttons
3 participants