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: Hide expired banner when clicking on upgrade link #2398

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR adds an onClick event to the upgrade button in the ExpiredBanner that saves the value to the local storage. This is a little hacky because it's reliant on the navigation to update the state when returning to the previous page to actually hide the banner because there's no real way to update the state from the ExpiredBanner component itself.

Closes codecov/engineering-team#746

Notable Changes

  • Update ExpiredBanner
  • Update TopBanner
  • Update tests

Copy link

netlify bot commented Nov 10, 2023

Deploy Preview for gazebo-staging ready!

Name Link
🔨 Latest commit 7b74726
🔍 Latest deploy log https://app.netlify.com/sites/gazebo-staging/deploys/65537f31bfc53d000840ef68
😎 Deploy Preview https://deploy-preview-2398--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 10, 2023

Codecov Report

Merging #2398 (7b74726) into main (a246d20) will increase coverage by 0.00%.
The diff coverage is 80.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2398   +/-   ##
=======================================
  Coverage   96.18%   96.18%           
=======================================
  Files         750      750           
  Lines        9406     9411    +5     
  Branches     2364     2364           
=======================================
+ Hits         9047     9052    +5     
  Misses        341      341           
  Partials       18       18           
Files Coverage Δ
...red/GlobalTopBanners/TrialBanner/ExpiredBanner.tsx 100.00% <100.00%> (ø)
src/ui/TopBanner/TopBanner.tsx 81.81% <71.42%> (+0.86%) ⬆️

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 a246d20...7b74726. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Nov 10, 2023

Codecov Report

Merging #2398 (7b74726) into main (a246d20) will increase coverage by 0.00%.
The diff coverage is 80.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2398   +/-   ##
=======================================
  Coverage   96.18%   96.18%           
=======================================
  Files         750      750           
  Lines        9406     9411    +5     
  Branches     2369     2369           
=======================================
+ Hits         9047     9052    +5     
  Misses        341      341           
  Partials       18       18           
Files Coverage Δ
...red/GlobalTopBanners/TrialBanner/ExpiredBanner.tsx 100.00% <100.00%> (ø)
src/ui/TopBanner/TopBanner.tsx 81.81% <71.42%> (+0.86%) ⬆️

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 a246d20...7b74726. Read the comment docs.

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #2398 (7b74726) into main (a246d20) will increase coverage by 0.01%.
The diff coverage is 80.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2398     +/-   ##
=======================================
+ Coverage   96.18   96.19   +0.01     
=======================================
  Files        750     750             
  Lines       9406    9411      +5     
  Branches    2318    2320      +2     
=======================================
+ Hits        9047    9052      +5     
  Misses       343     343             
  Partials      16      16             
Files Coverage Δ
...red/GlobalTopBanners/TrialBanner/ExpiredBanner.tsx 100.00% <100.00%> (ø)
src/ui/TopBanner/TopBanner.tsx 81.81% <71.42%> (+0.86%) ⬆️

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 a246d20...7b74726. Read the comment docs.

@nicholas-codecov nicholas-codecov merged commit 4c337d9 into main Nov 14, 2023
28 of 31 checks passed
@nicholas-codecov nicholas-codecov deleted the gh-eng-746-hide-upgrade-banner-when-clicking-on-upgrade-link branch November 14, 2023 14:25
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.

Banner persists after upgrade selection
2 participants