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

feat: Add Update Plan blurb when changing plan details #3008

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

ajay-sentry
Copy link
Contributor

@ajay-sentry ajay-sentry commented Jul 11, 2024

Description

This PR aims to add a blurb at the bottom of the manage plan page to better inform users of the plan changes they are making and when they will take effect.

When the user is "upgrading" their plan, the change takes effect immediately; when they increase the number of seats, go from team -> pro, or from monthly -> annual. This matches the logic in API here: https://github.com/codecov/codecov-api/blob/638aeca732ec08e901f4f7443fb35b799b181843/services/billing.py#L350-L358

When the user "downgrades" (non-upgrade), the plan change takes effect at the start of the following billing cycle.

figma

Closes codecov/engineering-team#1853

Notable Changes

I decided to create a new component for these changes just to isolate them, and if we ever want to use this blurb somewhere else we totally can. I also chose to create a ton of consts at the top of the component before doing all the styling just because I thought that was a little easier to decipher through.

Lots of logic happening to happy to answer questions about it! Otherwise here's a video below in action

Screenshots

Screen.Recording.2024-07-11.at.3.23.13.PM.mov

Link to Sample Entry

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@codecov-staging
Copy link

codecov-staging bot commented Jul 11, 2024

Bundle Report

Changes will increase total bundle size by 1.36kB ⬆️

Bundle name Size Change
gazebo-staging-array-push 6.1MB 1.36kB ⬆️

Copy link

codecov bot commented Jul 11, 2024

Bundle Report

Changes will increase total bundle size by 1.36kB ⬆️

Bundle name Size Change
gazebo-production-array-push 6.1MB 1.36kB ⬆️

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Jul 11, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
dfd4e4a Thu, 11 Jul 2024 23:16:00 GMT Expired Expired
d4a464f Fri, 12 Jul 2024 16:10:15 GMT Cloud Enterprise

@codecov-qa
Copy link

codecov-qa bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.35%. Comparing base (8d3b793) to head (d4a464f).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3008   +/-   ##
=======================================
  Coverage   98.34%   98.35%           
=======================================
  Files         907      908    +1     
  Lines       13454    13485   +31     
  Branches     3579     3550   -29     
=======================================
+ Hits        13232    13263   +31     
  Misses        218      218           
  Partials        4        4           
Files Coverage Δ
...dePlanPage/UpgradeForm/UpdateBlurb/UpdateBlurb.tsx 100.00% <100.00%> (ø)
...Routes/UpgradePlanPage/UpgradeForm/UpgradeForm.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 53.84% <ø> (ø)
Layouts 97.60% <ø> (ø)
Pages 99.15% <100.00%> (+<0.01%) ⬆️
Services 99.47% <ø> (ø)
Shared 99.69% <ø> (ø)
UI 94.27% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d3b793...d4a464f. Read the comment docs.

Copy link

codecov-public-qa bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.35%. Comparing base (8d3b793) to head (d4a464f).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3008   +/-   ##
=======================================
  Coverage   98.34%   98.35%           
=======================================
  Files         907      908    +1     
  Lines       13454    13485   +31     
  Branches     3531     3550   +19     
=======================================
+ Hits        13232    13263   +31     
  Misses        218      218           
  Partials        4        4           
Files Coverage Δ
...dePlanPage/UpgradeForm/UpdateBlurb/UpdateBlurb.tsx 100.00% <100.00%> (ø)
...Routes/UpgradePlanPage/UpgradeForm/UpgradeForm.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 53.84% <ø> (ø)
Layouts 97.60% <ø> (ø)
Pages 99.15% <100.00%> (+<0.01%) ⬆️
Services 99.47% <ø> (ø)
Shared 99.69% <ø> (ø)
UI 94.27% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d3b793...d4a464f. Read the comment docs.

@codecov-notifications
Copy link

codecov-notifications bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3008   +/-   ##
=======================================
  Coverage   98.34%   98.35%           
=======================================
  Files         907      908    +1     
  Lines       13454    13485   +31     
  Branches     3579     3598   +19     
=======================================
+ Hits        13232    13263   +31     
  Misses        218      218           
  Partials        4        4           
Files Coverage Δ
...dePlanPage/UpgradeForm/UpdateBlurb/UpdateBlurb.tsx 100.00% <100.00%> (ø)
...Routes/UpgradePlanPage/UpgradeForm/UpgradeForm.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 53.84% <ø> (ø)
Layouts 97.60% <ø> (ø)
Pages 99.15% <100.00%> (+<0.01%) ⬆️
Services 99.47% <ø> (ø)
Shared 99.69% <ø> (ø)
UI 94.27% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d3b793...d4a464f. Read the comment docs.

Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.35%. Comparing base (8d3b793) to head (d4a464f).

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##               main      #3008        +/-   ##
================================================
+ Coverage   98.34000   98.35000   +0.01000     
================================================
  Files           907        908         +1     
  Lines         13454      13485        +31     
  Branches       3604       3598         -6     
================================================
+ Hits          13232      13263        +31     
  Misses          218        218                
  Partials          4          4                
Files Coverage Δ
...dePlanPage/UpgradeForm/UpdateBlurb/UpdateBlurb.tsx 100.00% <100.00%> (ø)
...Routes/UpgradePlanPage/UpgradeForm/UpgradeForm.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 53.84% <ø> (ø)
Layouts 97.60% <ø> (ø)
Pages 99.15% <100.00%> (+<0.01%) ⬆️
Services 99.47% <ø> (ø)
Shared 99.69% <ø> (ø)
UI 94.27% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d3b793...d4a464f. Read the comment docs.

Copy link
Contributor

@spalmurray-codecov spalmurray-codecov left a comment

Choose a reason for hiding this comment

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

lgtm

@ajay-sentry ajay-sentry added this pull request to the merge queue Jul 12, 2024
Merged via the queue into main with commit e1f3632 Jul 12, 2024
61 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/1853-update-plan-updates branch July 12, 2024 16:19
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.

Review flow for updating plan
3 participants