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] Add a select all checkbox in the uploads card #3470

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

Conversation

rohitvinnakota-codecov
Copy link
Contributor

@rohitvinnakota-codecov rohitvinnakota-codecov commented Nov 6, 2024

Design: https://www.figma.com/design/ipt8D8zYKYWOhhlavVT1Ev/GH-1450?node-id=101-3956&node-type=canvas&t=5v7gx62ivRBOKxRt-0

Screen.Recording.2024-11-08.at.11.24.37.AM.mov

Note: This does not currently work with the search filters. There is a tangential follow up in this area here. Will follow up with design to get clarity there before implementing.

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.

@codecov-staging
Copy link

codecov-staging bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ailPage/CommitCoverage/UploadsCard/UploadsCard.tsx 95.55% 2 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3470      +/-   ##
==========================================
- Coverage   98.92%   98.91%   -0.02%     
==========================================
  Files         806      806              
  Lines       14376    14423      +47     
  Branches     4079     4102      +23     
==========================================
+ Hits        14222    14267      +45     
- Misses        147      149       +2     
  Partials        7        7              
Files with missing lines Coverage Δ
...tailPage/CommitCoverage/UploadsCard/UploadItem.tsx 100.00% <100.00%> (ø)
src/ui/Checkbox/Checkbox.tsx 100.00% <100.00%> (ø)
...ailPage/CommitCoverage/UploadsCard/UploadsCard.tsx 97.72% <95.55%> (-2.28%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.57% <95.91%> (-0.02%) ⬇️
Services 99.36% <ø> (ø)
Shared 99.33% <ø> (ø)
UI 99.21% <100.00%> (+<0.01%) ⬆️

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 21fe01f...1b2852e. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.91%. Comparing base (21fe01f) to head (1b2852e).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ailPage/CommitCoverage/UploadsCard/UploadsCard.tsx 95.55% 2 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3470      +/-   ##
==========================================
- Coverage   98.92%   98.91%   -0.02%     
==========================================
  Files         806      806              
  Lines       14376    14423      +47     
  Branches     4079     4095      +16     
==========================================
+ Hits        14222    14267      +45     
- Misses        147      149       +2     
  Partials        7        7              
Files with missing lines Coverage Δ
...tailPage/CommitCoverage/UploadsCard/UploadItem.tsx 100.00% <100.00%> (ø)
src/ui/Checkbox/Checkbox.tsx 100.00% <100.00%> (ø)
...ailPage/CommitCoverage/UploadsCard/UploadsCard.tsx 97.72% <95.55%> (-2.28%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.57% <95.91%> (-0.02%) ⬇️
Services 99.36% <ø> (ø)
Shared 99.33% <ø> (ø)
UI 99.21% <100.00%> (+<0.01%) ⬆️

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 21fe01f...1b2852e. Read the comment docs.


🚨 Try these New Features:

Copy link

codecov-public-qa bot commented Nov 6, 2024

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
3358 2 3356 0
View the top 2 failed tests by shortest run time
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard &gt; select all interactor &gt; shows an intermediate state
Stack Traces | 0.0455s run time
Error: expect(element).toHaveAttribute(&quot;aria-checked&quot;, &quot;mixed&quot;) // element.getAttribute(&quot;aria-checked&quot;) === &quot;mixed&quot;

Expected the element to have attribute:
  aria-checked=&quot;mixed&quot;
Received:
  aria-checked=&quot;true&quot;
 ❯ .../CommitCoverage/UploadsCard/UploadsCard.test.tsx:950:30
src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx > UploadsCard &gt; select all interactor &gt; sets state to none when clicked on intermediate state
Stack Traces | 0.0462s run time
Error: expect(element).toHaveAttribute(&quot;aria-checked&quot;, &quot;mixed&quot;) // element.getAttribute(&quot;aria-checked&quot;) === &quot;mixed&quot;

Expected the element to have attribute:
  aria-checked=&quot;mixed&quot;
Received:
  aria-checked=&quot;true&quot;
 ❯ .../CommitCoverage/UploadsCard/UploadsCard.test.tsx:964:30

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.91%. Comparing base (21fe01f) to head (1b2852e).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ailPage/CommitCoverage/UploadsCard/UploadsCard.tsx 95.55% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3470      +/-   ##
==========================================
- Coverage   98.92%   98.91%   -0.02%     
==========================================
  Files         806      806              
  Lines       14376    14423      +47     
  Branches     4079     4095      +16     
==========================================
+ Hits        14222    14267      +45     
- Misses        147      149       +2     
  Partials        7        7              
Files with missing lines Coverage Δ
...tailPage/CommitCoverage/UploadsCard/UploadItem.tsx 100.00% <100.00%> (ø)
src/ui/Checkbox/Checkbox.tsx 100.00% <100.00%> (ø)
...ailPage/CommitCoverage/UploadsCard/UploadsCard.tsx 97.72% <95.55%> (-2.28%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.57% <95.91%> (-0.02%) ⬇️
Services 99.36% <ø> (ø)
Shared 99.33% <ø> (ø)
UI 99.21% <100.00%> (+<0.01%) ⬆️

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 21fe01f...1b2852e. Read the comment docs.

@codecov-staging
Copy link

codecov-staging bot commented Nov 7, 2024

Bundle Report

Changes will decrease total bundle size by 6.13MB (-35.42%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system 5.57MB 1.47kB (0.03%) ⬆️
gazebo-staging-system-esm 5.62MB 1.67kB (0.03%) ⬆️
gazebo-staging-array-push (removed) 6.14MB (-100.0%) ⬇️

Copy link

codecov bot commented Nov 7, 2024

Bundle Report

Changes will decrease total bundle size by 6.13MB (-35.42%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 5.57MB 1.47kB (0.03%) ⬆️
gazebo-production-system-esm 5.62MB 1.67kB (0.03%) ⬆️
gazebo-production-array-push (removed) 6.14MB (-100.0%) ⬇️

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Nov 7, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
d316c27 Thu, 07 Nov 2024 15:56:22 GMT Expired Expired
6eadd77 Fri, 08 Nov 2024 15:56:57 GMT Expired Expired
6eadd77 Fri, 08 Nov 2024 15:57:12 GMT Expired Expired
c99da4e Fri, 08 Nov 2024 16:08:57 GMT Expired Expired
16d6e87 Fri, 08 Nov 2024 16:32:06 GMT Expired Expired
46cee98 Fri, 08 Nov 2024 16:51:35 GMT Expired Expired
e7656bf Fri, 22 Nov 2024 17:59:19 GMT Expired Expired
1b2852e Fri, 22 Nov 2024 18:30:29 GMT Cloud Enterprise

@rohitvinnakota-codecov rohitvinnakota-codecov changed the title [draft] Add a select all checkbox in the uploads card [feat] Add a select all checkbox in the uploads card Nov 8, 2024
@rohitvinnakota-codecov rohitvinnakota-codecov marked this pull request as ready for review November 8, 2024 16:54
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really like adding this usage specific logic to the generic component like this. IMO a better approach might be adding CVA variants for check (default) and minus then you can control the state out of here, passing in the variant as a prop. Lmk what you think.

<Checkbox checked={true} variant='minus' />
<Checkbox checked={true} />
<Checkbox checked={false} />

Copy link
Contributor

Choose a reason for hiding this comment

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

See ui/Card/Card.tsx for example of CVA variants

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahhhh wait CVA won't work for the icon as it's not css

Copy link
Contributor

@spalmurray-codecov spalmurray-codecov Nov 18, 2024

Choose a reason for hiding this comment

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

Looking at the designs, I think an optional prop just for the icon type would work:

<Checkbox icon='minus' checked={true} />

Copy link
Contributor

Choose a reason for hiding this comment

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

This would clean the component up quite a bit.

Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't the correct method for adding icons, so it'll get reverted next time someone generates them the correct way. The correct way is:

  1. Add the name to scripts/icon-list.mjs
  2. yarn run generate-icons

If you do this and notice icons being removed in the diff, you may need to fix those as well. This process has been poorly communicated on the team I think lol

}))
}

const determineCheckboxCheckedState = (title: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think with my suggested changes in Checkbox, we could remove this function.

Copy link
Contributor

@spalmurray-codecov spalmurray-codecov left a comment

Choose a reason for hiding this comment

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

Some things I noticed happy to talk through anything 🫡

@codecov codecov deleted a comment from codecov-ai bot Nov 20, 2024
@codecov codecov deleted a comment from codecov-ai bot Nov 20, 2024
@codecov codecov deleted a comment from codecov-ai bot Nov 20, 2024
@codecov codecov deleted a comment from codecov-ai bot Nov 20, 2024
@codecov codecov deleted a comment from codecov-ai bot Nov 20, 2024
@codecov codecov deleted a comment from codecov-ai bot Nov 20, 2024
@codecov codecov deleted a comment from codecov-ai bot Nov 20, 2024
@codecov codecov deleted a comment from codecov-ai bot Nov 21, 2024
@codecov codecov deleted a comment from codecov-ai bot Nov 21, 2024
@rohitvinnakota-codecov
Copy link
Contributor Author

@codecov-ai-reviewer review

@codecov codecov deleted a comment from codecov-ai bot Nov 22, 2024
@codecov codecov deleted a comment from codecov-ai bot Nov 22, 2024
@codecov codecov deleted a comment from codecov-ai bot Nov 22, 2024
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