Skip to content

feat(DataTable): add Table.Skeleton - #3055

Merged
joshblack merged 15 commits into
mainfrom
feat/add-table-skeleton
Apr 3, 2023
Merged

feat(DataTable): add Table.Skeleton#3055
joshblack merged 15 commits into
mainfrom
feat/add-table-skeleton

Conversation

@joshblack

@joshblackjoshblack commented Mar 20, 2023

Copy link
Copy Markdown
Member

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

changeset-botBot commented Mar 20, 2023

Copy link
Copy Markdown

🦋 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
NameType
@primer/reactMinor

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

github-actionsBot commented Mar 20, 2023

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js95.18 KB (0%)
dist/browser.umd.js95.75 KB (0%)

@joshblack
joshblack temporarily deployed to github-pages March 20, 2023 22:06 — with GitHub Actions Inactive
@github-actions
github-actionsBot 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-actionsBot temporarily deployed to storybook-preview-3055 March 21, 2023 15:45 Inactive
@github-actions
github-actionsBot 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-actionsBot 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 JoshBowdenConceptsMarch 22, 2023 20:37
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3055 March 22, 2023 20:41 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3055 March 22, 2023 20:43 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3055 March 22, 2023 20:43 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3055 March 22, 2023 20:43 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3055 March 22, 2023 20:47 Inactive
@primer
primerBot temporarily deployed to github-pages March 22, 2023 20:50 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3055 March 22, 2023 20:51 Inactive

@colebemiscolebemis left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
MemberAuthor

bump @mperrotti when you have a sec to review!

@mperrottimperrotti left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
MemberAuthor

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

@github-actions
github-actionsBottemporarily deployed to storybook-preview-3055 April 3, 2023 20:06 Inactive
@joshblack
joshblack added this pull request to the merge queueApr 3, 2023
Merged via the queue into main with commit 42037c9Apr 3, 2023
@joshblack
joshblack deleted the feat/add-table-skeleton branch April 3, 2023 21:11
This was referenced Apr 3, 2023
Sign up for freeto 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

@joshblack@mperrotti@colebemis