Skip to content

PRDCT-379: fix wide tables clipping under the TOC instead of scrolling - #989

Merged
jordanrburger merged 4 commits into
mainfrom
feat/PRDCT-379-wide-table-overflow
Jul 16, 2026
Merged

PRDCT-379: fix wide tables clipping under the TOC instead of scrolling#989
jordanrburger merged 4 commits into
mainfrom
feat/PRDCT-379-wide-table-overflow

Conversation

@Iamfle4ka

Copy link
Copy Markdown
Collaborator

Fixes a site-wide CSS render bug where wide tables get clipped on the right (under the "On this page" panel) instead of scrolling. Independent of the Diátaxis revamp; CSS-only change to src/styles/custom.css.

Root cause (two issues)

  1. Wrapped markdown tables couldn't scroll. A remark pass already wraps markdown tables in .beacon-table-scroll { overflow-x:auto }, but the base rule table { width:100% } pinned the table to the wrapper width — so wide content compressed/clipped instead of overflowing and triggering the scroll.
  2. Raw HTML <table> blocks aren't wrapped at all — the remark pass only matches mdast table nodes, and hand-written tables can split across several HTML nodes, so they stay unwrapped (e.g. the Transformations index "Other features" table).

Fix (custom.css)

  1. .beacon-table-scroll > tablewidth: max-content; min-width: 100% (narrow tables still fill the column; wide ones grow so the wrapper scrolls).
  2. CSS fallback: any unwrapped, non-spec, non-status table → display: block; overflow-x: auto.

Verification (production build, viewports 1280px + 600px)

Page Table Result
r-plain/array-splitter narrow markdown fills width, no scroll, no overflow — no regression
transformations/ "Other features" raw HTML fallback applied; fits/scrolls, no overflow
components/extractors/database/mysql 7 wide markdown (content up to 2948px) all scroll inside the wrapper; none overflow the viewport

No table overflows the viewport at any tested width; build clean (254 pages). AC met: wide tables scroll/wrap at all viewport widths, no horizontal clipping.

🤖 Generated with Claude Code

Site-wide CSS render bug, independent of the Diátaxis revamp. Two causes:

1. Wrapped markdown tables couldn't scroll — the base rule `table { width:100% }`
   pinned them, so wide content compressed/clipped instead of overflowing the
   `.beacon-table-scroll` wrapper. Fix: wrapper > table uses `width: max-content;
   min-width: 100%` (narrow tables still fill; wide ones grow → wrapper scrolls).

2. Raw HTML <table> blocks aren't wrapped at all (the remark pass only catches
   mdast table nodes, and hand-written tables split across HTML nodes). Fix: a
   CSS fallback makes any unwrapped, non-spec, non-status table
   `display: block; overflow-x: auto`.

Verified in a production build at 1280px and 600px on array-splitter (narrow
markdown — still full-width, no regression), the Transformations index
"Other features" HTML table (fallback), and the MySQL connector page (7 wide
markdown tables, content up to 2948px) — all scroll, none overflow the viewport.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@linear

linear Bot commented Jun 24, 2026

Copy link
Copy Markdown

PRDCT-379

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
connection-docs Ready Ready Preview, Comment Jul 16, 2026 3:16pm

Request Review

@jordanrburger jordanrburger 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.

Still happening on MySQL extractor table.

…splay:table

The .beacon-table-scroll wrapper left narrow tables shrunk to content width and
left-packed, with empty space on the right, because Starlight defaults tables to
display:block (its own scroll mechanism) and width:max-content then sized the
table to its content instead of the wrapper.

Force real table layout on wrapped tables: display:table + width:100%. Cells wrap
normally and fill the wrapper; a table whose content genuinely can't fit exceeds
the wrapper and the wrapper (overflow-x:auto) scrolls — so wide tables still
scroll instead of clipping under the TOC, and narrow tables no longer leave an
empty box.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Iamfle4ka

Copy link
Copy Markdown
Collaborator Author

Fixed in b5def60 (pushed after your review): wrapped tables were collapsing to display:block, which made them render narrow/clipped. Verified on the current Vercel preview — the MySQL extractor page renders correctly at 1440/1280/1024/820 px viewports; wide tables scroll inside their wrapper instead of clipping under the TOC. Re-requesting review.

@jordanrburger jordanrburger 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.

Still happening on MySQL extractor table.

@jordanrburger
jordanrburger enabled auto-merge July 16, 2026 15:15
@jordanrburger
jordanrburger merged commit c0d6328 into main Jul 16, 2026
2 of 3 checks passed
@jordanrburger
jordanrburger deleted the feat/PRDCT-379-wide-table-overflow branch July 16, 2026 15:16
Iamfle4ka pushed a commit that referenced this pull request Aug 4, 2026
Nothing checked rendering, so the wide-table display:block regression
(PRDCT-379) shipped to main. Add two gates wired into the PR build:

- scripts/lint-docs.mjs — content lint (broken links/anchors, bare code
  fences, missing title/slug/description, deprecated terms, raw HTML tables,
  Liquid leftovers, placeholder images). Gated via scripts/lint-baseline.json:
  fails only on findings not already in the baseline, so it catches regressions
  today without first clearing the existing backlog (1155 known findings).
- scripts/check-render.mjs — headless Playwright over `astro preview`: asserts
  every .beacon-table-scroll > table computes display:table (catches the
  Starlight display:block collapse), wrapper overflow-x:auto, no horizontal body
  scroll at 375/768/1280, all images load, headings have ids.
- package.json: `lint`, `check:render`, `audit` scripts + playwright devDep.
- branch.yml: run lint + render checks after build on every PR.

Verified: check-render currently flags the still-unmerged table bug on main
(105 failures, all the display:block table); applying the PRDCT-379 fix locally
makes it pass. Merge order: PRDCT-379 (#989) first, then this.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants