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 sticky state for the plans grid action buttons #95537

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from

Conversation

oswian
Copy link
Contributor

@oswian oswian commented Oct 21, 2024

Related to #82853

Proposed Changes

  • For the plans grid action buttons in sticky state:
    • The button copy now uses parentheses ("Upgrade (€17)") instead of a hyphen ("Upgrade – €17")
    • The button font size is no longer reduced
Before After
CleanShot 2024-10-21 at 14 54 33@2x CleanShot 2024-10-21 at 14 53 31@2x

Why are these changes being made?

  • The copy "Upgrade – €17" is confusing because the '-' can be interpreted as a minus sign
  • The reduced font size is unexpected as the button copy still fits using the larger/original font size

Testing Instructions

  • Visit /plans/:site
  • Scroll down the plans grid until the upgrade buttons enter sticky state
  • The button copy should uses parentheses around the amount eg. "Upgrade (€17)" instead of "Upgrade – €17"
  • The button font size should not change when entering the sticky state

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@oswian oswian added the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label Oct 21, 2024
@oswian oswian self-assigned this Oct 21, 2024
@oswian oswian requested a review from a team as a code owner October 21, 2024 03:56
@oswian oswian requested a review from aneeshd16 October 21, 2024 03:57
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Oct 21, 2024
Copy link

github-actions bot commented Oct 21, 2024

Link to live branch is being generated...
Please wait a few minutes and refresh this page.

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@oswian
Copy link
Contributor Author

oswian commented Oct 21, 2024

The ticket raises an additional issue, however I haven't been able to replicate:

"When I scroll up, then on the bottom edge of the page the action buttons also become sticky (or at least get the sticky styling), but they are not really sticky, they scroll away."

I've added a comment to the ticket. If you're able to reproduce this behaviour, let me know!


Update: I was able to replicate the issue in Firefox and have pushed a fix: #82853 (comment)

@a8ci18n
Copy link

a8ci18n commented Oct 21, 2024

Translation for this Pull Request has now been finished.

@southp
Copy link
Contributor

southp commented Oct 21, 2024

I'll need to double check on the font size behavior against some longer languages. In the meantime, I think it'd be the best if we follow what /pricing does for consistency:
CleanShot 2024-10-21 at 16 16 36@2x
i.e. instead of parentheses, using the dot symbol. One side advantage is that we won't need to wait for translation, since we will be simply reusing it.

@southp
Copy link
Contributor

southp commented Oct 21, 2024

Wrapping to a new line for longer copy + currency works as expected:
CleanShot 2024-10-21 at 17 07 21@2x

One thing I'd like to mention is that we seem to wrap the line overly conservative, e.g. English + MX:
CleanShot 2024-10-21 at 17 10 52@2x
It's obvious that there is still room to fit everything into one line. However, since it's the same behavior in production, we should create a follow-up for it if we really want to address it.

@oswian
Copy link
Contributor Author

oswian commented Oct 22, 2024

@southp Thanks for the review!

instead of parentheses, using the dot symbol

Good idea, updated to use the dot: fcdffc9

It's obvious that there is still room to fit everything into one line. However, since it's the same behavior in production, we should create a follow-up for it if we really want to address it.

Yes you're right, there is quite a bit of room. I've created a ticket: https://github.com/Automattic/martech/issues/3504


I've also pushed a fix to prevent the sticky behaviour at the bottom of the screen: 9549718

@oswian
Copy link
Contributor Author

oswian commented Oct 22, 2024

Just noticed we have separate action button strings for the /start/plans page, so these need to be updated as well. Update pushed: 9b5482b

@oswian oswian force-pushed the update/plans-sticky-action-button branch from 05b3a5d to 9b5482b Compare October 22, 2024 02:42
@oswian oswian force-pushed the update/plans-sticky-action-button branch from 9b5482b to 1f0d0e3 Compare October 22, 2024 23:09
@oswian oswian requested a review from southp October 23, 2024 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants