Skip to content

fix(docs): Stop long attribute names from overflowing on mobile - #821

Open
sentry-junior[bot] wants to merge 3 commits into
mainfrom
fix/docs-mobile-overflow
Open

sentry-junior[bot] wants to merge 3 commits into
mainfrom
fix/docs-mobile-overflow

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

On phones, most attribute category pages render wider than the screen, so the browser zooms the whole page out and the header covers only part of the width.

The cause is long tokens with no place to break: dotted keys in card titles and alias links, long example values (hashes, release strings), and bare URLs in descriptions. They spill out of their cards and set the page width. At a 390px viewport, /attributes/gen_ai/ was 1073px wide, /attributes/ 929px, and /attributes/sentry/ 679px.

Changes:

  • New DottedName component renders a key with a <wbr> after each dot. Card titles (attributes and metrics) and AttributeLink use it, so app.vitals.frames.slow.count wraps at a segment boundary instead of mid-word. Copy, data-key, and Pagefind titles are unchanged, because <wbr> adds no text.
  • Inline code gets overflow-wrap: anywhere as a fallback for tokens without dots, such as hex IDs. pre blocks keep white-space: pre and still scroll horizontally.
  • body gets overflow-wrap: break-word for bare URLs in prose.
  • Card title rows use flex-wrap, so the Deprecated badge moves under a long key instead of squeezing it.
  • Aliases render as a wrapping list with a gap, so the chips do not touch when they wrap to a new line.
  • Detail rows (Example, Aliases, Search Alias) put the label above the value on mobile, so the value gets the full card width.

Desktop layout looks the same. After the change, every docs page and attribute category page is exactly 390px wide at a 390px viewport.

Screenshots

390px viewport, dark mode, /attributes/sentry/. Before is main, after is this branch.

sentry.messaging.destination.name:

compare-sentry messaging destination name

sentry.frames.slow:

compare-sentry frames slow

sentry.replay_id:

compare-sentry replay_id

--

View Session [Sentry]

Long dotted keys, example values, and bare URLs had no line break
opportunity, so they pushed cards past the viewport and mobile browsers
zoomed the whole page out. Break dotted names after each dot, let code
and prose wrap when they still don't fit, and let the deprecated badge
drop below a long title.

Co-Authored-By: Jan Peer Stöcklmair <10677263+JPeer264@users.noreply.github.com>
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sentry-conventions Ready Ready Preview Nov 23, 2026 12:59pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (attributes) Define client autonomous system attributes by vjeranc and codex in #830
  • (python) Add support for Python 3.7 by srothh in #828

Bug Fixes 🐛

  • (docs) Stop long attribute names from overflowing on mobile by JPeer264 with sentry-junior in #821

Documentation 📚

  • (attributes) Clarify sentry.is_remote description by ericapisani with sentry-junior in #822

Internal Changes 🔧

  • (python) Remove TypedDict from python codegen by srothh in #827

🤖 This preview updates automatically when you update the PR.

Aliases were inline links with only a right margin, so when they wrapped
the chips touched the row above. Lay them out as a wrapping flex list with
a gap, like examples, and keep each link one chip when its name wraps.

On narrow screens the fixed-width label column left too little room for
values, so detail rows now put the label above the value below the sm
breakpoint.

Co-Authored-By: Jan Peer Stöcklmair <10677263+JPeer264@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 24a28d0. Configure here.

Comment thread docs/src/styles/global.css Resolved
With overflow-wrap: anywhere on inline code, an enum value in a
Well-defined Values row could shrink to fit beside a long brief and break
mid-word, even on desktop. Keep the value at its natural width (capped at
the row width) and let the brief take the remaining space.

This branch was successfully deployed

1 active deployment
Preview — 1d344a65 Deployed Nov 23, 2026 by vercel[bot]
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.

3 participants