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 14 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.15385% 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.65% 2 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3470      +/-   ##
==========================================
- Coverage   99.09%   99.07%   -0.02%     
==========================================
  Files         804      804              
  Lines       14187    14236      +49     
  Branches     4017     4034      +17     
==========================================
+ Hits        14058    14105      +47     
- Misses        120      122       +2     
  Partials        9        9              
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.75% <95.65%> (-2.25%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.78% <96.00%> (-0.02%) ⬇️
Services 99.36% <ø> (ø)
Shared 99.74% <ø> (ø)
UI 99.15% <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 96f88d8...46cee98. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Nov 6, 2024

Codecov Report

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

Project coverage is 99.07%. Comparing base (96f88d8) to head (46cee98).

✅ All tests successful. No failed tests found.

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

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3470      +/-   ##
==========================================
- Coverage   99.09%   99.07%   -0.02%     
==========================================
  Files         804      804              
  Lines       14187    14236      +49     
  Branches     4024     4041      +17     
==========================================
+ Hits        14058    14105      +47     
- Misses        120      122       +2     
  Partials        9        9              
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.75% <95.65%> (-2.25%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.78% <96.00%> (-0.02%) ⬇️
Services 99.36% <ø> (ø)
Shared 99.74% <ø> (ø)
UI 99.15% <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 96f88d8...46cee98. Read the comment docs.

Copy link

codecov-public-qa bot commented Nov 6, 2024

Codecov Report

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

Project coverage is 99.07%. Comparing base (96f88d8) to head (46cee98).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3470      +/-   ##
==========================================
- Coverage   99.09%   99.07%   -0.02%     
==========================================
  Files         804      804              
  Lines       14187    14236      +49     
  Branches     4017     4034      +17     
==========================================
+ Hits        14058    14105      +47     
- Misses        120      122       +2     
  Partials        9        9              
Files 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.75% <95.65%> (-2.25%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.78% <96.00%> (-0.02%) ⬇️
Services 99.36% <ø> (ø)
Shared 99.74% <ø> (ø)
UI 99.15% <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 96f88d8...46cee98. Read the comment docs.

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

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

Project coverage is 99.07%. Comparing base (96f88d8) to head (46cee98).

✅ All tests successful. No failed tests found.

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

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3470      +/-   ##
==========================================
- Coverage   99.09%   99.07%   -0.02%     
==========================================
  Files         804      804              
  Lines       14187    14236      +49     
  Branches     4024     4041      +17     
==========================================
+ Hits        14058    14105      +47     
- Misses        120      122       +2     
  Partials        9        9              
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.75% <95.65%> (-2.25%) ⬇️
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.78% <96.00%> (-0.02%) ⬇️
Services 99.36% <ø> (ø)
Shared 99.74% <ø> (ø)
UI 99.15% <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 96f88d8...46cee98. 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 (-34.67%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system 5.75MB 2.27kB (0.04%) ⬆️
gazebo-staging-system-esm 5.8MB 2.53kB (0.04%) ⬆️
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 (-34.67%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 5.75MB 2.27kB (0.04%) ⬆️
gazebo-production-system-esm 5.8MB 2.53kB (0.04%) ⬆️
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 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
</span>
)}
<span
className={`sticky top-0 flex-1 border-r border-ds-gray-secondary bg-ds-gray-primary px-4 py-1 text-sm font-semibold ${title === NONE ? 'text-ds-gray-quaternary' : ''}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

cn helper handles conditional styles a bit more easily.

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 🫡

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