Skip to content

feat: add Table component - #1102

Merged
frankieyan merged 26 commits into
mainfrom
rmartins90/reactist-table-demo
Aug 20, 2026
Merged

feat: add Table component#1102
frankieyan merged 26 commits into
mainfrom
rmartins90/reactist-table-demo

Conversation

@rmartins90

@rmartins90 rmartins90 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Related: https://github.com/Doist/frontend-issues/issues/1369
Comms: https://comms.todoist.com/69/ch/AsbcUEc1FA3JTc5Rm36GZ/t/CctatEVHf1VZPEj1FND6Q/

Short description

Adds a Reactist Table based on the Design team's specs.

image

Note from Frankie:

Pivoting from https://github.com/Doist/frontend-issues/issues/1369, this takes on a compositional API where consumers are responsible for rendering the table's internals. If you need a column header row, you'd include <TableHeader>. That also means you can freely use any modelling layer, including TanStack.

To review in Storybook:

  1. Run npm run storybook.
  2. Open Data display / Table / Default and inspect whether the implementation matches the design specs, including tabular number spacing in the "Projects" column
  3. Open Selected and clickable rows, then activate rows with pointer, Enter, and Space.
  4. Open TanStack Table integration and test out sorting and pagination

PR Checklist

  • Added tests for bugs / new features
  • Updated docs (storybooks, readme)
  • Reviewed and approved Chromatic visual regression tests in CI

rmartins90 and others added 11 commits August 18, 2026 21:07
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…signs

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
… CSS

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@frankieyan frankieyan changed the title feat: add provisional Table component feat: add Table component Aug 19, 2026
@frankieyan
frankieyan marked this pull request as ready for review August 19, 2026 07:21
@frankieyan
frankieyan marked this pull request as draft August 19, 2026 07:21
@doistbot

This comment was marked as outdated.

Co-Authored-By: Claude <noreply@anthropic.com>
doistbot

This comment was marked as outdated.

frankieyan and others added 2 commits August 19, 2026 00:35
Co-Authored-By: Claude <noreply@anthropic.com>
…n React 18

Co-Authored-By: Claude <noreply@anthropic.com>
@frankieyan
frankieyan force-pushed the rmartins90/reactist-table-demo branch from 285ff91 to 260acf0 Compare August 19, 2026 07:41
@frankieyan
frankieyan marked this pull request as ready for review August 19, 2026 07:45
@frankieyan frankieyan added the 🙋 Ask PR Used for PRs that need a review before merging. label Aug 19, 2026
@frankieyan
frankieyan requested a review from doistbot August 19, 2026 07:54
@frankieyan
frankieyan force-pushed the rmartins90/reactist-table-demo branch from 260acf0 to c5e2c50 Compare August 19, 2026 07:58

@doistbot doistbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Adds a compositional, native-HTML Table component with primitives for header, body, rows, and cells, plus sort-indicator support and TanStack integration stories.

I also included a few optional follow-up notes in the details below.

Optional follow-up notes (4)
  • P3 src/table/table.module.css:3: Route these Product Library values through --reactist-table-* variables declared in this file's :root, then consume those component variables throughout. The Table currently has no Reactist-specific token surface, so consumers cannot override its defaults independently and the styles bypass the repository token convention.
  • P3 src/table/table.stories.tsx:157: Default and NarrowViewport render byte-identical four-column people tables, and SelectedAndClickableRows repeats the same markup with only the row aria-selected/tabIndex/handlers added. Extract one renderPeopleTable() helper (or a PeopleTable component) and reuse it across all three to cut ~120 duplicated lines without changing what each story demonstrates.
  • P3 src/table/table.stories.tsx:442: The sortable and non-sortable branches of this ternary duplicate the <TableColumnHeader> wrapper and its <Text>/flexRender children. Hoist the rendered header content into a variable (const content = <Text variant="body-2">{flexRender(...)}</Text>) and only vary the sortable props between branches.
  • P3 src/table/table.test.tsx:76: This test verifies that TableCell is transparent by checking CSS class names on the child Text component (variant-callout-2, lineClamp-1). Those classes belong to Text, not TableCell — if Text changes its CSS module naming, this table test breaks for no table-related reason. The parentElement?.tagName assertion alone already proves the TD wrapping. Drop the className assertions on the child, or replace them with a simpler child (e.g. a plain <span data-testid="child">) and assert it renders directly inside the td.

Share FeedbackReview Logs

Comment thread src/table/table.tsx
Comment thread src/table/table.module.css Outdated
Comment thread src/table/table.tsx
Comment thread src/table/table.tsx
@frankieyan
frankieyan force-pushed the rmartins90/reactist-table-demo branch from c5e2c50 to f8f1ff0 Compare August 19, 2026 08:08
frankieyan and others added 4 commits August 19, 2026 01:16
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@frankieyan
frankieyan requested review from a team, pawelgrimm and scottlovegrove and removed request for a team August 19, 2026 08:22
Comment thread src/table/table.module.css Outdated
Comment thread src/table/table.tsx
Comment thread src/table/table.module.css
Comment thread src/table/table.tsx Outdated
Comment thread src/table/table.tsx Outdated
Comment thread src/table/table.tsx Outdated
frankieyan and others added 6 commits August 19, 2026 15:02
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@frankieyan
frankieyan force-pushed the rmartins90/reactist-table-demo branch from f261340 to b7e5b58 Compare August 19, 2026 23:51
Co-Authored-By: Claude <noreply@anthropic.com>
@frankieyan
frankieyan force-pushed the rmartins90/reactist-table-demo branch from 671ac0f to 4a6d103 Compare August 20, 2026 00:53
@frankieyan
frankieyan merged commit d50ab02 into main Aug 20, 2026
10 of 12 checks passed
@frankieyan
frankieyan deleted the rmartins90/reactist-table-demo branch August 20, 2026 00:59
@doist-release-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 37.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@doist-release-bot doist-release-bot Bot added the Released PRs that have been merged and released label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🙋 Ask PR Used for PRs that need a review before merging. Released PRs that have been merged and released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants