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

Update the auto-renew toggle to use a link on Purchase Details #68105

Merged
merged 3 commits into from
Sep 23, 2022

Conversation

dzver
Copy link
Member

@dzver dzver commented Sep 21, 2022

This component is used in several places. All other places should remain intact.

The change will replace the Toggle component with an On/Off button in the middle of the Auto-renew ON copy.

Proposed Changes

  • The Auto-renew toggle should be visible as a link on the purchase details page.
  • There should be no link if the user doesn't own the upgrade
  • Domain Management and Email Management that also use this toggle should be unaffected

This is how it works with the purchase owner:
https://user-images.githubusercontent.com/82778/191526566-15ec4e91-48d5-4919-9acc-6a58fbd31202.mov

And this is how it looks with another admin account:
Screenshot 2022-09-21 at 17 13 47

Testing Instructions

  • Buy a plan, domain, and email with the store sandbox
  • Go to /me/purchases, then to a purchase detail of one of these upgrades (or any other)
  • Try clicking on the new link and make sure the auto-renew goes on and off
  • Go to Domain Management. Make sure the toggle is unchanged there
  • Go to Email Management. Make sure the toggle is also unchanged
  • Add another user to your test site. Make sure they see no clickable toggles anywhere

Pre-merge Checklist

Related to #

@dzver dzver requested a review from a team as a code owner September 21, 2022 14:11
@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 Sep 21, 2022
@dzver dzver requested review from taggon and ddc22 September 21, 2022 14:15
@matticbot
Copy link
Contributor

matticbot commented Sep 21, 2022

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

Sections (~103 bytes added 📈 [gzipped])

name            parsed_size           gzip_size
site-purchases       +212 B  (+0.0%)      +64 B  (+0.0%)
purchases            +212 B  (+0.0%)      +64 B  (+0.0%)
email                +178 B  (+0.0%)      +39 B  (+0.0%)
domains              +178 B  (+0.0%)      +48 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.

@southp
Copy link
Contributor

southp commented Sep 22, 2022

I've confirmed that it works as the test plan described. The code also looks good to me, but there is one accessibility issue: I can't focus on the new anchor-like button by tabbing, and the cursor doesn't change into a clickable pointer when hovering the mouse cursor onto it:

on-anchor-pointer

I suppose the both might be the same issue, so the above screencast only demonstrates the cursor part :)

@dzver dzver self-assigned this Sep 22, 2022
@dzver dzver added the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label Sep 22, 2022
Copy link
Contributor

@southp southp left a comment

Choose a reason for hiding this comment

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

The fix works. LGTM 🚢

@a8ci18n
Copy link

a8ci18n commented Sep 22, 2022

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

Thank you @dzver for including a screenshot in the description! This is really helpful for our translators.

Copy link
Contributor

@DavidRothstein DavidRothstein left a comment

Choose a reason for hiding this comment

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

I think this one clearly needs more discussion: pebzTe-j5-p2#comment-471

This component is used in several places. All other places should remain
intact.

The change will replace the Toggle component with an On/Off button in
the middle of the Auto-renew ON copy.
Use a link button in order to make that work
@DavidRothstein raised a concern about the flow not being immediately
clear with this heading. Rename it to make it more clear what it is
@dzver dzver force-pushed the update/auto-renew-toggle-in-me-purchases-link branch from 29f05ba to d38c805 Compare September 23, 2022 08:51
@DavidRothstein DavidRothstein requested review from DavidRothstein and removed request for DavidRothstein September 23, 2022 13:41
Copy link
Contributor

@DavidRothstein DavidRothstein left a comment

Choose a reason for hiding this comment

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

This approval does not actually mean I reviewed it (I didn't), but just trying to remove my "Changes requested" following the recent update to the PR -- this seems to be the only way to do it 😄

@DavidRothstein
Copy link
Contributor

recent update to the PR

Which changed the modal title that is shown after clicking "ON" from "Before you go..." to "Turn off auto-renew" (for future reference).

@dzver dzver merged commit 40c512e into trunk Sep 23, 2022
@dzver dzver deleted the update/auto-renew-toggle-in-me-purchases-link branch September 23, 2022 14:10
@github-actions github-actions bot removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging labels Sep 23, 2022
@a8ci18n
Copy link

a8ci18n commented Sep 23, 2022

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

Thank you @dzver for including a screenshot in the description! This is really helpful for our translators.

villanovachile pushed a commit that referenced this pull request Sep 27, 2022
* Update the auto-renew toggle to use a link on Purchase Details

This component is used in several places. All other places should remain
intact.

The change will replace the Toggle component with an On/Off button in
the middle of the Auto-renew ON copy.

* There's no cursor and the tabbing doesn't work

Use a link button in order to make that work

* Rename the Modal heading

@DavidRothstein raised a concern about the flow not being immediately
clear with this heading. Rename it to make it more clear what it is
@a8ci18n
Copy link

a8ci18n commented Sep 30, 2022

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

Successfully merging this pull request may close these issues.

None yet

5 participants