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

feat(DataTable): add Table.Skeleton #3055

Merged
merged 15 commits into from
Apr 3, 2023
Merged

feat(DataTable): add Table.Skeleton #3055

merged 15 commits into from
Apr 3, 2023

Conversation

joshblack
Copy link
Member

@joshblack joshblack commented Mar 20, 2023

Batch: https://github.com/github/primer/issues/1892

This is currently a visual an API implementation of Table.Skeleton. The behavior is not finalized when it comes to how to indicate loading content. In the meantime, the cells themselves contain "Loading" as text content. Most of the styles for the Table cell skeleton items are lifted from TreeView.

One caveat to this API, it is currently bound to Column as it seemed natural to toggle between the two with an existing set of columns. It may be useful in the future to permit less restrictive types (like Array<string>) for usage.

Testing & Reviewing

  • Verify that the "With Loading" example is available on the storybook and included in the docs.json for DataTable
  • Verify that the styles look as expected for the Table Skeleton
  • Verify that Table.Skeleton is defined and its props are exported
  • Verify that a test exists for rendering a Table.Skeleton
    • Note: I omitted a test for rows since it's a visual only change and I did not want to test structural changes in enzyme

@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2023

🦋 Changeset detected

Latest commit: 0ebec96

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 95.18 KB (0%)
dist/browser.umd.js 95.75 KB (0%)

@joshblack joshblack temporarily deployed to github-pages March 20, 2023 22:06 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3055 March 20, 2023 22:07 Inactive
@joshblack joshblack temporarily deployed to github-pages March 21, 2023 15:45 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3055 March 21, 2023 15:45 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3055 March 21, 2023 15:51 Inactive
@joshblack joshblack temporarily deployed to github-pages March 21, 2023 15:54 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3055 March 21, 2023 15:54 Inactive
@joshblack joshblack marked this pull request as ready for review March 22, 2023 20:37
@joshblack joshblack requested review from a team, JoshBowdenConcepts, colebemis and mperrotti and removed request for JoshBowdenConcepts March 22, 2023 20:37
@github-actions github-actions bot temporarily deployed to storybook-preview-3055 March 22, 2023 20:41 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3055 March 22, 2023 20:43 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3055 March 22, 2023 20:43 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3055 March 22, 2023 20:43 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3055 March 22, 2023 20:47 Inactive
@primer primer bot temporarily deployed to github-pages March 22, 2023 20:50 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3055 March 22, 2023 20:51 Inactive
Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

Looks great! 🚀

  • Verify that the "With Loading" example is available on the storybook and included in the docs.json for DataTable
  • Verify that the styles look as expected for the Table Skeleton
  • Verify that Table.Skeleton is defined and its props are exported
  • Verify that a test exists for rendering a Table.Skeleton

@joshblack
Copy link
Member Author

bump @mperrotti when you have a sec to review!

Copy link
Contributor

@mperrotti mperrotti left a comment

Choose a reason for hiding this comment

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

I'm so sorry I didn't review this sooner! I have no idea how it slipped by me.

flex-direction: column;
}

.TableCellSkeletonItem {
Copy link
Contributor

Choose a reason for hiding this comment

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

If we see this style of "loading" placeholder come up again, we should consider creating some kind of "SkeletonLoader" component that can be reused. We already use something identical in TreeView.

Copy link
Member Author

Choose a reason for hiding this comment

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

@mperrotti agreed 100% 💯 Would be so useful

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