Skip to content

Conversation

@codyde
Copy link
Contributor

@codyde codyde commented Aug 29, 2025

TDLR

Our content div was VERY narrow. Many of us have talked about how it feels cramped width wise. Widening that up to give a bit more space. Cleaning up the zone of emptiness that exists on the right in favor of centering the docs content on smaller resolutions, and centering all content on wider resolutions to improve UX.

Also centered header to match content width.

Summary

  • Widens the content div to create more readable space so its not
  • Centers the main content column and improves large-screen layout.
  • Anchors the left sidenav and right TOC to the content edges on wide viewports.
  • Adds a minimal, rounded scrollbar to the sidenav.

Motivation

  • Improve readability by capping line length and centering.
  • Reduce visual noise from the default scrollbar.

Key Changes

  • Content

    • Centers content on standard screens; caps width at 100ch via --doc-content-w.
    • Large screens (≥ 2057px): content remains centered at 100ch and gains 5rem
      horizontal padding for sidenav and TOC
  • Navigation

    • Large screens: sidenav aligns to content’s left edge; TOC aligns to content’s
      right edge with a 24px gap.
    • Standard screens: current behavior preserved.
  • Sidenav scrollbar

    • Thin 8px, rounded thumb, subtle hover/active contrast; respects theme colors.
    • Firefox: scrollbar-width: thin; WebKit: ::-webkit-scrollbar styles.
  • Header

    • Centered header to match width of sidebar, content, and TOC

Behavior by Breakpoint

  • Standard screens (≤ 2056px)
    • Centered content, max width 100ch; default px-6 pt-6.
    • Sidenav left, TOC right (existing behavior).
  • Large screens (≥ 2057px)
    • Centered content at 100ch with 5rem left/right padding.
    • Sidenav pinned to content’s left; TOC pinned to content’s right with ~24px gap.

Before -

CleanShot 2025-08-29 at 12  10 43@2x

Before widescreen -

CleanShot 2025-08-29 at 12  12 07@2x

After -

CleanShot 2025-08-29 at 12  11 30@2x

After widescreen -

CleanShot 2025-08-29 at 12  12 39@2x

codyde added 10 commits August 8, 2025 10:57
* 'master' of https://github.com/getsentry/sentry-docs:
  docs(dev-infra): Update development environment docs (#14585)
  add Sevvy integration docs (#14601)
  feat(dart/flutter): improve distinction between Logging integration and Structured Logs (#14527)
  correcting region storage for symbol and source map metadata (#14600)
…, Media Upload, Search Autocomplete) using existing Challenge/Solution/Frontend/Backend/How-it-works structure. Emphasizes where to instrument in React vs backend and low-cardinality attributes for span metrics.
…e auto-instrumentation; keep attributes minimal and business-focused for easier customization.
* 'master' of https://github.com/getsentry/sentry-docs: (22 commits)
  Fix incorrectly placed comma (#14592)
  fix(devservices): Typo in devservices docs (#14636)
  ref(ourlogs): Add log size limit (#14635)
  Document undocumented php prefix option (#14634)
  getsentry/relay@7958273
  Unreal Engine: Update plugin docs (#14624)
  feat: Update min js sdk version for logging and update console logging snippet (#14614)
  feat: [Unreal] Add transaction and span set_data documentation (#14599)
  feat(js): Add `ignoreSpans` documentation to Options page (#14572)
  fix(js/browser): Amend user IP + `sendDefaultPii` change to v10 migration guide (#14609)
  fix: Fix broken AI banner due to invalid syntax (#14627)
  feat(partners)add-enablement-docs (#14095)
  Fix image path issue & add test coverage for new lightbox (#14616)
  feat(seer): update GHE setup to work with seer (#14617)
  fix(replay): Document searchable properties `screen` and alias `screens` (#14603)
  Update image handling (#14564)
  Update using-hooks.mdx (#14605)
  Godot: Document `disabled-in-editor-play` option (#14438)
  fix(Docs) redirect and deprecate old metrics pages (#14602)
  fix(relay): Update projects.mdx (#14606)
  ...
* 'master' of https://github.com/getsentry/sentry-docs:
  Add documentation for onDiscard callback in Java, Android, and Spring Boot (#14632)
  fix: Adding redirect for moved hydrogen docs to cloudflare (#14645)
* 'master' of https://github.com/getsentry/sentry-docs: (72 commits)
  docs(replay): Bring replay nav item to all apple platforms (#14710)
  User Feedback Basics Page (#14670)
  Update AM3 and legacy billing for logs GA, DO NOT MERGE BEFORE LOGS GA (#14589)
  Add LLMSteering component for hidden documentation instructions (#14744)
  New data retention policy page (#14661)
  Adding error prediction to Prevent AI docs (#14641)
  feat(logs): Remove beta note from logs docs (#14686)
  First pass at logs quota doc (#14671)
  docs(aws): Remove manual setup steps for ESM (#14738)
  Android Logs docs without Errors / Breadcrumbs distractions (#14733)
  chore(Unity): Dropped 2019 relevant section from Known Limitations (#14735)
  feat: Added Unity `UserFeedback` Prefab (#14667)
  chore(Unity): Added Mono & Line Numbers to Known Limitations (#14736)
  docs(js): Fix Next.js client tracing config (#14734)
  chore: Updated known limitation in Unity with Cysharp (#14666)
  feat(Unity ): Added `APK+OBB` initialization to troubleshooting (#14668)
  Codecov copy & screenshot edits (#14659)
  fix(cloudflare): Remove unused instrument.mjs from hono on cloudflare (#14723)
  update advanced scrubbing doc - adding logs section (#14696)
  fixing some errors from nextjs-source-map-updates branch (#14467)
  ...
* 'master' of https://github.com/getsentry/sentry-docs:
  feat(seer): Seer webhook docs (#14702)
  feat: Update logs spec to mention message template constraint (#14759)
  Unreal Engine: Update sampling docs (#14740)
  Unreal Engine: Update info about reading certain options from env vars (#14714)
  feat(Apple): Add `enableUnhandledCPPExceptionsV2` to experimental features (#14731)
  feat(kmp): Add Sentry Cocoa compatibility version info (#14737)
  Fix reference to span in processOrderBatch function (#14741)
  chore(java): Add docs on how to use tracePropagationTargets (#14752)
…C at large screens\n\n- Center content column by default and cap width via CSS var\n- At >=2057px, anchor left sidenav and right TOC to content edges\n- Add 5rem side padding on large screens; keep top padding unchanged\n- No changes to step or separator components in this commit
…crollbar with rounded thumb\n- Subtle hover/active contrast; transparent track\n- Firefox: use scrollbar-width: thin; themed colors\n
@vercel
Copy link

vercel bot commented Aug 29, 2025

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

Project Deployment Preview Comments Updated (UTC)
develop-docs Ready Ready Preview Comment Aug 29, 2025 11:02pm
sentry-docs Ready Ready Preview Comment Aug 29, 2025 11:02pm

@codyde codyde changed the title Layout structure changes - widening content div, responsiveness on wider screens, scrollbar improvements Layout updates; widening content div, centering and responsiveness, scrollbar update Aug 29, 2025
@codyde codyde requested a review from nikolovlazar August 29, 2025 07:08
@codecov
Copy link

codecov bot commented Aug 29, 2025

Bundle Report

Changes will decrease total bundle size by 271.22kB (-1.19%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-client-array-push 9.9MB 1.54kB (0.02%) ⬆️
sentry-docs-server-cjs 12.26MB -272.77kB (-2.18%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 882.71kB -0.0%
static/css/*.css -70 bytes 745.92kB -0.01%
static/css/*.css 546 bytes 11.55kB 4.96%
static/chunks/8321-*.js -3 bytes 425.87kB -0.0%
static/chunks/4746-*.js 1.07kB 21.4kB 5.27% ⚠️
static/dAnABng6OHI4HZnXzPKzC/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/dAnABng6OHI4HZnXzPKzC/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/b5VIv0qKYSo4hNALiATv7/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/b5VIv0qKYSo4hNALiATv7/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

Files in static/chunks/4746-*.js:

  • ./src/components/sidebar/style.module.scss → Total Size: 362 bytes
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -33.51kB 1.74MB -1.89%
../instrumentation.js -33.8kB 1.07MB -3.07%
9523.js -33.51kB 1.04MB -3.11%
../app/[[...path]]/page.js.nft.json -57.67kB 722.38kB -7.39%
../app/platform-redirect/page.js.nft.json -57.67kB 722.3kB -7.39%
../app/sitemap.xml/route.js.nft.json -57.67kB 719.77kB -7.42%
4873.js 1.22kB 90.92kB 1.36%
7153.js (New) 30.3kB 30.3kB 100.0% 🚀
../app/api/ip-ranges/route.js -300 bytes 5.79kB -4.92%
../app/robots.txt/route.js -300 bytes 5.02kB -5.64%
2311.js (Deleted) -29.86kB 0 bytes -100.0% 🗑️

Files in 4873.js:

  • ./src/components/sidebar/style.module.scss → Total Size: 356 bytes

  • ./src/components/sidebar/index.tsx → Total Size: 5.24kB

  • ./src/components/sidebar/style.module.scss → Total Size: 356 bytes

  • ./src/components/docPage/index.tsx → Total Size: 10.68kB

  • ./src/components/header.tsx → Total Size: 824 bytes

App Routes Affected:

App Route Size Change Total Size Change (%)
/ 447 bytes 2.62MB 0.02%

Copy link
Member

@nikolovlazar nikolovlazar left a comment

Choose a reason for hiding this comment

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

This is a much needed improvement! A couple of things though:

  • I'm noticing a very light gray background on the sidebar on light mode that appears like it's cut off on its left side. The right side has a border to separate it from the content, but the left side is pretty apparent so we can't leave it like that. Here's a zoomed in screenshot:
    Image

  • The TOC breaks between 1546px and 1296px width. The main content and left sidebar remain the same width, so the TOC gets squeezed. Here's how it looks like on 1400px width:
    Image

codyde added 4 commits August 29, 2025 08:12
- Add toc screen (1400px) in tailwind.config.mjs
- Use hidden + toc:block on TOC aside
- Ensures TOC stays hidden below 1400px and visible above
@codyde
Copy link
Contributor Author

codyde commented Aug 29, 2025

This is a much needed improvement! A couple of things though:

  • I'm noticing a very light gray background on the sidebar on light mode that appears like it's cut off on its left side. The right side has a border to separate it from the content, but the left side is pretty apparent so we can't leave it like that. Here's a zoomed in screenshot:
    Image
  • The TOC breaks between 1546px and 1296px width. The main content and left sidebar remain the same width, so the TOC gets squeezed. Here's how it looks like on 1400px width:
    Image

Added a 1400px breakpoint that looks to have solved it. Would love secondary testing though.

Copy link
Member

@nikolovlazar nikolovlazar left a comment

Choose a reason for hiding this comment

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

Looking good!

…yout width\n\n- Set to 1200px\n- Header max-width = sidebar + gap + content + gap + toc\n- Compensate asymmetry with translateX((toc - sidebar)/2)\n- Lock logo slot to sidebar width\n- Remove stray 24px padding and restore ~px-3 gutters across breakpoints
@codyde codyde enabled auto-merge (squash) August 29, 2025 22:51
@codyde codyde merged commit 2b4ef5c into master Aug 29, 2025
15 checks passed
@codyde codyde deleted the feat/layout-centered-content-and-anchored-asides branch August 29, 2025 23:02
codyde added a commit that referenced this pull request Aug 30, 2025
* 'master' of https://github.com/getsentry/sentry-docs:
  Layout updates; widening content div, centering and responsiveness, scrollbar update (#14766)
  Document default sdk logging attributes (#14353)
  Bump API schema to b8165143 (#14764)
  fix(OnboardingOptionButtons) Remove sticky css on mobile (#14690)
  Unreal Engine: Add migration guide (#14186)
  docs(ai): Update AI agent integrations list (#14769)
  fix: Order versioned docs select items by recency (#14768)
  ref(python): Update wording regarding async init (#14631)
  docs(aws-integration): Remove alert that ESM is not supported (#14756)
  fix(feedback): Update docs with SwiftUI notes (#14227)
  chore(docs): Remove explicit openai agents integration registration (#14718)
  Update list of states subject to tax on /pricing (#14763)
  ref(replay): Refactor pages inside the Product Walkthrough > Replay area (#14712)
  docs(replay): Move FAQ Replay for Android questions into dedicated troubleshooting page (#14709)
@github-actions github-actions bot locked and limited conversation to collaborators Sep 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants