-
Notifications
You must be signed in to change notification settings - Fork 450
feat: add command component and improve autocomplete and combobox #602
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
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.
6 issues found across 46 files
Prompt for AI agents (all 6 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="apps/ui/public/r/p-combobox-14.json">
<violation number="1" location="apps/ui/public/r/p-combobox-14.json:1">
P2: Grammar issue: "Select a item" should be "Select an item". The indefinite article 'an' is used before words starting with a vowel sound.</violation>
</file>
<file name="apps/ui/registry/default/particles/p-combobox-14.tsx">
<violation number="1" location="apps/ui/registry/default/particles/p-combobox-14.tsx:42">
P2: Grammar error: "a item" should be "an item" (use 'an' before words starting with a vowel sound).</violation>
</file>
<file name="apps/ui/registry/default/particles/p-command-1.tsx">
<violation number="1" location="apps/ui/registry/default/particles/p-command-1.tsx:133">
P2: Keyboard shortcut documentation is incorrect. The footer shows `⌘K` for "Close", but the actual toggle shortcut is `⌘J`. Consider changing to `⌘J` or updating the label to reflect that it toggles the dialog.</violation>
</file>
<file name="packages/ui/src/components/command.tsx">
<violation number="1" location="packages/ui/src/components/command.tsx:165">
P2: The `className` prop is destructured but never passed to `AutocompleteGroup`, causing any className passed to `CommandGroup` to be silently ignored.</violation>
</file>
<file name="apps/ui/registry/default/ui/command.tsx">
<violation number="1" location="apps/ui/registry/default/ui/command.tsx:165">
P2: The `className` prop is destructured but never passed to `AutocompleteGroup`. This will cause any `className` passed to `CommandGroup` to be silently ignored. Either remove the destructuring to let it pass through with `...props`, or explicitly pass it to the component.</violation>
</file>
<file name="apps/ui/public/r/command.json">
<violation number="1" location="apps/ui/public/r/command.json:1">
P2: The `className` prop is destructured but never passed to `AutocompleteGroup`. Any `className` passed to `CommandGroup` will be silently ignored. Either pass `className={className}` to `AutocompleteGroup` or remove it from destructuring.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
| @@ -0,0 +1,26 @@ | |||
| { | |||
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.
P2: Grammar issue: "Select a item" should be "Select an item". The indefinite article 'an' is used before words starting with a vowel sound.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/ui/public/r/p-combobox-14.json:
<comment>Grammar issue: "Select a item" should be "Select an item". The indefinite article 'an' is used before words starting with a vowel sound.</comment>
<file context>
@@ -0,0 +1,26 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "p-combobox-14",
+ "type": "registry:block",
+ "description": "Combobox multiple with start addon",
+ "dependencies": [
+ "lucide-react"
+ ],
+ "registryDependencies": [
</file context>
| </ComboboxChip> | ||
| ))} | ||
| <ComboboxInput | ||
| aria-label="Select a item" |
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.
P2: Grammar error: "a item" should be "an item" (use 'an' before words starting with a vowel sound).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/ui/registry/default/particles/p-combobox-14.tsx, line 42:
<comment>Grammar error: "a item" should be "an item" (use 'an' before words starting with a vowel sound).</comment>
<file context>
@@ -0,0 +1,61 @@
+ </ComboboxChip>
+ ))}
+ <ComboboxInput
+ aria-label="Select a item"
+ placeholder={value.length > 0 ? undefined : "Select a item..."}
+ />
</file context>
| <div className="flex items-center gap-2"> | ||
| <KbdGroup> | ||
| <Kbd>⌘</Kbd> | ||
| <Kbd>K</Kbd> |
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.
P2: Keyboard shortcut documentation is incorrect. The footer shows ⌘K for "Close", but the actual toggle shortcut is ⌘J. Consider changing to ⌘J or updating the label to reflect that it toggles the dialog.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/ui/registry/default/particles/p-command-1.tsx, line 133:
<comment>Keyboard shortcut documentation is incorrect. The footer shows `⌘K` for "Close", but the actual toggle shortcut is `⌘J`. Consider changing to `⌘J` or updating the label to reflect that it toggles the dialog.</comment>
<file context>
@@ -0,0 +1,142 @@
+ <div className="flex items-center gap-2">
+ <KbdGroup>
+ <Kbd>⌘</Kbd>
+ <Kbd>K</Kbd>
+ </KbdGroup>
+ <span>Close</span>
</file context>
| ); | ||
| } | ||
|
|
||
| function CommandGroup({ |
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.
P2: The className prop is destructured but never passed to AutocompleteGroup, causing any className passed to CommandGroup to be silently ignored.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/ui/src/components/command.tsx, line 165:
<comment>The `className` prop is destructured but never passed to `AutocompleteGroup`, causing any className passed to `CommandGroup` to be silently ignored.</comment>
<file context>
@@ -0,0 +1,258 @@
+ );
+}
+
+function CommandGroup({
+ className,
+ ...props
</file context>
✅ Addressed in d272a60
| ); | ||
| } | ||
|
|
||
| function CommandGroup({ |
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.
P2: The className prop is destructured but never passed to AutocompleteGroup. This will cause any className passed to CommandGroup to be silently ignored. Either remove the destructuring to let it pass through with ...props, or explicitly pass it to the component.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/ui/registry/default/ui/command.tsx, line 165:
<comment>The `className` prop is destructured but never passed to `AutocompleteGroup`. This will cause any `className` passed to `CommandGroup` to be silently ignored. Either remove the destructuring to let it pass through with `...props`, or explicitly pass it to the component.</comment>
<file context>
@@ -0,0 +1,258 @@
+ );
+}
+
+function CommandGroup({
+ className,
+ ...props
</file context>
✅ Addressed in d272a60
| @@ -0,0 +1,18 @@ | |||
| { | |||
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.
P2: The className prop is destructured but never passed to AutocompleteGroup. Any className passed to CommandGroup will be silently ignored. Either pass className={className} to AutocompleteGroup or remove it from destructuring.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/ui/public/r/command.json:
<comment>The `className` prop is destructured but never passed to `AutocompleteGroup`. Any `className` passed to `CommandGroup` will be silently ignored. Either pass `className={className}` to `AutocompleteGroup` or remove it from destructuring.</comment>
<file context>
@@ -0,0 +1,18 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "command",
+ "type": "registry:ui",
+ "dependencies": [
+ "@base-ui/react"
+ ],
+ "registryDependencies": [
+ "@coss/autocomplete"
</file context>
✅ Addressed in d272a60
sean-brydon
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.
Lots of code here - done a lot of manual testing looking great!
Summary by cubic
Introduces a new Command palette built on Base UI Dialog + Autocomplete, and adds start addon support to Autocomplete and Combobox for better UI. Addresses Linear CUI-36 by replacing the old cmdk-based command with a native component and removing the cmdk dependency.
New Features
Refactors
Written for commit 1ef14c8. Summary will update automatically on new commits.