alefragnani / vscode-bookmarks

Bookmarks Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks
GNU General Public License v3.0
1.7k stars 163 forks source link

[BUG] - Bookmark groups can be opened by a single or double click depending on VS Code setting #548

Closed tonghoangvu closed 2 years ago

tonghoangvu commented 2 years ago

Environment/version

Steps to reproduce

  1. To have some bookmarks
  2. Display all bookmarks as a tree view
  3. Open/close any bookmark group

Bookmark items can be opened with a single or double click depending on the VS Code workbench.list.openMode setting.

But group bookmarks are always opened with a single click. I feel a bit inconsistent, this behavior is not the same as in Files or Search. Better to use VS Code workbench.tree.expandMode setting.

image

Thanks.

alefragnani commented 2 years ago

Hi @tonghoangvu ,

It seems VS Code is not respecting/reproducing such behavior to extensions, because in fact, VS Code does not provide any API for extensions to choose/override such behavior. Neither List / Open Mode nor Tree / Expand Mode.

I'll double check this and if confirmed, open an issue to VS Code itself. Then, we will have to wait for VS Code team to provide API or fix VS Code itself

Hope this helps

alefragnani commented 2 years ago

My assumptions were correct, and this is handled by VS Code. But, it is not being applied to extensions today.

I have asked in the discussions repo (https://github.com/microsoft/vscode-discussions/discussions/88) and the VS Code team confirmed the issue. They opened an issue (https://github.com/microsoft/vscode/issues/158159 and it should be fixed in the August release.

Worth mention however a comment from the VS Code team, which explains how this works:

workbench.tree.expandMode is ignored in extension provided trees when the element that the user is clicking on has a command associated with it.

Once VS Code is updated, this issue should will be fixed, and the extension will respect the VS Code setting.

Hope this helps