Skip to content

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

Merged
merged 5 commits into from
Feb 3, 2025
Merged

chore: add Table component #16410

merged 5 commits into from
Feb 3, 2025

Conversation

BrunoQuaresma
Copy link
Collaborator

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.

Screenshot 2025-02-03 at 14 37 12

@BrunoQuaresma BrunoQuaresma self-assigned this Feb 3, 2025
@BrunoQuaresma BrunoQuaresma changed the title chore(ui): add Table component chore: add Table component Feb 3, 2025
Copy link
Contributor

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.

/>
</div>
));
Table.displayName = "Table";
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

@@ -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",
Copy link
Contributor

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

Copy link
Contributor

@jaaydenh jaaydenh left a 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.

@BrunoQuaresma BrunoQuaresma merged commit 947818f into main Feb 3, 2025
30 checks passed
@BrunoQuaresma BrunoQuaresma deleted the bq/add-table-component branch February 3, 2025 23:24
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants