fix(ideal-image): <IdealImage> should forward remaining props to the underlying component#11659
Merged
slorber merged 5 commits intofacebook:mainfrom Jan 15, 2026
Merged
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
slorber
approved these changes
Jan 15, 2026
packages/docusaurus-plugin-ideal-image/src/theme/IdealImage/index.tsx
Outdated
Show resolved
Hide resolved
<IdealImage> should forward remaining props to the underlying component
slorber
reviewed
Jan 15, 2026
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-flight checklist
Motivation
This change fixes a bug introduced here as part of #11010. That change resulted in the
styleprop no longer propagating to theMediacomponent ofIdealImagewhen using it via typescript (as opposed to using it via markdown, which still worked). This prevented me from upgrading docusaurus past3.7.0, which was the most recent release prior to the introduction of the bug, as it causedIdealImageto completely ignore the properties we set in thestyleattribute, 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/pagessection of the docusaurus website. I tested the changes on top of thev3.9.2tag, as I could not build the website on themainbranch.For verifying the dogfooding, I ran:
And navigated to
<HOSTNAME>:<PORT>/tests/pages/ideal-imageIt 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:
And here is one after the patch:
Test links
Dogfooding page: https://docusaurus.io/tests/pages/ideal-image
Deploy preview: https://deploy-preview-11659--docusaurus-2.netlify.app/
Related issues/PRs