Skip to content
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

Feature request: Add commands to editor/context contribute submenu. #1358

Open
peaceshi opened this issue Dec 1, 2023 · 13 comments
Open

Feature request: Add commands to editor/context contribute submenu. #1358

peaceshi opened this issue Dec 1, 2023 · 13 comments
Labels
Needs Discussion We haven't decided what to do.

Comments

@peaceshi
Copy link
Contributor

peaceshi commented Dec 1, 2023

Proposal

From mdickin/vscode-markdown-shortcuts#76 .
This issue has not been replied to in a month and seems like the project has been no one maintains.
So, I want to add it to markdown-all-in-one.

I will make a PR later.

Other information

image

@yzhang-gh
Copy link
Owner

Thanks for your contribution.

However, I don't think it is a good UX design. For exporting as HTML, it requires many key strokes (ctrl shift p, p, r, i, n, t, (optional arrow keys), enter) and thus it will be convenient to have a menu item. For styling commands that is not true, it is just ctrl b/i etc. And it is even worse when you need to go into a submenu.

@yzhang-gh yzhang-gh added the Needs Discussion We haven't decided what to do. label Dec 3, 2023
@peaceshi
Copy link
Contributor Author

peaceshi commented Dec 3, 2023

It is not that everyone is a programmer or pro. It is difficult for civilian personnel to remember the right key bind then they will check it again and again. How about just adding them to the menu instead of submenu?

@yzhang-gh
Copy link
Owner

How about just adding them to the menu instead of submenu?

Then there will be too many commands.

The keybindings are so widely used (just look the B and I above the GitHub comment box or other software like Word). I am not very convinced of the necessity. We can leave this open and see what other users think.

@peaceshi
Copy link
Contributor Author

peaceshi commented Dec 5, 2023

How about adding to the title bar?
image

or like this?
image

@MomentDerek
Copy link

I support adding it to the menu! It is useful because I like to click it directly.

@LiXiaYu
Copy link

LiXiaYu commented Dec 5, 2023

How about just adding them to the menu instead of submenu?

Then there will be too many commands.

The keybindings are so widely used (just look the B and I above the GitHub comment box or other software like Word). I am not very convinced of the necessity. We can leave this open and see what other users think.

You're right, but the noble VScode supports the mouse and has multi-level menu options that can be freely switched on and off.

This is not Vim, we don't need comment box!

@lhmouse
Copy link

lhmouse commented Dec 5, 2023

Please consider 'non-well-known' key bindings bad.

So, what are 'well-known' keybindings? For example, Ctrl-C copies the selection; okay good, we are used to it. Ctrl-Insert also copies, and sometimes it's essential such as in the terminal, where Ctrl-C would send an interrupt; so, good, too.

They're all good, until there are too many. So what does Ctrl-Shift-R do? No, nobody will bother remembering that. It does not have to exist. Please give my menus back.

N.B. The Ctrl-B combination conflicts with workbench.action.toggleSidebarVisibility, so it's already not good; but not to me, as Ctrl-B doesn't work in the terminal anyway, so I have Ctrl-Shift-B to close it.

@yzhang-gh
Copy link
Owner

How about adding to the title bar?

image

This looks much better to me, not only because it is more convenient than context menu, but also because it shares the same UX as other editors.

VS Code has built-in icons, or you can find them here.


N.B. The Ctrl-B combination conflicts with workbench.action.toggleSidebarVisibility, so it's already not good; but not to me, as Ctrl-B doesn't work in the terminal anyway, so I have Ctrl-Shift-B to close it.

I see. (related #89)

yzhang-gh added a commit that referenced this issue Dec 25, 2023
@yzhang-gh
Copy link
Owner

Just FYI, I have added an option showActionButtons to show/hide these button. This is false by default following the VS Code UX guidelines.

If you would like to check it out, you can install the latest dev build
https://github.com/yzhang-gh/vscode-markdown/actions/runs/7322269176/artifacts/1134210918

I am going to release a new stable version soon if everything works well.

@peaceshi
Copy link
Contributor Author

Just FYI, I have added an option showActionButtons to show/hide these button. This is false by default following the VS Code UX guidelines.

If you would like to check it out, you can install the latest dev build https://github.com/yzhang-gh/vscode-markdown/actions/runs/7322269176/artifacts/1134210918

I am going to release a new stable version soon if everything works well.

分组应该跟之前一样在同一组里,否则如果有多个需要在工具栏显示操作的插件就会被打乱顺序。而且vsc只显示前几个注册的,后面的会被放到下拉菜单里。
image
image

@yzhang-gh
Copy link
Owner

因为我观察到之前的 1_11_2 写法并不能控制顺序,其实是按照命令的字母顺序排列的,比如 code span 会在 italic 之前。

考虑到现在的问题,那需要更了解 VS Code 这里的排序逻辑了

@ulville
Copy link

ulville commented Jan 16, 2024

How do I enable this? I could not find any option called showActionButtons

yzhang-gh added a commit that referenced this issue Jan 16, 2024
@yzhang-gh
Copy link
Owner

Thanks for the feedback. There is a mistake and it is not shown up in the Settings GUI. You can directly put "markdown.extension.showActionButtons": true in your settings JSON. Or you can install the dev build here
https://github.com/yzhang-gh/vscode-markdown/actions/runs/7541713779/artifacts/1172167689

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Discussion We haven't decided what to do.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants