-
Notifications
You must be signed in to change notification settings - Fork 936
chore: add Table component #16410
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
chore: add Table component #16410
Conversation
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.
Is this the shadcn Table component? I didn't see a comment at the top of the file.
site/src/components/Table/Table.tsx
Outdated
/> | ||
</div> | ||
)); | ||
Table.displayName = "Table"; |
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.
Did you decide you want to keep the displayNames? so far I have removed these from all the shadcn components I have added.
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’d just go with whatever is the easiest and requires less work to get done. IMO, changing this doesn’t add value and adds a few extra steps that will have to be done every time we add or update a component. But since we decided as a team to remove it, I’ll do it. I just forget these things… we probably should have a lint rule for that if we want it to be mandatory.
site/package.json
Outdated
@@ -62,6 +62,7 @@ | |||
"@radix-ui/react-switch": "1.1.1", | |||
"@radix-ui/react-visually-hidden": "1.1.0", | |||
"@tanstack/react-query-devtools": "4.35.3", | |||
"@tanstack/react-table": "8.20.6", |
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.
Doesn't seem like this is used yet in this PR
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 didn't see an obvious way to add a border radius to only the table body but otherwise looks good.
Reference: https://www.figma.com/design/JYW69pbgOMr21fCMiQsPXg/Provisioners?node-id=10-2056&m=dev
Unfortunately, it’s kinda hard to apply a border only around the table body using CSS and make it rounded—at least I couldn’t figure out a sane way to do that. We’d probably need to use a workaround, like not using the native HTML table element, but that would add significant work. With that in mind, I'm wrapping the entire table with a border.