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

Fix recommending a tier on the upgrade page #4287

Merged
merged 7 commits into from
Jul 4, 2024

Conversation

RobertJoonas
Copy link
Contributor

@RobertJoonas RobertJoonas commented Jun 28, 2024

Changes

A follow-up to #4277, which started counting pending ownership sites towards usage on the upgrade page. However, it didn't change the logic of how a plan box is highlighted as the "recommended tier".

This PR fixes that by implementing the following logic behind the recommended tier decision:

  • Recommend a plan based on the usage and highest available Growth and Business plans:
    • take the highest growth plan available for the user and see if its usage is exceeded
    • if exceeded, check if the highest Business plan accommodates this usage
    • if even the business plan does not accommodate the usage, recommend Enterprise.
  • Prioritize a "Recommended" highlight pill for the plan boxes, over "Current".
    • The "Current" highlight will only be displayed if the currently owned tier is also recommended

Tests

  • Automated tests have been added

Changelog

  • This PR does not make a user-facing change

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

@RobertJoonas RobertJoonas merged commit 81047ba into master Jul 4, 2024
10 checks passed
@RobertJoonas RobertJoonas deleted the pending-ownership-transfers-usage-cont branch July 4, 2024 08:58
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

2 participants