Skip to content

[docs] Icons aren't searchable anymore in Algolia #43941

Closed

Description

@Janpot

See #41330 (comment)

Icons used to be searchable in v4

image

But even after reverting the icons virtualization, they still aren't searchable.

Screenshot 2024-09-30 at 09 54 56

Search keywords:

Activity

  1. added
    docsImprovements or additions to the documentation.
    scope: docs-infraInvolves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305).
    and removed on Sep 30, 2024
  2. oliviertassinari commented on Oct 5, 2024

    @oliviertassinari
    Member

    It used to work before because of the DOM structure match the crawler

    https://v4.mui.com/components/material-icons/

    vs.

    https://dashboard.algolia.com/apps/TZGZ85B9TB/crawler/crawler/739c29c8-99ea-4945-bd27-17a1df391902/editor

    So this should help:

    diff --git a/docs/data/material/components/material-icons/SearchIcons.js b/docs/data/material/components/material-icons/SearchIcons.js
    index 945dcc038f..ac636e7acd 100644
    --- a/docs/data/material/components/material-icons/SearchIcons.js
    +++ b/docs/data/material/components/material-icons/SearchIcons.js
    @@ -200,7 +200,7 @@ function Icon(props) {
             <div className={SVG_ICON_CLASS} />
           )}
           {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions -- TODO: a11y */}
    -      <div onClick={handleLabelClick}>{icon.importName}</div>
    +      <div className="algolia-content" onClick={handleLabelClick}>{icon.importName}</div>
           {/* eslint-enable jsx-a11y/click-events-have-key-events */}
         </StyledIcon>
       );

    Another challenge might be: https://docsearch.algolia.com/docs/record-extractor/#reduce-the-number-of-records.

  3. moved this from To process to Done in Docs-infraon Oct 22, 2026
  4. github-actions commented on Oct 22, 2026

    @github-actions
    Contributor

    This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
    Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to the documentation.scope: docs-infraInvolves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305).scope: iconsChanges related to the icons.type: regressionA bug, but worse, it used to behave as expected.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions