-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
feat(VCommandPalette): add new command palette component #22403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
- Added VCommandPalette component for a keyboard-driven command interface. - Implemented props for items, search, hotkeys, and dialog configuration. - Included examples and documentation for usage, API, and accessibility features. - Enhanced navigation and filtering capabilities
- Removed unnecessary comments in VCommandPalette and its related files. - Updated slot descriptions in VList.json for better guidance. - Changes to useCommandPaletteNavigation for improved item selection. - Simplified props handling in VCommandPaletteItem
- Simplified item rendering logic in VCommandPaletteItemComponent. - Enhanced navigation logic to prevent unnecessary index resets in useCommandPaletteNavigation.
- Revised localization strings for clarity and conciseness in VCommandPalette.json. - Updated examples and documentation to reflect changes in hotkey usage and item properties. - Improved descriptions for props, events, and slots in the command palette documentation.
J-Sek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how slim it got. Great job.
These are just some quick comments.
Hopefully, I will have some time next week to go through examples and maybe add some more.
- Added `inputIcon` property to customize the search input icon in VCommandPalette. - Introduced custom input slot for more flexible search input implementations. - Updated styles for input container and no-data display for improved UI consistency.
- Implemented cleanup for the hotkey listener to prevent memory leaks. - Added `onUnmounted` lifecycle hook to clear the DOM reference and unsubscribe from hotkey events.
- Utilized requestAnimationFrame to ensure the search input is focused after rendering. - Added value binding to VCommandPaletteItem for better item representation. - Updated tests to reflect changes in search input handling and aria attributes.
|
When I type in search, the height of the dialog changes and (because it is trying to be centered vertically) field moves around and I have a hard time tracking what I actually type. It does not feel like a thing exclusive to VCommandPalette. I wonder if there is something we can do about it right now 🤔 Except having static height... Otherwise, we should split an enhancement for later. It would definitely be mitigated by the support for static anchor (that we could then set as default to have a typical UX). |
- include missing script when opening in VPlay - change hotkey to avoid conflict with `props-hotkey` example below
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
- Removed the `location` prop from VCommandPalette and its related usage in examples. - Updated documentation to reflect changes in dialog configuration and removed references to the `location` prop.
- Changed the default `inputIcon` for VCommandPalette from 'mdi-magnify' to '$search'. - Added new icons to the icon set, including 'mdiArrowRightBold', 'mdiConsole', 'mdiContentSaveAll', 'mdiFilePlus', 'mdiFindReplace', 'mdiFolderPlus', 'mdiKeyboard', 'mdiMagnifyMinus', 'mdiMagnifyPlus', and 'mdiPageLayoutSidebarLeft'. - Updated the icon alias for 'search' to map to 'mdi-magnify'.
- Removed `activator` and `dialogProps` from VCommandPalette props, streamlining the component's API. - Updated documentation to clarify that unrecognized props are passed to the underlying `v-dialog`. - Added 'search' icon to various icon sets, including Font Awesome and Material Design Icons.
Noted. |
- Introduced a `max-width` prop set to 500 for the VCommandPalette in multiple examples to enhance layout control. - Updated `prop-dialog.vue`, `prop-hotkey.vue`, and `prop-items.vue` to reflect this new prop for better UI consistency.
Description
Adds a new VCommandPalette component
Markup: