Skip to content

ref(dashboards): add a new table widget visualization component #93902

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 11 commits into from
Jun 20, 2025

Conversation

lzhao-sentry
Copy link
Contributor

Changes

Related to this PR: #93810. This is part 1 of the change, which is pulling out the new component and just adding it to the repo. Also includes some simplification of the logic in the base component.

Part 2 will be replacing tables in widgets.

Before/After

There is no UI change as the table is not being used yet. There is a new story page for the component.

@lzhao-sentry lzhao-sentry requested a review from a team as a code owner June 19, 2025 13:52
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 19, 2025
Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

Very nice! I have many comments, but most are nits 👍🏻

Copy link
Member

@narsaynorath narsaynorath left a comment

Choose a reason for hiding this comment

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

lgtm, I think some of the props are going to be filled in like columnSortBy at a later point? If yes, that's fine and those kinds of TODOs don't block this PR 🙏

Comment on lines 52 to 53
<Storybook.JSXProperty name="renderTableBodyCell" value="function" /> and{' '}
<Storybook.JSXProperty name="renderTableHeadCell" value="function" /> which
Copy link
Member

Choose a reason for hiding this comment

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

I found this a little hard to understand because I thought it meant that we needed to pass the string literal "function" as the value for these props. Can we reword it to just mention passing a function that returns a component?

columns: Array<TableColumn<string>>;
loading: boolean;
tableData: TableData;
fitMaxContent?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

I think I might've seen a comment from Jonas about changing this from a flag to a string literal so it can be scoped to different kinds of fit types, did we decide not to do that?

}}
stickyHeader={stickyHeader}
scrollable={scrollable}
height={'100%'}
Copy link
Member

Choose a reason for hiding this comment

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

small nit, usually if it's just a string we drop the braces

Suggested change
height={'100%'}
height="100%"

Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

Looking good! Truly only nits left 🙏🏻 This'll be ready to merge real soon

Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

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

awesome

@lzhao-sentry lzhao-sentry merged commit 4c997de into master Jun 20, 2025
45 checks passed
@lzhao-sentry lzhao-sentry deleted the lzhao/add-table-widget-visualization-component branch June 20, 2025 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants