Skip to content

fix(feedback): Stop long error messages from resizing the feedback dialog - #23376

Draft
msonnb wants to merge 1 commit into
developfrom
ms/feedback-error-wrap
Draft

fix(feedback): Stop long error messages from resizing the feedback dialog#23376
msonnb wants to merge 1 commit into
developfrom
ms/feedback-error-wrap

Conversation

@msonnb

@msonnb msonnb commented Aug 12, 2026

Copy link
Copy Markdown
Member

Fixes a bug where long error messages (including the default one) in the feedback dialog would not wrap, but instead extend the dialog's width, potentially overflowing the page.

Before (left) vs. after (right):

Screen Recording 2026-08-12 at 5 16 42 PM Screen Recording 2026-08-12 at 5 15 38 PM

Closes #14930

…alog

The error message container could both overflow the dialog and, above the
600px breakpoint, widen it past the viewport.

Two things caused it. `.form__right` is a `<fieldset>`, and the UA stylesheet
gives fieldsets `min-inline-size: min-content`, which stretches them to the
longest unbreakable word they contain. Separately, `.dialog__position` is
fixed with `inset: auto 0 0 auto`, so only its bottom and right edges are
anchored and its width is shrink-to-fit — meaning any descendant's intrinsic
width propagates up into the dialog's own width.

`min-width: 0` on the fieldset removes the UA floor. On the error container,
`width: 0` combined with `min-width: 100%` removes it from intrinsic sizing
altogether: percentages are ignored while intrinsic sizes are computed, so it
contributes 0 to that pass, then fills its container once the container's
width is known. `overflow-wrap: break-word` then breaks words too long for
the resulting box.

`overflow-wrap: anywhere` would replace both declarations on the error
container, but it needs Safari 15.4 and the SDK supports 15.0.

Verified in Chromium, WebKit and Firefox at 320/420/768/1024/1440px against
the default message, a long URL and a 200-character unbreakable token: the
dialog now matches its no-error width in every combination. Previously the
default `errorGenericText` alone widened it by ~135px at 768px and above.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 30.3 kB +1.57% +467 B 🔺
@sentry/browser - with treeshaking flags 28.47 kB +1.57% +440 B 🔺
@sentry/browser (incl. Tracing) 48.54 kB +2.75% +1.3 kB 🔺
@sentry/browser (incl. Tracing + Span Streaming) 48.55 kB +2.72% +1.28 kB 🔺
@sentry/browser (incl. Tracing, Profiling) 51.43 kB -1.1% -568 B 🔽
@sentry/browser (incl. Tracing, Replay) 87.94 kB +1.56% +1.35 kB 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.32 kB +1.74% +1.32 kB 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 92.67 kB +1.52% +1.39 kB 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 105.36 kB +1.36% +1.41 kB 🔺
@sentry/browser (incl. Feedback) 47.65 kB +1.1% +514 B 🔺
@sentry/browser (incl. sendFeedback) 35.13 kB +1.32% +457 B 🔺
@sentry/browser (incl. FeedbackAsync) 40.28 kB +1.26% +500 B 🔺
@sentry/browser (incl. Metrics) 31.24 kB +1.09% +335 B 🔺
@sentry/browser (incl. Logs) 31.52 kB +1.21% +374 B 🔺
@sentry/browser (incl. Metrics & Logs) 32.15 kB +1.05% +333 B 🔺
@sentry/react 32.09 kB +1.46% +461 B 🔺
@sentry/react (incl. Tracing) 50.73 kB +2.48% +1.22 kB 🔺
@sentry/vue 35.31 kB +1.11% +387 B 🔺
@sentry/vue (incl. Tracing) 50.5 kB +2.55% +1.25 kB 🔺
@sentry/svelte 30.33 kB +1.59% +472 B 🔺
CDN Bundle 31.61 kB -0.84% -265 B 🔽
CDN Bundle (incl. Tracing) 48.87 kB +2.8% +1.33 kB 🔺
CDN Bundle (incl. Logs, Metrics) 33.8 kB +1.17% +389 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 50.79 kB +3.78% +1.85 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 74.31 kB +2.14% +1.55 kB 🔺
CDN Bundle (incl. Tracing, Replay) 86.46 kB +1.5% +1.27 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.29 kB +2.08% +1.79 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 92.16 kB +1.27% +1.15 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.11 kB +1.95% +1.8 kB 🔺
CDN Bundle - uncompressed 93.84 kB -0.82% -773 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 146.72 kB +3.24% +4.6 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.14 kB +0.91% +901 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.41 kB +4.32% +6.31 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.08 kB +2.3% +5.14 kB 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.98 kB +1.77% +4.6 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 271.65 kB +2.38% +6.31 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.68 kB +1.68% +4.59 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.34 kB +2.26% +6.3 kB 🔺
@sentry/nextjs (client) 53.26 kB +2.26% +1.18 kB 🔺
@sentry/sveltekit (client) 48.96 kB +2.62% +1.25 kB 🔺
@sentry/core/server 65.34 kB -0.29% -184 B 🔽
@sentry/core/browser 51.69 kB -0.38% -197 B 🔽
@sentry/node 117.94 kB -1.92% -2.3 kB 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 82.06 kB -1.95% -1.63 kB 🔽
@sentry/aws-serverless 91.47 kB -0.97% -889 B 🔽
@sentry/cloudflare (withSentry) - minified 214 kB -2.13% -4.64 kB 🔽
@sentry/cloudflare (withSentry) 528.8 kB -1.87% -10.05 kB 🔽
@sentry/browser - with treeshaking flags tracing without tracing 26.81 kB added added

View base workflow run

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.

[User Feedback] Error message doesn't wrap around

1 participant