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

Create <Table /> spec #535

Merged
merged 7 commits into from
Aug 17, 2023
Merged

Create <Table /> spec #535

merged 7 commits into from
Aug 17, 2023

Conversation

stephenjwatkins
Copy link
Contributor

@stephenjwatkins stephenjwatkins commented Aug 15, 2023

📝 Changes

  • Creates <Table /> spec

@stephenjwatkins stephenjwatkins marked this pull request as ready for review August 16, 2023 18:05
```ts
type DisplayTableProps = AriaLabelingProps & {
/** Columns for the table. */
columns: Column[];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

for DisplayTable, columns and rows follow a highly-specific data structure as noted in the type definitions below. this is a bit of a departure from our Table component, where the actual cell data is largely arbitrary and the rendering is controlled by the consumer (via renderHeaderCell, renderBodyCell, etc).

i think (a) i wanted to try to match our current MarketingTable API as much as we could where reasonable; and (b) it seems like to me for a display table where so much of the styling is governed by the internals of the component itself, it makes sense for it to not to defer rendering to the consumer and instead opt for a specific data structure.

let me know if that makes sense and feels cohesive enough in our component library for having the two approaches, and/or if there are better ideas

@stephenjwatkins stephenjwatkins changed the title Create <DisplayTable /> spec Create <Table /> spec Aug 17, 2023
@kevinalexliu
Copy link
Contributor

This looks great!

@stephenjwatkins stephenjwatkins merged commit 8632931 into main Aug 17, 2023
3 checks passed
@stephenjwatkins stephenjwatkins deleted the marketing_table_spec branch August 17, 2023 18:52
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