Skip to content

Hide the inline table of contents in narrow windows - #22437

Open
ianmatson wants to merge 1 commit into
masterfrom
hide-toc-small-windows
Open

ianmatson wants to merge 1 commit into
masterfrom
hide-toc-small-windows

Conversation

@ianmatson

Copy link
Copy Markdown
Contributor

Closes #21956.

When a reader window is narrower than the @4xl/app-reader breakpoint, ReaderView moved the table of contents above the article. On a page with many headings, the reader had to scroll past a long list to get to the content. For example, /compare/best-open-source-analytics-tools showed about 50 entries before the first paragraph. This PR removes that inline table of contents. Wide windows keep the table of contents in the right sidebar, with no change.

This change affects all pages that use ReaderView with a table of contents: docs, handbook, blog, tutorials, compare posts, customer stories, and two internal tool pages. Some pages already hid the inline table of contents with hideMobileTableOfContents. No page needs that prop now, so this PR removes it from ReaderView and from those pages. At narrow widths, readers now have no table of contents. The sidebar toggle also shows only at wide widths.

In each grid, the left column is before and the right column is after. The top row is light mode and the bottom row is dark mode. Narrow is 640 px and wide is 1440 px. The wide grids show no change.

Compare post

compare-narrow
compare-wide

Docs

docs-narrow
docs-wide

Handbook

handbook-narrow
handbook-wide

Blog post

blog-narrow
blog-wide

@ianmatson
ianmatson requested a review from a team as a code owner November 16, 2026 21:57
@github-actions github-actions Bot added the website About the website (beyond just landing pages) label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Nov 16, 2026 10:09PM

@ianmatson
ianmatson enabled auto-merge (squash) November 16, 2026 21:58
@ianmatson
ianmatson disabled auto-merge November 16, 2026 21:59
@github-actions

Copy link
Copy Markdown
Contributor

Bundle report

Total JS (gzip)

12.22 MiB (-0.2 KiB / -0.0%)

Eager graph (modules shipped in each entrypoint's initial chunks)

Entrypoint Eager size Budget Modules
✅ app 11.15 MiB (no change) report-only 1107
Largest modules in the app closure
Module Size
css ./node_modules/.pnpm/css-loader@5.2.7_webpack@5.101.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[1]!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.5.6_webpack@5.101.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[2]!./src/styles/global.css 1023.1 KiB
./src/components/Stickers/Stickers.tsx 696.4 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/puzzle.mjs 388.5 KiB
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js 354.8 KiB
./node_modules/.pnpm/react-markdown@8.0.7_@types+react@16.14.66_react@18.3.1/node_modules/react-markdown/lib/react-markdown.js + 88 modules 351.4 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/basketball-coach.mjs 337.4 KiB
./node_modules/.pnpm/framer-motion@14.0.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs + 126 modules 287.2 KiB
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js 281.9 KiB
./src/components/SearchUI/index.tsx + 87 modules 273.1 KiB
./gatsby-browser.tsx + 60 modules 259.4 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/construction-1.mjs 248.5 KiB
./src/components/Pricing/PricingSlider/Slider.tsx + 87 modules 240.2 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/construction-2.mjs 228.2 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/magnifying-glass.mjs 221.7 KiB
./src/hooks/useProduct.ts + 18 modules 166.8 KiB

Eager-graph budgets are report-only until a baseline is established. Sizes are gzip of public/**/*.js; eager size is webpack module source bytes for the modules actually shipped in the entrypoint's initial chunks (post-tree-shake).

@ianmatson
ianmatson enabled auto-merge (squash) November 16, 2026 22:10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

website About the website (beyond just landing pages)

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

Website request - Hide the inline table of contents on narrow screens

1 participant