- 
                Notifications
    You must be signed in to change notification settings 
- Fork 748
Add additional command palette actions for documentation and AI chat panels #5705
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: main
Are you sure you want to change the base?
Conversation
…l help you craft a concise commit message.
| The latest updates on your projects. Learn more about Vercel for Git ↗︎ 
 | 
| I agree with @Light2Dark, think the tooltip would be fine to use as a label. I think we have more freedom to change these kind of "on-demand" behaviors in the UI. May I suggest we use a more descriptive PR title like "Add additional command palette actions for documentation and AI chat panels"? The PR titles are copied into release notes so it would be useful to help discoverability by end users of these new additions. | 
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 think we can add something call extraDescription that is just used for searching. using tooltip as the label will may lead to some other side effects
| I added a key  | 
| label: "Helper panel", | ||
| handle: NOOP_HANDLER, | ||
| dropdown: PANELS.flatMap(({ type, Icon, hidden }) => { | ||
| dropdown: PANELS.flatMap(({ type, Icon, hidden, extraDescription }) => { | 
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.
this is going to create a lot of dropdowns (which we don't want). we should instead fire through a custom filter prop to in frontend/src/components/editor/controls/command-palette.tsx to <CommandDialog that uses these extra descriptions
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 feel inclined to push back a little bit, but this might just be a lack of typescript/react knowledge on my part, so feel free to push back too.
My concern is that if a user types "contextual helper" and they see "documentation" that they may experience that as a "oh, i guess this feature is not here". That's the thing I really want to prevent. I think the only way to get there is to have extra dropdown items because if we just show the "documentation" element without any matching terms the user may still get confused.
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.
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.
Ah! Now I understand!


It felt like these two were the main culprits, at least in my workflow.
I was contemplating to change this code:
Maybe we could use the
tooltipinstead of thetypeto render the label? But I worried that by changing this that I might break existing workflows of folks. So maybe just adding these two options is best.