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

Siteless checkout thank-you: Make form submit with Enter key pressed. #54928

Merged
merged 1 commit into from Jul 27, 2021

Conversation

elliottprogrammer
Copy link
Contributor

Changes proposed in this Pull Request

This PR improves the UX for the "Submit website Address" input form by allowing the form to be submitted by pressing the enter key.

Implementation notes:

  • Removed the onUrlSubmit() off of the <Button onClick={ onUrlSubmit }> event and instead assigned it to the <Form onSubmit={ onUrlSubmit }> event. This captures the Form tags natural ability to submit the form using the Enter key, if you want.
  • Also made the submit button text dynamic. When submitting, button text is, "Saving...", otherwise button text is, "Continue".

Testing instructions

  • Checkout and run this PR
  • Go to http://calypso.localhost:3000/checkout/jetpack/jetpack_scan
  • Complete siteless checkout.
  • On the "Thank you" page, test the "Submit website address" form:
    • Verify you can submit the form using the enter key or by pressing the button.
    • Verify that when the form is submitting, the button text changes to, "Saving...", otherwise it says, "Continue".

@elliottprogrammer elliottprogrammer self-assigned this Jul 27, 2021
@elliottprogrammer elliottprogrammer requested a review from a team as a code owner July 27, 2021 13:53
@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 Jul 27, 2021
@matticbot
Copy link
Contributor

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

Sections (~26 bytes added 📈 [gzipped])

name      parsed_size           gzip_size
checkout        +71 B  (+0.0%)      +26 B  (+0.0%)

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

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.

Copy link
Member

@atanas-dev atanas-dev left a comment

Choose a reason for hiding this comment

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

Tests good for me

@elliottprogrammer elliottprogrammer merged commit 192c5ce into trunk Jul 27, 2021
@elliottprogrammer elliottprogrammer deleted the fix/siteless-thankyou-enter-submits-form branch July 27, 2021 19:39
@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 Jul 27, 2021
@a8ci18n
Copy link

a8ci18n commented Jul 27, 2021

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

Hi @elliottprogrammer, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include this string: That is not a valid website URL.

Thank you in advance!

@a8ci18n
Copy link

a8ci18n commented Aug 5, 2021

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants