Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Fix ad margin on API pages #35201

Merged
merged 1 commit into from Nov 29, 2022

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 bug 🐛 Something doesn't work 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 regression A bug, but worse scope: docs-infra Specific to the docs-infra product labels Nov 20, 2022
@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
bug 🐛 Something doesn't work docs Improvements or additions to the documentation regression A bug, but worse scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants