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

Tables #18

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Tables #18

wants to merge 6 commits into from

Conversation

ianwremmel
Copy link
Contributor

@ianwremmel ianwremmel commented Oct 4, 2020

  • Adds basic table primitives
  • Provides a typesafe JSX interface for configuring how table data renders

Storybook

Design Goals

  • typesafety: it should not be possible to reference a field that is not a member of the source type
  • index safety: A single tag should configure both the column header and the column data so that there's never risk of misaligning columns

TODO

Features

  • basic table primitives
  • limited rendering config
  • add an id column so we can avoid using the row index as a key; default it to 'id'
  • sorting - side effect of full config?
  • attempt to match react-table's config
  • filtering? - side effect of full config?
  • customize header rendering
  • customize cell rendering
  • customize row rendering
  • Vertical tables?
  • gracefully handle loading states
    • initial loading state where there's no data
    • page/filter/sort transitions
  • loading state? - these are eventually intended for graphql, so it may make sense for them to do "the right thing" when data is either undefined or an explicit loading=true is passed. on the other hand, it may make sense for the parent element to deal with showing a loader, showing a pager, etc.

Docs

  • organize storybook
  • Write some freeform docs

Bugs

  • There's a rogue pre tag
  • Naming isn't great. There are some words that get used pretty heavily (e.g. "Column"), so I probably need to come up with some specific rules on terminology and the apply them aggressively. Further, we should move towards a preference for "Field" so that, eventually, DataTable, DescriptionList, and even Form could have a common interface.

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.

1 participant