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: Have upgrade to team plan links include URL search param #2470

Merged
merged 8 commits into from
Dec 20, 2023

Conversation

nicholas-codecov
Copy link
Contributor

@nicholas-codecov nicholas-codecov commented Dec 20, 2023

Description

This PR updates a couple different pieces regarding the team plan, by adding in a URL search param when linking to the upgrade page so that the page will default to showing the team plan.

Closes: codecov/engineering-team#706

Notable Changes

  • Update useNavLinks -> upgradeOrgPlan to support query params being appended to URL
  • Create new usePlanParams hook to grab plan search param from the URL
  • Update relevant cards to append ?plan=team to upgrade link
  • Update PlanTypeOptions and UpgradePlanPage to grab plan param and set value to team plan if they have access to the team plan.

@codecov-staging
Copy link

codecov-staging bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2470   +/-   ##
=======================================
  Coverage   98.14%   98.14%           
=======================================
  Files         777      778    +1     
  Lines       10002    10026   +24     
  Branches     2541     2558   +17     
=======================================
+ Hits         9816     9840   +24     
  Misses        184      184           
  Partials        2        2           
Files Coverage Δ
...TeamPlanSpecialOffer/TeamPlanCard/TeamPlanCard.tsx 100.00% <ø> (ø)
...d/FreePlanCard/PlanUpgradeTeam/PlanUpgradeTeam.jsx 100.00% <100.00%> (ø)
...e/UpgradeForm2/PlanTypeOptions/PlanTypeOptions.tsx 100.00% <100.00%> (ø)
...pgradePlanPage/UpgradeForm2/hooks/usePlanParams.ts 100.00% <100.00%> (ø)
...Page/subRoutes/UpgradePlanPage/UpgradePlanPage.jsx 100.00% <100.00%> (ø)
src/services/navigation/useNavLinks/useNavLinks.js 99.02% <100.00%> (+0.01%) ⬆️
Components Coverage Δ
Assets 59.37% <ø> (ø)
Layouts 97.30% <ø> (ø)
Pages 98.99% <100.00%> (+<0.01%) ⬆️
Services 99.44% <100.00%> (+<0.01%) ⬆️
Shared 99.82% <ø> (ø)
UI 94.32% <ø> (ø)

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 b651059...e3d8520. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b651059) 98.14% compared to head (e3d8520) 98.14%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2470   +/-   ##
=======================================
  Coverage   98.14%   98.14%           
=======================================
  Files         777      778    +1     
  Lines       10002    10026   +24     
  Branches     2560     2563    +3     
=======================================
+ Hits         9816     9840   +24     
  Misses        184      184           
  Partials        2        2           
Files Coverage Δ
...TeamPlanSpecialOffer/TeamPlanCard/TeamPlanCard.tsx 100.00% <ø> (ø)
...d/FreePlanCard/PlanUpgradeTeam/PlanUpgradeTeam.jsx 100.00% <100.00%> (ø)
...e/UpgradeForm2/PlanTypeOptions/PlanTypeOptions.tsx 100.00% <100.00%> (ø)
...pgradePlanPage/UpgradeForm2/hooks/usePlanParams.ts 100.00% <100.00%> (ø)
...Page/subRoutes/UpgradePlanPage/UpgradePlanPage.jsx 100.00% <100.00%> (ø)
src/services/navigation/useNavLinks/useNavLinks.js 99.02% <100.00%> (+0.01%) ⬆️
Components Coverage Δ
Assets 59.37% <ø> (ø)
Layouts 97.30% <ø> (ø)
Pages 98.99% <100.00%> (+<0.01%) ⬆️
Services 99.44% <100.00%> (+<0.01%) ⬆️
Shared 99.82% <ø> (ø)
UI 94.32% <ø> (ø)

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 b651059...e3d8520. Read the comment docs.

Copy link

codecov-public-qa bot commented Dec 20, 2023

Codecov Report

Merging #2470 (e3d8520) into main (b651059) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2470   +/-   ##
=======================================
  Coverage   98.14%   98.14%           
=======================================
  Files         777      778    +1     
  Lines       10002    10026   +24     
  Branches     2555     2558    +3     
=======================================
+ Hits         9816     9840   +24     
  Misses        184      184           
  Partials        2        2           
Files Coverage Δ
...TeamPlanSpecialOffer/TeamPlanCard/TeamPlanCard.tsx 100.00% <ø> (ø)
...d/FreePlanCard/PlanUpgradeTeam/PlanUpgradeTeam.jsx 100.00% <100.00%> (ø)
...e/UpgradeForm2/PlanTypeOptions/PlanTypeOptions.tsx 100.00% <100.00%> (ø)
...pgradePlanPage/UpgradeForm2/hooks/usePlanParams.ts 100.00% <100.00%> (ø)
...Page/subRoutes/UpgradePlanPage/UpgradePlanPage.jsx 100.00% <100.00%> (ø)
src/services/navigation/useNavLinks/useNavLinks.js 99.02% <100.00%> (+0.01%) ⬆️
Components Coverage Δ
Assets 59.37% <ø> (ø)
Layouts 97.30% <ø> (ø)
Pages 98.99% <100.00%> (+<0.01%) ⬆️
Services 99.44% <100.00%> (+<0.01%) ⬆️
Shared 99.82% <ø> (ø)
UI 94.32% <ø> (ø)

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 b651059...e3d8520. Read the comment docs.

Copy link

netlify bot commented Dec 20, 2023

Deploy Preview for gazebo-staging ready!

Name Link
🔨 Latest commit e3d8520
🔍 Latest deploy log https://app.netlify.com/sites/gazebo-staging/deploys/65832c5b5778f900080e7c24
😎 Deploy Preview https://deploy-preview-2470--gazebo-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@adrian-codecov adrian-codecov left a comment

Choose a reason for hiding this comment

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

Looks good! Pulled branch locally to test it so lgtm!

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b651059) 83.79% compared to head (e3d8520) 98.14%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##            main   #2470      +/-   ##
========================================
+ Coverage   83.79   98.14   +14.35     
========================================
  Files        773     778       +5     
  Lines       9989   10026      +37     
  Branches    2560    2514      -46     
========================================
+ Hits        8370    9840    +1470     
+ Misses      1581     184    -1397     
+ Partials      38       2      -36     
Files Coverage Δ
...TeamPlanSpecialOffer/TeamPlanCard/TeamPlanCard.tsx 100.00% <ø> (ø)
...d/FreePlanCard/PlanUpgradeTeam/PlanUpgradeTeam.jsx 100.00% <100.00%> (ø)
...e/UpgradeForm2/PlanTypeOptions/PlanTypeOptions.tsx 100.00% <100.00%> (ø)
...pgradePlanPage/UpgradeForm2/hooks/usePlanParams.ts 100.00% <100.00%> (ø)
...Page/subRoutes/UpgradePlanPage/UpgradePlanPage.jsx 100.00% <100.00%> (ø)
src/services/navigation/useNavLinks/useNavLinks.js 99.02% <100.00%> (+0.01%) ⬆️

... and 110 files with indirect coverage changes

Components Coverage Δ
Assets 59.37% <ø> (-0.63%) ⬇️
Layouts 97.30% <ø> (ø)
Pages 98.99% <100.00%> (+26.98%) ⬆️
Services 99.44% <100.00%> (+0.16%) ⬆️
Shared 99.82% <ø> (+0.52%) ⬆️
UI 94.32% <ø> (+0.77%) ⬆️

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 b651059...e3d8520. Read the comment docs.

@nicholas-codecov nicholas-codecov merged commit ea1f29b into main Dec 20, 2023
58 checks passed
@nicholas-codecov nicholas-codecov deleted the gh-eng-706-make-buttons-update-url-location branch December 20, 2023 18:21
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.

[Client] - Plan Page: Make Buttons Update URL Location
2 participants