Skip to content

fix(ideal-image): <IdealImage> should forward remaining props to the underlying component#11659

Merged
slorber merged 5 commits intofacebook:mainfrom
tempoz:patch-ideal-image
Jan 15, 2026
Merged

fix(ideal-image): <IdealImage> should forward remaining props to the underlying component#11659
slorber merged 5 commits intofacebook:mainfrom
tempoz:patch-ideal-image

Conversation

@tempoz
Copy link
Contributor

@tempoz tempoz commented Jan 13, 2026

Pre-flight checklist

Motivation

This change fixes a bug introduced here as part of #11010. That change resulted in the style prop no longer propagating to the Media component of IdealImage when using it via typescript (as opposed to using it via markdown, which still worked). This prevented me from upgrading docusaurus past 3.7.0, which was the most recent release prior to the introduction of the bug, as it caused IdealImage to completely ignore the properties we set in the style attribute, which mangled the page.

Test Plan

I tested this both against the repo where I noticed the issue via the E2E testing instructions laid out here and by dogfooding the page in the tests/pages section of the docusaurus website. I tested the changes on top of the v3.9.2 tag, as I could not build the website on the main branch.

For verifying the dogfooding, I ran:

# Build packages
# I wasn't sure this step was necessary for simply building the website, but did it just in case.
yarn install

# Build production website
yarn workspace website build

# Run production website
yarn workspace website serve -h $HOSTNAME -p $PORT

And navigated to <HOSTNAME>:<PORT>/tests/pages/ideal-image

It is worth noting that this bug only shows up when running docusaurus in production, since IdealImage takes a different codepath that propagates all properties passed in if it is not being run in production.

Here is a screenshot of the dogfooding page before the patch:

image

And here is one after the patch:

image

Test links

Dogfooding page: https://docusaurus.io/tests/pages/ideal-image

Deploy preview: https://deploy-preview-11659--docusaurus-2.netlify.app/

Related issues/PRs

@meta-cla meta-cla bot added the CLA Signed Signed Facebook CLA label Jan 13, 2026
@netlify
Copy link

netlify bot commented Jan 13, 2026

[V2]

Name Link
🔨 Latest commit cbd2c89
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/696922d0a648ae0008de7663
😎 Deploy Preview https://deploy-preview-11659--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

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

LGTM thanks 👍

@slorber slorber changed the title Patch ideal image fix(ideal-image): <IdealImage> should forward remaining props to the underlying component Jan 15, 2026
@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Jan 15, 2026
@slorber slorber added the Argos Add this label to run UI visual regression tests. See argos.yml GH action. label Jan 15, 2026
@argos-ci
Copy link

argos-ci bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 1 changed, 1 added Jan 15, 2026, 5:31 PM

@slorber slorber merged commit 50e8f95 into facebook:main Jan 15, 2026
45 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Argos Add this label to run UI visual regression tests. See argos.yml GH action. CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants