From a7b3f405017307fbe8b4f6adf6c045f385fef2a0 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2026 15:31:56 +0000 Subject: [PATCH 1/3] fix(docs): Stop long attribute names from overflowing on mobile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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> --- docs/src/components/AttributeCard.astro | 5 +++-- docs/src/components/AttributeLink.astro | 3 ++- docs/src/components/DottedName.astro | 12 ++++++++++++ docs/src/components/MetricCard.astro | 5 +++-- docs/src/styles/global.css | 6 ++++-- 5 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 docs/src/components/DottedName.astro diff --git a/docs/src/components/AttributeCard.astro b/docs/src/components/AttributeCard.astro index 8b6b0c187..5b239c260 100644 --- a/docs/src/components/AttributeCard.astro +++ b/docs/src/components/AttributeCard.astro @@ -5,6 +5,7 @@ import OtelBadge from './OtelBadge.astro'; import TypeBadge from './TypeBadge.astro'; import AttributeLink from './AttributeLink.astro'; import InfoTooltip from './InfoTooltip.astro'; +import DottedName from './DottedName.astro'; import type { Attribute } from '../content.config'; import { parseAttributeId } from '../utils/category'; import { renderInlineMarkdown } from '../utils/markdown'; @@ -42,9 +43,9 @@ const examples = attribute.examples ?? (attribute.example !== undefined ? [attri data-pagefind-body >
-

+

- {attribute.key} + diff --git a/docs/src/components/AttributeLink.astro b/docs/src/components/AttributeLink.astro index f23e09d95..1cf20573f 100644 --- a/docs/src/components/AttributeLink.astro +++ b/docs/src/components/AttributeLink.astro @@ -1,5 +1,6 @@ --- import { attributeUrl } from '../utils/attributeUrl'; +import DottedName from './DottedName.astro'; interface Props { name: string; @@ -9,4 +10,4 @@ const { name } = Astro.props; const href = attributeUrl(name, import.meta.env.BASE_URL); --- -{name} + diff --git a/docs/src/components/DottedName.astro b/docs/src/components/DottedName.astro new file mode 100644 index 000000000..0effd4f72 --- /dev/null +++ b/docs/src/components/DottedName.astro @@ -0,0 +1,12 @@ +--- +// Renders a dotted name like `gen_ai.usage.input_tokens` with a line break +// opportunity after each dot, so long names wrap at segment boundaries on +// narrow screens instead of mid-word. +interface Props { + name: string; +} + +const parts = Astro.props.name.split('.'); +--- + +{parts.map((part, i) => (i < parts.length - 1 ? <>{part}. : part))} diff --git a/docs/src/components/MetricCard.astro b/docs/src/components/MetricCard.astro index 1f40accb0..99cb54e09 100644 --- a/docs/src/components/MetricCard.astro +++ b/docs/src/components/MetricCard.astro @@ -2,6 +2,7 @@ import OtelBadge from './OtelBadge.astro'; import TypeBadge from './TypeBadge.astro'; import AttributeLink from './AttributeLink.astro'; +import DottedName from './DottedName.astro'; import type { Metric } from '../content.config'; import { renderInlineMarkdown } from '../utils/markdown'; @@ -27,9 +28,9 @@ const requirementLabels = { data-pagefind-body >
-

+

- {metric.key} + diff --git a/docs/src/styles/global.css b/docs/src/styles/global.css index c6cd89b6d..3dfe693d3 100644 --- a/docs/src/styles/global.css +++ b/docs/src/styles/global.css @@ -183,7 +183,7 @@ } body { - @apply font-sans text-base leading-relaxed text-text-primary bg-bg-primary min-h-screen antialiased; + @apply font-sans text-base leading-relaxed text-text-primary bg-bg-primary min-h-screen antialiased wrap-break-word; } h1, @@ -219,8 +219,10 @@ @apply text-accent transition-colors duration-fast; } + /* Attribute keys and example values are long unbroken tokens. Let them wrap + anywhere so they can't push their container past the viewport on mobile. */ code { - @apply font-mono text-[0.9em] px-2 py-1 bg-bg-elevated rounded-sm border border-border; + @apply font-mono text-[0.9em] px-2 py-1 bg-bg-elevated rounded-sm border border-border wrap-anywhere; } pre { From 24a28d0628f0fd52706a9ce632f8eebcc9d4d5af Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 16:43:19 +0000 Subject: [PATCH 2/3] fix(docs): Space wrapped tags and stack detail rows on mobile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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> --- docs/src/components/AttributeCard.astro | 20 ++++++++++---------- docs/src/components/AttributeLink.astro | 2 +- docs/src/components/MetricCard.astro | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/src/components/AttributeCard.astro b/docs/src/components/AttributeCard.astro index 5b239c260..a64da1cad 100644 --- a/docs/src/components/AttributeCard.astro +++ b/docs/src/components/AttributeCard.astro @@ -73,14 +73,14 @@ const examples = attribute.examples ?? (attribute.example !== undefined ? [attri
{attribute.apply_scrubbing.reason && ( -
+
Scrubbing Reason
)} {examples.length > 0 && ( -
+
{attribute.examples ? 'Examples' : 'Example'} {examples.map((example) => ( @@ -91,7 +91,7 @@ const examples = attribute.examples ?? (attribute.example !== undefined ? [attri )} {attribute.enum_values && attribute.enum_values.length > 0 && ( -
+
Well-defined Values