Skip to content

feat(docs): render component property tables in three columns - #2830

Open
Lisa18289 wants to merge 5 commits into
mainfrom
claude/component-properties-table-6b18f6
Open

feat(docs): render component property tables in three columns#2830
Lisa18289 wants to merge 5 commits into
mainfrom
claude/component-properties-table-6b18f6

Conversation

@Lisa18289

@Lisa18289 Lisa18289 commented Aug 11, 2026

Copy link
Copy Markdown
Member

The property tables squeezed the description into a narrow column and grew rows several lines tall; below ~900px content width the table cut the description off entirely.

  • 3 columns instead of 4 — the Default column was - for most properties, its value now sits under the type. layout="fixed" with 22/34/44% and minWidth={640} so one long generic can't size the whole table.
  • Type column: union members without their quotes, the member matching the default marked (default) in the muted label style. The default: line under the type only appears when nothing matches (className, boolean).
  • Property names wrap instead of overflowing their column — whiteSpace="nowrap" plus a fixed layout let excludeFromTabOrder bleed into the Type column.
  • The server-rendered fallback mirrors all of it, so mounting the react-aria table does not shift the page.
  • Fixes a pre-existing display bug: defaults from an @default: x JSDoc tag kept their colon and rendered as : true.

Out of scope: propertiesToMarkdown.ts (llms.txt) keeps its four-column markdown — a machine-readable Default column is useful there.

Verified in-browser at 375/768/900/1280px against Button, TextField, Select and Form: nothing overflows, the table scrolls inside its own container on narrow viewports, and the static fallback matches the mounted table. No automated visual coverage exists for docs pages — worth a look at the rendered component pages during review.

🤖 Generated with Claude Code

Property tables squeezed the description into a narrow column and grew
rows several lines tall. On a 900px-wide content column the table
overflowed horizontally and cut the description off entirely.

- Merge Default into the Type column. A dedicated Default column was "-"
  for most properties and took width the description needs.
- Render union types as one chip per member instead of a single
  "a" | "b" | "c" string, the main reason rows grew tall. Splitting is
  bracket-aware, so Iterable<A | B> | null yields two members.
- Set layout="fixed" with explicit column widths (22/34/44%) so a single
  long generic can no longer size the whole table, plus minWidth=640 to
  scroll inside the table container on mobile rather than shrink further.
- Property names are bold without the InlineCode background, and wrap
  instead of overflowing their column.
- Mirror all of it in the server-rendered fallback so mounting the
  react-aria table does not shift the page.

llms.txt keeps its four-column markdown: a machine-readable Default
column is useful there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for ./packages/components/

Status Category Percentage Covered / Total
🔵 Lines 75.59% 601 / 795
🔵 Statements 75.46% 615 / 815
🔵 Functions 77.97% 131 / 168
🔵 Branches 65.85% 272 / 413
File CoverageNo changed files found.
Generated in workflow #6123 for commit 817b19d by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

Preview environments are ready:

Type URL
docs pr-2830.docs.review.flow-components.de
storybook pr-2830.storybook.review.flow-components.de

Images:

  • docs: ghcr.io/mittwald/flow/docs:pr-2830
  • storybook: ghcr.io/mittwald/flow/storybook:pr-2830

@Lisa18289 Lisa18289 self-assigned this Aug 11, 2026
Replaces InlineCode for the property name with a Text using small and
strong, so the name reads as the row's label instead of an inline code
sample. Drops the class overrides that were fighting InlineCode's own
background and padding.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Lisa18289
Lisa18289 marked this pull request as ready for review August 12, 2026 05:13
Lisa18289 and others added 3 commits August 12, 2026 10:28
Property names render as plain InlineCode instead of bold monospace text.
Types are no longer inline code: union members are comma separated, with
the member matching the default value first, marked "(default)" in the
muted label style. The separate "default: …" line only remains when no
member matches.

Two fixes the new formatting exposed: the union splitter treated the ">"
of an arrow function type as a closing bracket and split at the inner
"|", and defaults from an "@default: x" JSDoc tag kept their colon, so
they neither matched a union member nor rendered cleanly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Matches TypeScript union syntax.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The member matching the default value keeps its position in the union
instead of moving to the front; only the "(default)" marker points it
out.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Lisa18289
Lisa18289 enabled auto-merge (squash) August 12, 2026 12:54
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