[docs-infra] Fix search icon issue #40957
Merged
+20
−12
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.
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:
material-ui/docs/src/modules/components/AppSearch.js
Line 391 in 3c445c6
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/