Skip to content

[docs][autocomplete] Add persistent search icon to command palette demo#5245

Merged
aarongarciah merged 6 commits into
mui:masterfrom
mmaxence:fix/command-palette-search-icon
Jul 21, 2026
Merged

[docs][autocomplete] Add persistent search icon to command palette demo#5245
aarongarciah merged 6 commits into
mui:masterfrom
mmaxence:fix/command-palette-search-icon

Conversation

@mmaxence

Copy link
Copy Markdown
Contributor

Fixes #4183

The command palette input is labelled by its placeholder only, which disappears on type. This adds a persistent search icon to the input, as agreed in the issue. Both demo variants updated.

The icon is aria-hidden and the input keeps its aria-label. Its colour matches the placeholder grey, above 3:1 contrast in light and dark. The focus outline moves to the input row so icon and input read as one field. Scoped to the icon only, none of the highlight styling from #4236.

@pkg-pr-new

pkg-pr-new Bot commented Jul 16, 2026

Copy link
Copy Markdown

commit: 6f41e7d

@code-infra-dashboard

code-infra-dashboard Bot commented Jul 16, 2026

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 1,463.22 ms 🔺+247.79 ms(+20.4%) | Renders: 78 (+0) | Paint: 2,272.50 ms 🔺+381.87 ms(+20.2%)

Test Duration Renders
Tabs mount (200 instances) 252.60 ms 🔺+65.00 ms(+34.7%) 3 (+0)
Menu mount (300 instances) 160.28 ms 🔺+34.54 ms(+27.5%) 2 (+0)
Scroll Area mount (300 instances) 117.62 ms 🔺+29.05 ms(+32.8%) 3 (+0)
Slider mount (300 instances) 145.17 ms 🔺+27.98 ms(+23.9%) 2 (+0)
Menu open (500 items) 99.98 ms 🔺+26.63 ms(+36.3%) 12 (+0)

…and 4 more (+6 within noise) — details

Metric alarms

Test Metric Change
Tabs mount (200 instances) bench:paint 🔺 +89.88 ms
Menu mount (300 instances) bench:paint 🔺 +47.56 ms
Scroll Area mount (300 instances) bench:paint 🔺 +25.22 ms
Slider mount (300 instances) bench:paint 🔺 +56.86 ms
Menu open (500 items) bench:paint 🔺 +43.50 ms

…and 8 more metric alarms — details


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 6f41e7d
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a5f5c40fbe2d10008840166
😎 Deploy Preview https://deploy-preview-5245--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@aarongarciah
aarongarciah removed the request for review from flaviendelangle July 20, 2026 13:48
@aarongarciah aarongarciah added docs Improvements or additions to the documentation. component: autocomplete Changes related to the autocomplete component. labels Jul 20, 2026
@aarongarciah aarongarciah changed the title [autocomplete][docs] Add persistent search icon to command palette demo [docs][autocomplete] Add persistent search icon to command palette demo Jul 20, 2026

@aarongarciah aarongarciah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @mmaxence. I left inline comments on a few things we need to fix before merging.

@aarongarciah aarongarciah self-assigned this Jul 20, 2026
@mmaxence

Copy link
Copy Markdown
Contributor Author

Applied all four: swapped the wrapper to Autocomplete.InputGroup (clicking anywhere in the strip focuses the input now), copied the 16x16 MagnifyingGlassIcon into both demo variants, switched to padding-left (and ps-3pl-3 in the Tailwind demo for the same reason), and renamed the class to .InputGroup.

aarongarciah and others added 4 commits July 21, 2026 13:29
Matches the cursor: text pattern used by the combobox multiple,
async-multiple, and creatable InputGroup demos: pressing anywhere in
the group focuses the input, so the icon and padding area should show
the I-beam affordance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Matches the inline svg icon convention used across demos.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@aarongarciah aarongarciah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mmaxence!

@aarongarciah
aarongarciah merged commit 36c0c02 into mui:master Jul 21, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: autocomplete Changes related to the autocomplete component. docs Improvements or additions to the documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Command Palette autocomplete example has no persistently visible label

2 participants