-
Notifications
You must be signed in to change notification settings - Fork 25
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
@@ 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
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
@@ 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
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. @@ 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
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ 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
Continue to review full report in Codecov by Sentry.
|
Bundle ReportChanges will decrease total bundle size by 6.13MB (-34.67%) ⬇️. This is within the configured threshold ✅ Detailed changes
|
Bundle ReportChanges will decrease total bundle size by 6.13MB (-34.67%) ⬇️. This is within the configured threshold ✅ Detailed changes
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
</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' : ''}`} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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} />
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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} />
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
- Add the name to
scripts/icon-list.mjs
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) => { |
There was a problem hiding this comment.
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.
There was a problem hiding this 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 🫡
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.