Skip to content

[docs] Fix ad margin on API pages#35201

Merged
oliviertassinari merged 1 commit intomui:masterfrom
oliviertassinari:docs-fix-ad-margin
Nov 29, 2022
Merged

[docs] Fix ad margin on API pages#35201
oliviertassinari merged 1 commit intomui:masterfrom
oliviertassinari:docs-fix-ad-margin

Conversation

@oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Nov 19, 2022

The bug:
Screenshot 2022-11-19 at 01 04 25

https://mui.com/material-ui/api/dialog/

The root of the problem is that AdGuest use the DOM API to add the ad class name once the Ad component is portaled but on this page, we don't use dangerouslySetInnerHTML to render the markdown, we use the React API directly.

I could pinpoint the origin of the change of behavior to the v5.9.0 release. This release includes #33196, so very likely the origin.

MUI X https://github.com/mui/mui-x/blob/c8f112caed7bd50fb1ba723f7db47590d08d926b/docs/src/modules/components/ApiDocs.js duplicate this file, so I will need to apply the same fix there too, not ideal but no other choices.

Preview: https://deploy-preview-35201--material-ui.netlify.app/material-ui/api/dialog/

@oliviertassinari oliviertassinari added type: bug It doesn't behave as expected. docs Improvements or additions to the documentation. labels Nov 19, 2022
@mui-bot
Copy link

mui-bot commented Nov 19, 2022

Messages
📖 Netlify deploy preview: https://deploy-preview-35201--material-ui.netlify.app/

No bundle size changes

Generated by 🚫 dangerJS against 7c03e8e

@oliviertassinari oliviertassinari force-pushed the docs-fix-ad-margin branch 2 times, most recently from 4b03e6f to 7c03e8e Compare November 19, 2022 00:20
@oliviertassinari oliviertassinari added type: regression A bug, but worse, it used to behave as expected. scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). labels Nov 20, 2022
@mnajdova mnajdova requested a review from siriwatknp November 23, 2022 14:27
@oliviertassinari oliviertassinari merged commit 3cdd8a9 into mui:master Nov 29, 2022
@oliviertassinari oliviertassinari deleted the docs-fix-ad-margin branch November 29, 2022 12:13
@oliviertassinari
Copy link
Member Author

oliviertassinari commented Nov 29, 2022

I will see if we need to apply the same fix in MUI X, I suspect that they duplicate the file, so the fix won't propagate automatically. It's broken right now https://mui.com/x/api/data-grid/data-grid-pro/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation. scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). type: regression A bug, but worse, it used to behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants