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: Tokenless banners #3358

Merged
merged 5 commits into from
Oct 9, 2024
Merged

feat: Tokenless banners #3358

merged 5 commits into from
Oct 9, 2024

Conversation

RulaKhaled
Copy link
Contributor

@RulaKhaled RulaKhaled commented Oct 7, 2024

Description

This updates tokeneless banners to display:

  • Token required banner (admin view)
  • Token required banner (member view)
  • Token not required banner (admin view)
  • Token not required banner (member view)

Notable Changes

  • New hook for tokenless
  • Tokenless holds logic for required vs non required
  • Nested banners hold logic for admin vs member

Screenshots

Screenshot 2024-10-06 at 1 48 09 PM Screenshot 2024-10-06 at 1 48 16 PM Screenshot 2024-10-06 at 1 39 26 PM Screenshot 2024-10-06 at 1 39 17 PM

Link to Sample Entry

Design: https://www.figma.com/design/CRM2ODN4ihBWITjC3xryF1/GH-2100?node-id=1-2&node-type=canvas&t=1YFaoET5ZEuqBoB4-0

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 Oct 7, 2024

Bundle Report

Changes will decrease total bundle size by 2.12kB (-0.03%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-array-push 6.13MB 2.12kB (-0.03%) ⬇️

@codecov-notifications
Copy link

codecov-notifications bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 98.30508% with 1 line in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...Banner/TokenRequiredBanner/TokenRequiredBanner.tsx 96.55% 1 Missing ⚠️

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3358   +/-   ##
=======================================
  Coverage   99.17%   99.17%           
=======================================
  Files         799      802    +3     
  Lines       14105    14139   +34     
  Branches     3891     3896    +5     
=======================================
+ Hits        13988    14022   +34     
  Misses        108      108           
  Partials        9        9           
Files with missing lines Coverage Δ
...ces/uploadTokenRequired/useUploadTokenRequired.tsx 100.00% <100.00%> (ø)
.../TokenNotRequiredBanner/TokenNotRequiredBanner.tsx 100.00% <100.00%> (ø)
...obalTopBanners/TokenlessBanner/TokenlessBanner.tsx 100.00% <100.00%> (+3.84%) ⬆️
...Banner/TokenRequiredBanner/TokenRequiredBanner.tsx 96.55% <96.55%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.95% <ø> (ø)
Services 99.45% <100.00%> (+<0.01%) ⬆️
Shared 99.80% <97.91%> (+<0.01%) ⬆️
UI 99.10% <ø> (ø)

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 55c3e63...8305896. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 98.30508% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.17%. Comparing base (55c3e63) to head (8305896).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...Banner/TokenRequiredBanner/TokenRequiredBanner.tsx 96.55% 1 Missing ⚠️

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3358   +/-   ##
=======================================
  Coverage   99.17%   99.17%           
=======================================
  Files         799      802    +3     
  Lines       14105    14139   +34     
  Branches     3886     3901   +15     
=======================================
+ Hits        13988    14022   +34     
  Misses        108      108           
  Partials        9        9           
Files with missing lines Coverage Δ
...ces/uploadTokenRequired/useUploadTokenRequired.tsx 100.00% <100.00%> (ø)
.../TokenNotRequiredBanner/TokenNotRequiredBanner.tsx 100.00% <100.00%> (ø)
...obalTopBanners/TokenlessBanner/TokenlessBanner.tsx 100.00% <100.00%> (+3.84%) ⬆️
...Banner/TokenRequiredBanner/TokenRequiredBanner.tsx 96.55% <96.55%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.95% <ø> (ø)
Services 99.45% <100.00%> (+<0.01%) ⬆️
Shared 99.80% <97.91%> (+<0.01%) ⬆️
UI 99.10% <ø> (ø)

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 55c3e63...8305896. Read the comment docs.

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 98.30508% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.17%. Comparing base (55c3e63) to head (8305896).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...Banner/TokenRequiredBanner/TokenRequiredBanner.tsx 96.55% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3358   +/-   ##
=======================================
  Coverage   99.17%   99.17%           
=======================================
  Files         799      802    +3     
  Lines       14105    14139   +34     
  Branches     3891     3901   +10     
=======================================
+ Hits        13988    14022   +34     
  Misses        108      108           
  Partials        9        9           
Files with missing lines Coverage Δ
...ces/uploadTokenRequired/useUploadTokenRequired.tsx 100.00% <100.00%> (ø)
.../TokenNotRequiredBanner/TokenNotRequiredBanner.tsx 100.00% <100.00%> (ø)
...obalTopBanners/TokenlessBanner/TokenlessBanner.tsx 100.00% <100.00%> (+3.84%) ⬆️
...Banner/TokenRequiredBanner/TokenRequiredBanner.tsx 96.55% <96.55%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.95% <ø> (ø)
Services 99.45% <100.00%> (+<0.01%) ⬆️
Shared 99.80% <97.91%> (+<0.01%) ⬆️
UI 99.10% <ø> (ø)

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 55c3e63...8305896. Read the comment docs.

Copy link

codecov-public-qa bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 98.30508% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.17%. Comparing base (55c3e63) to head (8305896).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3358   +/-   ##
=======================================
  Coverage   99.17%   99.17%           
=======================================
  Files         799      802    +3     
  Lines       14105    14139   +34     
  Branches     3886     3896   +10     
=======================================
+ Hits        13988    14022   +34     
  Misses        108      108           
  Partials        9        9           
Files Coverage Δ
...ces/uploadTokenRequired/useUploadTokenRequired.tsx 100.00% <100.00%> (ø)
.../TokenNotRequiredBanner/TokenNotRequiredBanner.tsx 100.00% <100.00%> (ø)
...obalTopBanners/TokenlessBanner/TokenlessBanner.tsx 100.00% <100.00%> (+3.84%) ⬆️
...Banner/TokenRequiredBanner/TokenRequiredBanner.tsx 96.55% <96.55%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.95% <ø> (ø)
Services 99.45% <100.00%> (+<0.01%) ⬆️
Shared 99.80% <97.91%> (+<0.01%) ⬆️
UI 99.10% <ø> (ø)

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 55c3e63...8305896. Read the comment docs.

@RulaKhaled RulaKhaled marked this pull request as draft October 7, 2024 13:54
@codecov-releaser
Copy link
Contributor

codecov-releaser commented Oct 7, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
6b93370 Mon, 07 Oct 2024 13:56:03 GMT Expired Expired
bf9629f Mon, 07 Oct 2024 14:27:27 GMT Expired Expired
7508c43 Mon, 07 Oct 2024 15:12:11 GMT Expired Expired
8305896 Tue, 08 Oct 2024 15:13:37 GMT Cloud Enterprise

@RulaKhaled RulaKhaled marked this pull request as ready for review October 8, 2024 15:05
@codecov-staging
Copy link

Bundle Report

Changes will decrease total bundle size by 2.12kB (-0.03%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-array-push 6.13MB 2.12kB (-0.03%) ⬇️

})

describe('unsuccessful parse of zod schema', () => {
beforeEach(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this and the other could be "beforeAll" and "afterAll."

{typeof orgUploadToken === 'string' ? (
<OrgUploadTokenTooltip orgUploadToken={orgUploadToken} />
) : (
'the global upload token '
Copy link
Contributor

Choose a reason for hiding this comment

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

weird how it says this line is uncovered when you specifically have a test for it 🤔

Copy link
Contributor Author

@RulaKhaled RulaKhaled Oct 9, 2024

Choose a reason for hiding this comment

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

it's been acting up like that lately i posted about it got no help :"D

Copy link
Contributor

@ajay-sentry ajay-sentry left a comment

Choose a reason for hiding this comment

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

nice work!

@RulaKhaled RulaKhaled added this pull request to the merge queue Oct 9, 2024
Merged via the queue into main with commit 292f404 Oct 9, 2024
54 of 62 checks passed
@RulaKhaled RulaKhaled deleted the tweak-tokenless-banners branch October 9, 2024 08:45
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.

3 participants