Skip to content

Conversation

bruno-garcia
Copy link
Member

@bruno-garcia bruno-garcia commented Jul 31, 2025

Note

Adds alt-text-based image sizing via a new remark plugin, updates image components to prefer manual dimensions, and inserts an example widget image in iOS user feedback docs.

  • Images/rendering:
    • Manual sizing precedence: src/components/docImage now prefers explicit width/height props over URL hash dimensions and passes isManualDimensions to the lightbox.
    • Lightbox styling: src/components/imageLightbox respects isManualDimensions, applying only provided dimensions (other axis auto) for inline images.
  • MDX pipeline:
    • Add remark-image-resize.js and wire it in src/mdx.ts to parse size hints from image ALT text (e.g., =300x200) and set width/height attributes.
  • Docs:
    • Add example User Feedback Widget image to docs/platforms/apple/common/user-feedback/index.mdx.

Written by Cursor Bugbot for commit 3e50084. This will update automatically on new commits. Configure here.

Copy link

vercel bot commented Jul 31, 2025

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

Project Deployment Preview Comments Updated (UTC)
develop-docs Canceled Canceled Sep 30, 2025 4:26pm
sentry-docs Canceled Canceled Sep 30, 2025 4:26pm

@codeowner-assignment codeowner-assignment bot requested a review from a team July 31, 2025 01:24
@bruno-garcia bruno-garcia marked this pull request as ready for review July 31, 2025 01:25
@bruno-garcia bruno-garcia enabled auto-merge (squash) July 31, 2025 01:25
Copy link

codecov bot commented Jul 31, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
sentry-docs-client-array-push 10.13MB 109 bytes (0.0%) ⬆️
sentry-docs-server-cjs 12.88MB -21.34kB (-0.17%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.78MB -0.0%
../instrumentation.js -3 bytes 1.1MB -0.0%
9523.js -3 bytes 1.08MB -0.0%
../app/[[...path]]/page.js.nft.json -7.38kB 831.78kB -0.88%
../app/platform-redirect/page.js.nft.json -7.38kB 831.7kB -0.88%
../app/sitemap.xml/route.js.nft.json -7.38kB 828.93kB -0.88%
../app/[[...path]]/page.js 171 bytes 613.6kB 0.03%
9567.js 634 bytes 21.31kB 3.07%

Files in ../app/[[...path]]/page.js:

  • ./src/components/imageLightbox/index.tsx → Total Size: 1.28kB

Files in 9567.js:

  • ./src/remark-image-resize.js → Total Size: 2.29kB

  • ./src/mdx.ts → Total Size: 24.23kB

App Routes Affected:

App Route Size Change Total Size Change (%)
/[[...path]] 171 bytes 3.36MB 0.01%
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/chunks/8321-*.js -3 bytes 425.87kB -0.0%
static/chunks/app/[[...path]]/page-*.js 115 bytes 93.07kB 0.12%
server/middleware-*.js -6.46kB 1.0kB -86.59%
server/middleware-*.js 6.46kB 7.46kB 645.5% ⚠️
static/eR-*.js (New) 77 bytes 77 bytes 100.0% 🚀
static/eR-*.js (New) 684 bytes 684 bytes 100.0% 🚀
static/sqlxXs5DR398tL4XU7efp/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/sqlxXs5DR398tL4XU7efp/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

LGTM, but the linter complaints.

auto-merge was automatically disabled August 9, 2025 19:20

Pull request was closed

@bruno-garcia bruno-garcia reopened this Aug 9, 2025
@codeowner-assignment codeowner-assignment bot requested a review from a team August 9, 2025 19:20
@sfanahata
Copy link
Contributor

@bruno-garcia looks like this is causing a 404 issue. Check it out and try to push a commit through again?

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

LGTM

cursor[bot]

This comment was marked as outdated.

@codeowner-assignment codeowner-assignment bot requested a review from a team September 29, 2025 14:18
height={height}
isManualDimensions={isManual}
alt={props.alt ?? ''}
{...props}
Copy link
Contributor

@jaffrepaul jaffrepaul Sep 29, 2025

Choose a reason for hiding this comment

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

Cool, this should be mostly fine. There is one small potential issue that we can safeguard. It's more from the original implementation but it caught my eye with this additional move. The prop spreading should just come before the height and width attributes. There's a world in which the string value MDX props would override the parsed Numbers. If that gets down to the Next.js <Image>, it'd be a problem. But if we just do it earlier, the parse will win when we need it to.

Comment on lines 125 to 129
width={width}
height={height}
isManualDimensions={isManual}
alt={props.alt ?? ''}
{...props}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
width={width}
height={height}
isManualDimensions={isManual}
alt={props.alt ?? ''}
{...props}
isManualDimensions={isManual}
alt={props.alt ?? ''}
{...props}
width={width}
height={height}

I take whatever you say for truth 😅 you mean like this^ right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ha! It is a nuanced and maybe unlikely scenario, but safety first🥇 Let me grab the whole component for completeness.

Copy link
Member

Choose a reason for hiding this comment

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

addressed in 3e50084

Copy link
Member

@BYK BYK left a comment

Choose a reason for hiding this comment

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

Looks good, have a few comments but not blockers.

We may wanna open-source this as a separate package if there's nothing like thos out there?

@romtsn romtsn requested a review from jaffrepaul September 30, 2025 15:36
@romtsn romtsn dismissed jaffrepaul’s stale review October 1, 2025 06:49

The review has been addressed, we can follow up with another PR if there's still something off with the props order

@romtsn romtsn merged commit 1154882 into master Oct 1, 2025
15 checks passed
@romtsn romtsn deleted the cursor/add-example-image-to-sentry-ios-user-feedback-page-09c2 branch October 1, 2025 06:50
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.

7 participants