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

627 upgrade page multi choice selector #2376

Merged
merged 3 commits into from
Nov 3, 2023

Conversation

adrian-codecov
Copy link
Contributor

Description

We're refactoring the UpgradeDetails component to better support different plans. This looks like a lot sadly, but it's mostly refactoring tests and putting things into their own folders. This contains no addition of the Team card whatsoever, solely refactoring.

Notable Changes

  • Got rid of props from UpgradeDetails down to every child
  • UpgradePlanPage -> uses the UpgradeDetails component without props
  • UpgradeDetails -> now this file's responsibility is to chose between the new SentryPlanDetails component and the new ProPlanDetails component. SentryPlanDetails already existed as a subcomponent of the UpgradeDetails file, but I made it into it's own file. ProPlanDetails is a new file that inherited all the logic that used to be in UpgradeDetails. All of these have no props drilled into them.
  • Moved around tests and made sure functionality is still working. This is the part I'd like a bit more attention on if possible. The main tests I can think of are:
    Basic
    Basic - sentry user
    Pro
    Pro - sentry user
    Trial

*There's probably functionality improvement (I see someone here using account-details to decide the plan you have, but I decided not to replace that logic with the usePlanData hook in case it doesn't work, that comes in later).

Screenshots

screen-capture.6.webm

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

netlify bot commented Nov 3, 2023

Deploy Preview for gazebo-staging ready!

Name Link
🔨 Latest commit 14820ee
🔍 Latest deploy log https://app.netlify.com/sites/gazebo-staging/deploys/654533eb665ddf0008462949
😎 Deploy Preview https://deploy-preview-2376--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.

@codecov-staging
Copy link

codecov-staging bot commented Nov 3, 2023

Codecov Report

Merging #2376 (14820ee) into main (da495ce) will decrease coverage by 0.70%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2376      +/-   ##
==========================================
- Coverage   96.96%   96.27%   -0.70%     
==========================================
  Files         734      736       +2     
  Lines        8940     8956      +16     
  Branches     2221     2229       +8     
==========================================
- Hits         8669     8622      -47     
- Misses        267      317      +50     
- Partials        4       17      +13     
Files Coverage Δ
...e/UpgradeDetails/ProPlanDetails/ProPlanDetails.jsx 100.00% <100.00%> (ø)
...adeDetails/SentryPlanDetails/SentryPlanDetails.jsx 100.00% <100.00%> (ø)
.../UpgradePlanPage/UpgradeDetails/UpgradeDetails.jsx 100.00% <100.00%> (ø)
...Page/subRoutes/UpgradePlanPage/UpgradePlanPage.jsx 100.00% <ø> (ø)
src/shared/utils/upgradeForm.js 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes


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 da495ce...14820ee. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Nov 3, 2023

Codecov Report

Merging #2376 (14820ee) into main (da495ce) will decrease coverage by 0.70%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2376      +/-   ##
==========================================
- Coverage   96.96%   96.27%   -0.70%     
==========================================
  Files         734      736       +2     
  Lines        8940     8956      +16     
  Branches     2175     2224      +49     
==========================================
- Hits         8669     8622      -47     
- Misses        267      318      +51     
- Partials        4       16      +12     
Files Coverage Δ
...e/UpgradeDetails/ProPlanDetails/ProPlanDetails.jsx 100.00% <100.00%> (ø)
...adeDetails/SentryPlanDetails/SentryPlanDetails.jsx 100.00% <100.00%> (ø)
.../UpgradePlanPage/UpgradeDetails/UpgradeDetails.jsx 100.00% <100.00%> (ø)
...Page/subRoutes/UpgradePlanPage/UpgradePlanPage.jsx 100.00% <ø> (ø)
src/shared/utils/upgradeForm.js 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes


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 da495ce...14820ee. Read the comment docs.

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Merging #2376 (14820ee) into main (da495ce) will decrease coverage by 0.70%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2376     +/-   ##
=======================================
- Coverage   96.97   96.27   -0.70     
=======================================
  Files        734     736      +2     
  Lines       8940    8956     +16     
  Branches    2221    2224      +3     
=======================================
- Hits        8669    8622     -47     
- Misses       266     318     +52     
- Partials       5      16     +11     
Files Coverage Δ
...e/UpgradeDetails/ProPlanDetails/ProPlanDetails.jsx 100.00% <100.00%> (ø)
...adeDetails/SentryPlanDetails/SentryPlanDetails.jsx 100.00% <100.00%> (ø)
.../UpgradePlanPage/UpgradeDetails/UpgradeDetails.jsx 100.00% <100.00%> (ø)
...Page/subRoutes/UpgradePlanPage/UpgradePlanPage.jsx 100.00% <ø> (ø)
src/shared/utils/upgradeForm.js 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes


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 da495ce...14820ee. Read the comment docs.

@nicholas-codecov nicholas-codecov self-requested a review November 3, 2023 10:59
Copy link
Contributor

@nicholas-codecov nicholas-codecov left a comment

Choose a reason for hiding this comment

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

Classical piano was too distracting in explanation video can only give a 6/10 🙁

Awesome work on the refactor this should make things a lot more composable down the road for adding in the team plan 🎉

${sentryPlanMonth?.baseUnitPrice} per user / month if paid monthly
</p>
{/* TODO: Note that there never was schedules shown here like it is in the pro plan details page. This
is a bug imo and needs to be here in a future ticket */}
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you created said ticket 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I, have not 😬 will create it now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines -44 to +43
<UpgradeDetails
accountDetails={accountDetails}
plan={plan}
plans={plans}
proPlanMonth={proPlanMonth}
proPlanYear={proPlanYear}
sentryPlanMonth={sentryPlanMonth}
sentryPlanYear={sentryPlanYear}
scheduledPhase={scheduledPhase}
/>
<UpgradeDetails />
Copy link
Contributor

Choose a reason for hiding this comment

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

It's so beautiful 🥲

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It truly is, it took a while, but it's worth

@adrian-codecov adrian-codecov merged commit 094c204 into main Nov 3, 2023
24 of 27 checks passed
@adrian-codecov adrian-codecov deleted the 627-upgrade-page-multi-choice-selector branch November 3, 2023 18:01
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.

2 participants