-
Notifications
You must be signed in to change notification settings - Fork 647
feat: add DataTable and Table to drafts #2951
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
Conversation
🦋 Changeset detectedLatest commit: 6a6d850 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
| '@primer/react': minor | ||
| --- | ||
|
|
||
| Add DataTable, Table to drafts entrypoint |
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 am wondering when will be the best time to start exporting new components in experimental bundle instead of drafts? According to the ADR
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.
Great point, reached out about this over in Slack to see where that work is. For this PR I'll add it to drafts and will add it to experimental once that gets created 👀
colebemis
left a comment
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.
Exciting to see this take shape!
| TableContainer, | ||
| TableTitle, | ||
| TableSubtitle, | ||
| } from '../DataTable' |
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.
✨
| * example: import {ActionList} from '@primer/react/drafts | ||
| */ | ||
|
|
||
| export {DataTable, Table} from '../DataTable' |
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.
Should we export any prop types?
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.
Makes sense to me as part of the definition of done. To implement this, should I include props as exports for any exported component?
Closes https://github.com/github/primer/issues/1814
This PR adds
DataTableandTableto the drafts bundle with the following API:DataTableTable.*Table.ContainerTable.TitleTable.SubtitleTableTable.HeadTable.BodyTable.RowTable.HeaderTable.CellThe idea behind this implementation is that
DataTableis an alternative toTableand can slot into that position:Tablemay also be used there and each part ofTableis available under that identifier.One risk with this approach is that
Table.*contains both descendants of aTableand ancestors likeContainer,Title, orSubtitle. The risk here would be that certain terms may be overloaded, like inTable.Header. This would refer to a<th>but in the context of a layout withinTable.Containerwould refer to the header region of a layout.Changelog
New
Table.*componentsChanged
interfacetotypeDataTable.tsxandTable.tsxTableandDataTableto drafts entrypointroletags forth,tr,tdfor usage ofdisplay: gridfor column width optionsRemoved