Skip to content

Fix a usability issue with Command - previous text gets in the way of subsequent invocations#136

Open
pokle wants to merge 1 commit intohunvreus:developmentfrom
pokle:development
Open

Fix a usability issue with Command - previous text gets in the way of subsequent invocations#136
pokle wants to merge 1 commit intohunvreus:developmentfrom
pokle:development

Conversation

@pokle
Copy link
Copy Markdown

@pokle pokle commented Feb 1, 2026

Hiya,

This fixes a usability issue I noticed when opening the command dialog. If there's existing text from a previous use, that text gets in the way of entering new text. Users have to delete it first before entering new text.

The way other such components in the wild work is by selecting existing text so that users can type over if they prefer (or edit the existing text if they prefer). For example the MacOS Spotlight Search does this.

To test:

  • Run it locally and visit http://localhost:8080/components/command/#examples
  • Click on the command button right at the bottom, or type ⌘J
  • Enter some text to select a command (e.g. oji to select 'Search Emoji'), and hit ENTER
  • Re-open the command the same way
  • You should now see your previously entered text selected.
  • You should be able to type another command by typing over the selection.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant