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: Change plan update banner to new alert and refresh seat count #3778

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

calvin-codecov
Copy link
Contributor

@calvin-codecov calvin-codecov commented Feb 26, 2025

Description

Closes codecov/engineering-team#1794

Code Example

Notable Changes

There are two things that this PR is doing:

  • Changing the plan updated banner to use the new Alert component we have. The ticket requested for auto refresh of the page so that on upgrade from plan to plan, it shows the latest plan instead of the previous plan. Since this ticket has been filed, we've modified how the plan page renders and it does already show the newly upgraded to plan after upgrade so we do not need a full refresh.
  • However, even though the plan update occurs when redirected from Stripe back to our plan page, the # of seats displayed in the plan card was not updating correctly in the current plan card. Clicking on "Manage plan" and adding 1 seat to the plan would redirect back to the plan page and still show the old number until manually refreshing the page. By refetching the queries before history.push, we ensure that the query cache is cleared. Running invalidateQueries was not enough.

Screenshots

Initially on free plan:
Screenshot 2025-02-26 at 1 10 37 AM
After Stripe checkout on upgrading to Team plan:
Screenshot 2025-02-26 at 1 11 23 AM
After upgrading number of seats from 2->5:
Screenshot 2025-02-26 at 1 11 43 AM

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.

Copy link

codecov bot commented Feb 26, 2025

Bundle Report

Changes will decrease total bundle size by 121 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 6.13MB -59 bytes (-0.0%) ⬇️
gazebo-production-esm 6.2MB -62 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js -132 bytes 55.08kB -0.24%
assets/index.*.js -9 bytes 630.14kB -0.0%
assets/index.*.js 79 bytes 27.48kB 0.29%

Files in assets/index.*.js:

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx → Total Size: 5.17kB

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/InfoMessageStripeCallback/InfoMessageStripeCallback.tsx → Total Size: 614 bytes

Files in assets/index.*.js:

  • ./src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/hooks/useUpgradeControls.ts → Total Size: 1.03kB
view changes for bundle: gazebo-production-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js -132 bytes 52.04kB -0.25%
assets/index-legacy.*.js 79 bytes 24.97kB 0.32%
assets/index-legacy.*.js -6 bytes 709.73kB -0.0%

Files in assets/index-legacy.*.js:

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx → Total Size: 5.17kB

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/InfoMessageStripeCallback/InfoMessageStripeCallback.tsx → Total Size: 614 bytes

Files in assets/index-legacy.*.js:

  • ./src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/hooks/useUpgradeControls.ts → Total Size: 1.03kB

@codecov-staging
Copy link

codecov-staging bot commented Feb 26, 2025

Bundle Report

Changes will decrease total bundle size by 121 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system 6.13MB -59 bytes (-0.0%) ⬇️
gazebo-staging-esm 6.2MB -62 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-staging-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js 79 bytes 24.97kB 0.32%
assets/index-legacy.*.js -6 bytes 709.73kB -0.0%
assets/index-legacy.*.js -132 bytes 52.04kB -0.25%

Files in assets/index-legacy.*.js:

  • ./src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/hooks/useUpgradeControls.ts → Total Size: 1.03kB

Files in assets/index-legacy.*.js:

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/InfoMessageStripeCallback/InfoMessageStripeCallback.tsx → Total Size: 614 bytes

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx → Total Size: 5.17kB

view changes for bundle: gazebo-staging-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js -9 bytes 630.14kB -0.0%
assets/index.*.js 79 bytes 27.48kB 0.29%
assets/index.*.js -132 bytes 55.08kB -0.24%

Files in assets/index.*.js:

  • ./src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/hooks/useUpgradeControls.ts → Total Size: 1.03kB

Files in assets/index.*.js:

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/InfoMessageStripeCallback/InfoMessageStripeCallback.tsx → Total Size: 614 bytes

  • ./src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx → Total Size: 5.17kB

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (9136ccd) to head (1e0b5e7).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3778   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      824           
  Lines       14786    14786           
  Branches     4250     4250           
=======================================
  Hits        14597    14597           
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
...anPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx 100.00% <ø> (ø)
...essageStripeCallback/InfoMessageStripeCallback.tsx 100.00% <ø> (ø)
...dePlanPage/UpgradeForm/hooks/useUpgradeControls.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <100.00%> (ø)
Services 99.36% <ø> (ø)
Shared 99.11% <ø> (ø)
UI 99.07% <ø> (ø)

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 9136ccd...1e0b5e7. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (9136ccd) to head (1e0b5e7).

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3778   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      824           
  Lines       14786    14786           
  Branches     4242     4250    +8     
=======================================
  Hits        14597    14597           
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
...anPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx 100.00% <ø> (ø)
...essageStripeCallback/InfoMessageStripeCallback.tsx 100.00% <ø> (ø)
...dePlanPage/UpgradeForm/hooks/useUpgradeControls.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <100.00%> (ø)
Services 99.36% <ø> (ø)
Shared 99.11% <ø> (ø)
UI 99.07% <ø> (ø)

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 9136ccd...1e0b5e7. Read the comment docs.

Copy link

codecov-public-qa bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (9136ccd) to head (1e0b5e7).

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3778   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      824           
  Lines       14786    14786           
  Branches     4250     4250           
=======================================
  Hits        14597    14597           
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
...anPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx 100.00% <ø> (ø)
...essageStripeCallback/InfoMessageStripeCallback.tsx 100.00% <ø> (ø)
...dePlanPage/UpgradeForm/hooks/useUpgradeControls.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <100.00%> (ø)
Services 99.36% <ø> (ø)
Shared 99.11% <ø> (ø)
UI 99.07% <ø> (ø)

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 9136ccd...1e0b5e7. Read the comment docs.

@codecov-staging
Copy link

codecov-staging bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3778   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      824           
  Lines       14786    14786           
  Branches     4242     4250    +8     
=======================================
  Hits        14597    14597           
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
...anPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx 100.00% <ø> (ø)
...essageStripeCallback/InfoMessageStripeCallback.tsx 100.00% <ø> (ø)
...dePlanPage/UpgradeForm/hooks/useUpgradeControls.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <100.00%> (ø)
Services 99.36% <ø> (ø)
Shared 99.11% <ø> (ø)
UI 99.07% <ø> (ø)

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 9136ccd...1e0b5e7. Read the comment docs.

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Feb 26, 2025

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
abfbad7 Wed, 26 Feb 2025 08:46:47 GMT Expired Expired
62dde55 Wed, 26 Feb 2025 08:59:08 GMT Expired Expired
1e0b5e7 Wed, 26 Feb 2025 09:13:22 GMT Cloud Enterprise

@calvin-codecov calvin-codecov changed the title fix: Change plan update banner to new alert and update seat count fix: Change plan update banner to new alert and refresh seat count Feb 26, 2025
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.

Auto fresh for the updated plan (green banner)
3 participants