Allow extensions to add buttons to a specific area of the UI #48947
Julynx
started this conversation in
Feature Requests
Replies: 1 comment
-
|
having some kind of shortcuts for daily stuff should be just great. Especially with almost empty Zed menubar. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What are you proposing?
One of the things that makes Visual Studio extremely flexible is that it allows extension developers to add functional buttons to the status bar, as well as side bars / panels. Because Zed does not use electron and has a much more minimal approach to UI, a small area in the status bar would be enough.
Why does this matter?
Extensions often want to present the user with options or visual information, and a keyboard-centric approach based on commands will miss a lot of users and will not meet the usability targets for a lot of use cases, such as an extension to generate a QR code from a link, a color selector extension, or a simple makefile extension that displays the commands as clickable buttons.
Having a way for extensions to display some kind of button would be enough, as they can trigger whatever action they need when the user clicks it, including displaying information in a new file/tab, opening a browser page, or showing some kind of simple menu without Zed needing to embed a full JS runtime and expose it to extension devs as VSCode does.
What problem does this solve?
Allows extensions to present clickable buttons for common actions such as running tasks or opening windows for users to log in, pick a color or upload a file, without the user having to run a command or use a keybind.
What becomes easier or possible?
Presenting visual information, presenting choices to users, accesibility for users who prefer (or need) to use a mouse to run commands or interact with funcitionality.
Are there any examples or context?
Yes, as an extension developer I was able to accomplish this in Visual Studio Code:
https://open-vsx.org/extension/julynx/project-actions
Possible approach
I am thinking of some kind of API exposed by Zed that allows devs to register and update a button for their extension (text and maybe an icon in the flavor of Zed).
I would prefer this kind of "restricted" and "controlled" solution so that all buttons live in the same area and are handled in the same way, for visual consistency, compatibility with themes, and ease of use.
Think of it like the Windows system tray or the Chrome extensions menu, with small icons for each running extension and perhaps some kind of right-click menu or action. Extensions could then register entries for this right click menu, but each extension could only have one button. If the Zed window is made narrower, the buttons would collapse into an overflow menu, allowing this behavior to be forced if the user prefers all buttons to be collapsed at all times, as it works in Windows.
Beta Was this translation helpful? Give feedback.
All reactions