microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.43k stars 430 forks source link

Improve the UI/UX of the Multi-Root Workspace Project Outline Pane #1362

Open MBetters opened 3 years ago

MBetters commented 3 years ago

This is just a slight UI/UX improvement request.

Brief Issue Summary

I'm using a multi-root workspace SSH'd into a remote VM. The CMake Project Outline pane shows full paths even though they all start with the same string - /home/vagrant/mercury. Here's what it looks like:

image

Expected:

If all the multi-root workspace paths start with the same prefix (EG: /home/vagrant/mercury), then get rid of that prefix. This would make the pane easier to read.

Apparent Behavior:

N/A

CMake Tools Log

N/A

Developer Tools Log

N/A

Platform and Versions

Other Notes/Information

N/A

MBetters commented 3 years ago

Quick follow-up. It'd be great to have more control over how the Project Outline pane appears. For a multi-root workspace, maybe there could be a setting like cmake.projectOutline.multiRootOutline.sectionFormat that could have a few common-sense settings. For example, being able to have the top level sections just be the "names" of the multi-root folders instead of the paths. Etc.

Another thought I had was having an option like cmake.projectOutline.showEmptyProjects that could be true or false. I have a few dummy empty projects I'm using until https://github.com/microsoft/vscode-cmake-tools/issues/1069 gets fixed, so it'd be great to be able to just hide them. But I'm sure there are other cases where people use empty projects for their own special reasons, and don't need to see them in the Project Outline pane.

Just a couple thoughts. Let me know if these should be broken out into separate issues. I renamed this issue to Improve the UI/UX of the Multi-Root Workspace Project Outline Pane to encompass these three requests.

maschgit commented 3 years ago

@MBetters great suggestions.
I do also have the same case as you. I am using several paths in my multiworkspace folder setting. Only a few of them are to create targets. I suggest a setting, like a list where paths are given. So the cmake tool don't search for a CMakeLists.txt file in those paths. With this setting In the CMake tools pane only the path, which creates target can be shown. A problem with the current solution is that if path in which no CMakeLists.txt file is located the CMake Tool is stopping with further configuration of other paths, even if in the other paths CMakeLists.txt are located. My workaround is to set the paths in which no CMakeLists.txt files are located after all paths where CMakeLists.txt are located.

Further: I'd like to have additionaly to the current "configure all projects" possibility a possibility to choose which project I would like to configure.

MBetters commented 3 years ago

@maschgit Idk if you know this, but you can select which multi-root workspace to Configure by clicking the multi-root workspace selector button in the toolbar. It should have the name of the active workspace. When you click it, a selector will show up at the top of the VSCode window. You can then Configure workspaces on their own.

bobbrow commented 3 years ago

@maschgit If the extension gives up midway through your list of folders, that sounds like a bug that we should be tracking. Could you open a bug for that so that we don't lose it in this UX discussion?

bobbrow commented 3 years ago

Just a couple thoughts. Let me know if these should be broken out into separate issues. I renamed this issue to Improve the UI/UX of the Multi-Root Workspace Project Outline Pane to encompass these three requests.

Can you point out the 3rd request? I'm only seeing two:

  1. A setting that changes how the workspace folder nodes are presented
  2. A setting that allows you to hide empty nodes

Maybe the 3rd one was from your first post, though I'm thinking the setting you proposed in the follow up would replace that. It's possible that this setting could even allow you to customize the node any way you like with a few supported variables. See window.title for an example of what I'm thinking (but not committing to yet! 😄) though we'd have different variables, of course:

image

MBetters commented 3 years ago

3 requests:

bobbrow commented 3 years ago

Thanks for confirming. 👍 I don't think I would want to remove duplicate paths because that's too similar to the option to just show the folder name with the folder path on the right side. If someone was passionate about that setting they could do a PR to add it to the list of options for the sectionFormat setting (or whatever we end up calling it).

My preference for the default behavior would be to either leave it as is, or show the folder names on the left and the remaining path on the right in the square brackets.

maschgit commented 3 years ago

@maschgit Idk if you know this, but you can select which multi-root workspace to Configure by clicking the multi-root workspace selector button in the toolbar. It should have the name of the active workspace. When you click it, a selector will show up at the top of the VSCode window. You can then Configure workspaces on their own.

Thank you for your answer. I'm not sure, if I understand you correctly. Do you mean the toolbar in the bottom of VSC? image

If you mean this toolbar, then master is chosen but it is not possible to only configure e.g. Master. I need to configure all projects in the cmake pane, by clicking on this button: image

To be clear: I have one workspace file in which all paths are set. My CMAKE tools pane look so: image The first three paths are projects to create targets. All other paths I would like to hide, because they only create libs, which are intergrated to the targets in the first three paths. The libs are created by the frist three paths. I included this paths in the workspace file to see them in the file explorer pane.

maschgit commented 3 years ago

@maschgit If the extension gives up midway through your list of folders, that sounds like a bug that we should be tracking. Could you open a bug for that so that we don't lose it in this UX discussion?

@bobbrow I created an issue. You will find it here: #1372

github-actions[bot] commented 8 months ago

This issue is now marked as 'stale-old' due to there being no activity on it for the past 720 days. Unless the 'stale-old' label is removed or the issue is commented on, this will be remain open for at least 14 days and then it may be closed. If you would like to make this issue exempt from getting stale, please add the 'stale-exempt' label.