Skip to content

[docs-infra] Fix search icon issue#40957

Merged
oliviertassinari merged 1 commit intomui:masterfrom
oliviertassinari:fix-broken-icons
Feb 11, 2024
Merged

[docs-infra] Fix search icon issue#40957
oliviertassinari merged 1 commit intomui:masterfrom
oliviertassinari:fix-broken-icons

Conversation

@oliviertassinari
Copy link
Copy Markdown
Member

@oliviertassinari oliviertassinari commented Feb 5, 2024

Fix #33731

The problem is that https://docsearch.algolia.com/docs/api/ doesn't allow us to customize the home dialog, so we have to use:

ReactDOMServer.renderToStaticMarkup(<NewStartScreen />),

to be able to render what we want. Because of the way Emotion works, this doesn't inject any styles.

The workaround I used is to redefine these styles, only using the SVG path.

In the future, the static extraction should provide stable CSS class names, and I also think that we should do #37599, removing the need to use renderToStaticMarkup: emotion-js/emotion#3008.

Before: https://deploy-preview-40953--material-ui.netlify.app/blog/aggregation-functions/
After: https://deploy-preview-40957--material-ui.netlify.app/blog/aggregation-functions/

@oliviertassinari oliviertassinari added type: bug It doesn't behave as expected. scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). labels Feb 5, 2024
@oliviertassinari oliviertassinari mentioned this pull request Feb 5, 2024
1 task
@mui-bot
Copy link
Copy Markdown

mui-bot commented Feb 5, 2024

Netlify deploy preview

https://deploy-preview-40957--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 7eb3ed8

@oliviertassinari oliviertassinari added the scope: system The system, the design tokens / styling foundations used across components. eg. @mui/system with MUI label Feb 7, 2024
@oliviertassinari oliviertassinari merged commit af72a04 into mui:master Feb 11, 2024
@oliviertassinari oliviertassinari deleted the fix-broken-icons branch March 18, 2024 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). scope: system The system, the design tokens / styling foundations used across components. eg. @mui/system with MUI type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs-infra] The icons in the search dialog appear abnormally

2 participants