-
Notifications
You must be signed in to change notification settings - Fork 7
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
View is titled "none" in context menu #96
Comments
I know, it's actually a hack to make the title of the tree view display consistently no matter where it's located (in its own tab or just inside the Explorer tab). What I wanted was to always have "Git Tree Compare: " as prefix, and there was no combination of options that allowed it without resorting to the hack. I can look into it again, but it's a minor issue in my opinion. |
I had a look again, and the issue was with double naming... Changing the The case above would happen either when the view is still collapsed (since starting VS Code) and not in its own view container (like above when inside the Folders container), or if the workspace folder is not a git repository. In both cases the extension wouldn't be activated. Currently, in the cases above, it would just display "Git Tree Compare: none" instead of the double name. |
Hmm. Is setting the view's For what it's worth, there is a tangible downside to this, though it's probably a less common situation than using Code without opening a folder or opening a folder without a git repo. In my case, I installed GTC a few months ago and dragged the view into the Source Control sidebar because it felt like a natural place for it. At some point since then I must have hidden the view because, when I went to use GTC yesterday, I simply could not find it. I must have spent almost half an hour trying to rule out user error and Code weirdness before finally noticing "none" and unhiding it just to see if it was what I was looking for. |
|
I briefly scanned the other views provided by VS Code and the extensions I have installed, but only found one view which does something like this — the built-in Folders view. Its "name" in the context menu is "Folders", its title when a single folder is open shows that folder's name, and its title when no folders are opened shows "No Folders Opened". But because it's built in, I don't know that it has anything like a |
The empty view shows up like this: To me this looks like a similar hack. The trick is that they use two separate views, but I don't think this would work well in my case since people move the main view around based on preference, and the empty view would then be independent of that and possibly somewhere else completely. When dragging the source control view next to the empty view of the explorer/folder, and then open a folder, you end up with this mess: In my mind there is something missing in VS Code's extension metadata that would maybe allow to specify the title for the context menu, or at least include the view container name as well, so that at least it would say "Git Tree Compare: none". If you agree, I think it's worth filing a feature request for this in VS Code. |
Screenshot
Steps to reproduce
Notes
I haven't dug too deeply into Code extensions, but just glancing at the
contributes
key in package.json, this line looks pretty suspicious. 😉Environment, per Issue Reporter
Extension version: 1.16.0
VS Code version: Code 1.83.1 (f1b07bd25dfad64b0167beb15359ae573aecd2cc, 2023-10-10T23:48:05.904Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
Footnotes
In my case, I still had a small number of (in theory, irrelevant) application-wide User Settings:
Code/User/settings.json
↩The text was updated successfully, but these errors were encountered: