Repository navigation
Conversation
…ypes The feedback form injected the Sentry logo, the success icon and the screenshot editor styles via `dangerouslySetInnerHTML`, which is blocked on pages that enforce `require-trusted-types-for 'script'`. Render the icons as Preact components and the styles as text children instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
size-limit report 📦Compared: b1a8024 (PR test merge using develop at bd2d389) Against: 36977c3 (develop) · base run #67320
|
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 25 successful. See the run.
Successful checks
|
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 273936e. Configure here.
Lms24
left a comment
There was a problem hiding this comment.
Nice work! Maybe we can check why we did it differently before but if we find nothing concretly, I think this is a solid cleanup and great that it now works with trusted types!
There was a problem hiding this comment.
general remark: I'm wondering why we previously didn't render the logos/icons as a Preact component but rather via dangerouslySetInnerHTML. Any ideas?
What
The feedback widget now renders on pages that enforce Trusted Types (
require-trusted-types-for 'script'). Before, the form failed to render because the logo, success icon and screenshot editor styles were injected viainnerHTML.Why
The icons were already built with DOM APIs and only serialized to HTML to be injected again, so rendering them as Preact components (like
IconClose) and the styles as text removes the sink without needing a Trusted Types policy or any CSP change from users. The old success icon'sclipPathattribute was invalid and never applied, so I dropped the clip instead of porting it.The new integration suite is skipped for CDN bundles, which lazy load the feedback modal via
script.src. That needs thesentry-sdkpolicy and comes in a follow-up.Part of #24744