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

Partner Coupon: Add a new Partner Coupon Redeem CTA #22413

Merged
merged 18 commits into from
Feb 15, 2022

Conversation

atanas-dev
Copy link
Member

@atanas-dev atanas-dev commented Jan 19, 2022

Changes proposed in this Pull Request:

  • Add new partner coupon redeem CTA for connected users when a partner coupon is detected on the site.

Jetpack product discussion

pdpAdu-1U-p2

There were 2 design pieces left out because the scope was reduced:

  • The pre-connection CTA did not have its design changed as the scope of this change was reduced.
  • The primary button design was kept as-is as it's based on the WP admin style and to match the pre-connection button as well.

Does this pull request change what data or activity we track or use?

Added a new jetpackRedeemPartnerCouponDismissedAt Local Storage key that holds a timestamp when the user clicks the "Remind me later" button.

Testing instructions:

  • Make sure Jetpack is activated but not connected.
  • Visit /wp-admin/?jetpack-partner-coupon=PARTNER_COUPON_CODE to store a partner coupon code. Please reach out to team Avalon to get a coupon code.
  • Confirm you are redirected to /wp-admin/admin.php?page=jetpack&showCouponRedemption=1#/ which matches screenshot 1 below.
  • For every step, make sure that the Redeem button redirects you to checkout with your partner coupon applied. The "Set up & redeem" buttons should first connect you and then redirect you to checkout instead.
  • Establish a site connection by bailing out of the connection flow before approving the connection to your account.
  • Go to Jetpack Dashboard and confirm it matches screenshot 2 below.
  • Establish a user connection.
  • Go to Jetpack Dashboard and confirm it matches screenshot 3 below.
  • Go to Jetpack Dashboard, add &showCouponRedemption=1 to your URL and confirm it matches screenshot 4 below.

Final results:

Screenshot 1: No connection with and without showCouponRedemption=1:
Screen Shot 2022-01-20 at 19 28 40

Screenshot 2: Site connection with and without showCouponRedemption=1:
Screen Shot 2022-01-20 at 19 29 41

Screenshot 3: User connection without showCouponRedemption=1:
Screen Shot 2022-02-08 at 21 43 14

Screenshot 4: User connection and showCouponRedemption=1:
Screen Shot 2022-02-08 at 21 43 41

@github-actions github-actions bot added [JS Package] Base Styles [JS Package] Connection [JS Package] Partner Coupon [Package] Partner This package no longer exists in the monorepo. It was merged into [Package] Connection. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Admin Page React-powered dashboard under the Jetpack menu RNA labels Jan 19, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2022

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ⚠️ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: March 1, 2022.
  • Scheduled code freeze: February 22, 2022.

@github-actions github-actions bot added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Jan 19, 2022
@atanas-dev atanas-dev force-pushed the add/partner-coupon-redeem-post-connection-cta branch from 3579fab to 13f00f4 Compare January 24, 2022 17:41
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello atanas-dev! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D73666-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@atanas-dev atanas-dev force-pushed the add/partner-coupon-redeem-post-connection-cta branch 2 times, most recently from 2428cb1 to ab6551a Compare January 26, 2022 15:35
@atanas-dev atanas-dev marked this pull request as ready for review January 26, 2022 16:09
@atanas-dev atanas-dev added [Status] Needs Team Review and removed [Status] In Progress [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Jan 26, 2022
Copy link
Contributor

@kallehauge kallehauge left a comment

Choose a reason for hiding this comment

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

Design

IMO the whitespace seems a bit off when a bullet breaks down to a new line

Screenshot 2022-01-31 at 14 11 19

The overall "feel" looks a bit messy/chaotic and it's difficult to glance the bullets compared to the original design

Screenshot 2022-01-31 at 14 19 19

I know design is supposed to give a 👍 after team approval, but it might be worth pulling them in now to specifically look at the "bullets" since the first image is what everyone is currently going to see?
It looks like the code is using the suggested spacing when nothing is breaking into new lines so maybe we need a copy change / design change? Or it's just my eyes and everything is good 😂


"Remind me later"

There's no "Remind me later" functionality which the design implies. I kinda like it since, if you do not want to claim the coupon anyway, this box would be "in the way" for about a month before auto-purge removes it from the site.
If it to limit scope, perhaps we could have an action called "Remove coupon" which would purge the coupon from the database?


Mobile experience

The mobile device usage of the Jetpack screen is (IMO) surprisingly small, so I think we generally just try and support it as well as possible without going too far out of our own way to handle it.
I'm prefacing the following comment with the above, because other components are "breaking" around the same time as our new component but 360x640 and 360x800 screen sizes are still some of the most popular mobile resolutions and 360x width is actually the most popular by far, if you combine the two

Screenshot 2022-01-31 at 14 28 36

That being said: until we reach the minimum limits, it flows pretty well up until the max width 😃

@kallehauge kallehauge added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Jan 31, 2022
@atanas-dev atanas-dev added [Status] In Progress and removed [Status] Needs Team Review [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Feb 2, 2022
@atanas-dev
Copy link
Member Author

Design

@Luchadores any thoughts on the feature listing and line-breaking we currently have because of the verbiage? Should we drop the two column layout?

Remind me later
Mobile experience

Turns out I've been looking at an outdated design in Figma. I've posted pdpAdu-7z-p2 in order to discuss the "remind me later" feature which I will be exploring soon and I've reworked the design implementation, especially on mobile.

@Luchadores
Copy link
Contributor

Hey @atanas-dev, here is what the design is looking like in Figma. Hope I understood your question correctly and that this helps.

image

@atanas-dev
Copy link
Member Author

@Luchadores take a look at this screenshot from André's comment (my ones in the PR itself are a bit outdated):

Screenshot 2022-01-31 at 14 11 19

The verbiage you see is what we have in production for the product that IONOS will be providing - we have 3 features with one of them being significantly longer ("Automated daily backups (off-site)") which causes it to break into multiple lines even on desktop browser sizes. Should we drop the two-column layout for features even on desktop?

@Luchadores
Copy link
Contributor

Luchadores commented Feb 3, 2022

Hey @atanas-dev, in that case, I would put all "One-click restores" under "Unlimited backup storage". That way we won't have "One-click restores" by itself, nor it will break the line for "Automated daily backups".

@atanas-dev atanas-dev requested a review from a team as a code owner February 4, 2022 17:15
@jeherve jeherve added the [Status] Needs Privacy Updates Our support docs will need to be updated to take this change into account label Feb 10, 2022
@atanas-dev
Copy link
Member Author

Since we're adding a new cookie, we'll definitely want to keep track this since our cookie policy will need to be updated.

@jeherve apologies, this was added at the end and I missed updating the PR description.
Would using localStorage instead of cookies change anything privacy policy-wise? We can definitely add an extra API endpoint and handle dismissals via transients but it'd be great if we can keep it simpler.

@jeherve
Copy link
Member

jeherve commented Feb 10, 2022

Would using localStorage instead of cookies change anything privacy policy-wise?

Yeah, it would definitely simplify things, and would probably work just as well for such a short duration. For a longer duration (if that changes following our discussion above), however, it probably wouldn't be as good?

@atanas-dev
Copy link
Member Author

I've updated the dismissal time to 3 days and switched the implementation to use localStorage rather than cookies.

@atanas-dev atanas-dev added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Feb 11, 2022
@kallehauge
Copy link
Contributor

The new localStorage implementation tests well for me 👍

The "3 days if you're in the same browser" time also seems like a fair compromise between:

@jeherve: This feels very short, doesn't it? If I dismiss a "later" banner, I would expect it to be gone for at least a few days. A week seems like minimum to me.

and

@Luchadores: Can we not show it next time the user starts a new session?

Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

This looks good to me now. I have a few remarks left:

  • When in offline mode, the component is still displayed:

Screenshot 2022-02-14 at 14 51 38

  • When the site is connected, but not the user, the banners are still displayed:

Screenshot 2022-02-14 at 14 55 26

Screenshot 2022-02-14 at 14 52 36

@jeherve jeherve added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Feb 14, 2022
@atanas-dev
Copy link
Member Author

atanas-dev commented Feb 14, 2022

When in offline mode, the component is still displayed:

The component is now disabled in Offline mode.

When the site is connected, but not the user, the banners are still displayed:

@atanas-dev atanas-dev added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Feb 14, 2022
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

Thanks, all looks good now! 🚢

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Feb 15, 2022
@atanas-dev atanas-dev merged commit 2fe11ce into master Feb 15, 2022
@atanas-dev atanas-dev deleted the add/partner-coupon-redeem-post-connection-cta branch February 15, 2022 17:47
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Feb 15, 2022
@github-actions
Copy link
Contributor

Great news! One last step: head over to your WordPress.com diff, D73666-code, and commit it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

gavande1 pushed a commit that referenced this pull request Feb 16, 2022
…22413)

Add a new partner coupon redeem CTA for connected users on the "At a Glance" page when a partner coupon is detected on the site.
The CTA has a "Remind me later" option which will store the current timestamp in localStorage and hide the CTA until 3 days have passed.

PT: pdpAdu-1U-p2
@atanas-dev
Copy link
Member Author

Deployed in r240207-wpcom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Page React-powered dashboard under the Jetpack menu [JS Package] Base Styles [JS Package] Connection [JS Package] Partner Coupon [Package] Jitm [Package] My Jetpack [Package] Partner This package no longer exists in the monorepo. It was merged into [Package] Connection. [Package] Search Contains core Search functionality for Jetpack and Search plugins [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ RNA [Status] Needs Privacy Updates Our support docs will need to be updated to take this change into account Touches WP.com Files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants