Skip to content

fix: stop the editor TOC rail squashing rows on long pages - #773

Merged
gajjug004 merged 1 commit into
developfrom
fix/editor-toc-long-outline-squash
Sep 8, 2026
Merged

fix: stop the editor TOC rail squashing rows on long pages#773
gajjug004 merged 1 commit into
developfrom
fix/editor-toc-long-outline-squash

Conversation

@gajjug004

@gajjug004 gajjug004 commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

closes #749

Problem

On a page with many headings, the editor's "On this page" rail renders every entry a few pixels tall, so the text is clipped and unreadable. Reported in #749.

Before: 60 headings, rows squashed to 12.5px, text clipped

toc-before.png

Solution

The rail's nav is a flex column with a max-height, and its entries use truncate. overflow: hidden zeroes a flex item's automatic minimum size, so the entries shrink to fit instead of the nav scrolling. shrink-0 on the entries
keeps their content height and sends the overflow to the nav's scrollbar.

After: 29px rows, rail scrolls

toc-after.png

The public reader's TOC uses the same flex column but no truncate, so it already scrolls correctly. Not affected.

Covered by a new e2e test in editor-toc.spec.ts (60 headings; asserts row height and that the nav overflows). It fails on a temp revert of the fix.

The rail's nav is a flex column with a max-height. Its entries carry
`truncate`, and overflow:hidden zeroes a flex item's automatic minimum
size, so the browser shrank all the entries to fit instead of letting
the nav scroll. On a page with 60 headings every row collapsed to
12.5px and the text was clipped.

`shrink-0` keeps each entry at its content height and sends the
overflow to the nav's own scrollbar.

Fixes #749
@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

Safe to merge; no actionable issues found.

The bounded, overflow-enabled flex rail scrolls correctly, and the synchronized regression test exercises that behavior.

Reviews (1): Last reviewed commit: "fix: stop the editor TOC rail squashing ..." | Re-trigger Greptile

@gajjug004
gajjug004 merged commit 4e6247e into develop Sep 8, 2026
9 checks passed
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.

"On this Page" looks broken in editor for a very large page

1 participant