microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.55k stars 29.01k forks source link

UI Overlap With `window.nativeTabs: false`, `window.commandCenter: true`, and Tab per Project #192801

Closed wesleyboar closed 1 year ago

wesleyboar commented 1 year ago

Type: Bug

  1. Have window.nativeTabs: false and window.commandCenter: true.
  2. Open a project.
  3. Open a new tab (i.e., on macOS, command + shift + N).
  4. Open a new project in that tab (i.e., on macOS, control + R then select one).
  5. Notice overlap of Command Center atop tabs.
screenshot (dark mode)
vs code command center and tab per project
screenshot (light mode)
Screenshot 2023-09-11 at 12 40 44 PM

https://github.com/microsoft/vscode/assets/62723358/594bd4f0-efe7-48df-9f4c-ec4baec46fcd

VS Code version: Code 1.82.0 (Universal) (8b617bd08fd9e3fc94d14adb8d358b56e3f72314, 2023-09-06T22:09:41.364Z) OS version: Darwin arm64 22.6.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M2 (8 x 24)| |GPU Status|2d_canvas: enabled
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| |Load (avg)|2, 3, 3| |Memory (System)|24.00GB (0.12GB free)| |Process Argv|--crash-reporter-id 34098c29-9101-4ba7-b025-6e3e06616ace --crash-reporter-id 34098c29-9101-4ba7-b025-6e3e06616ace --crash-reporter-id 34098c29-9101-4ba7-b025-6e3e06616ace --crash-reporter-id 34098c29-9101-4ba7-b025-6e3e06616ace --crash-reporter-id 34098c29-9101-4ba7-b025-6e3e06616ace --crash-reporter-id 34098c29-9101-4ba7-b025-6e3e06616ace| |Screen Reader|no| |VM|0%|
Extensions (34) Extension|Author (truncated)|Version ---|---|--- yaml2json|ahe|0.0.5 vscode-css-modules|and|1.2.3 icons-carbon|ant|0.2.6 chalice-icon-theme|art|1.2.24 django-html|bib|1.3.0 markdown-checkbox|bie|0.4.0 markdown-footnotes|bie|0.1.1 postcss|css|1.0.9 vscode-markdownlint|Dav|0.51.0 mustache|daw|1.1.1 vscode-eslint|dba|2.4.2 gitlens|eam|14.3.0 vscode-html-css|ecm|1.13.1 EditorConfig|Edi|0.16.4 vscode-github-actions|git|0.26.2 vscode-env|Iro|0.1.0 vscode-edit-csv|jan|0.8.2 minifyall|jos|2.10.0 python-sphinx-highlight|leo|0.3.0 twig-language-2|mbl|0.9.2 rainbow-csv|mec|3.7.0 theme-monokai-pro-vscode|mon|1.2.1 language-gettext|mro|0.2.2 python|ms-|2023.16.0 color-highlight|nau|2.5.0 autodocstring|njp|0.6.1 vscode-yaml|red|1.14.0 synthwave-vscode|Rob|0.1.15 jinjahtml|sam|0.20.0 markdown-to-confluence-vscode|t-n|0.1.5 solarized-high-contrast-light|tin|0.4.0 vscode-css-custom-properties|Toc|0.0.5 simple-rst|tro|1.5.3 vscode-mdx|uni|1.4.0 (3 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscoreces:30445986 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 vscaat:30438848 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 vsccc:30803844 282f8724:30602487 f6dab269:30613381 a9j8j154:30646983 showlangstatbar:30737416 03d35959:30757346 ecj1e332:30736112 pythonfmttext:30731395 f8hc8238:30694864 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 pythonnosmt12:30797651 pythonidxptcf:30805731 pythonnoceb:30805159 dsvsc013:30795093 dsvsc014:30804076 diffeditorv2:30821572 dsvsc015:30829745 ```
jrieken commented 1 year ago

Open a new tab (i.e., on macOS, command + shift + N).

This open a new window, not a tab, for me. Did you change the window.nativeTabs without a restart? What is the actual command id that get executed to open a new tab (use F1 > Keyboard Shortcuts Troubleshooting)

wesleyboar commented 1 year ago

Did you change the window.nativeTabs without a restart?

Maybe before. But, just now, to test again, I restarted VS Code, then repeated the steps, and got the same results.

What is the actual command id that get executed to open a new tab?

I don't know. I provide the output, after my command, from the OUTPUT window that appeared after "Debug: Toggle Keyboard Shortcuts Troubleshooting".

Output ``` 2023-09-12 09:45:33.669 [info] [perf] Render performance baseline is 27ms 2023-09-12 09:45:34.424 [error] Git error 2023-09-12 09:47:10.985 [info] [KeybindingService]: / Soft dispatching keyboard event 2023-09-12 09:47:10.986 [info] [KeybindingService]: \ Keyboard event cannot be dispatched 2023-09-12 09:47:10.986 [info] [KeybindingService]: / Received keydown event - modifiers: [meta], code: MetaLeft, keyCode: 91, key: Meta 2023-09-12 09:47:10.986 [info] [KeybindingService]: | Converted keydown event - modifiers: [meta], code: MetaLeft, keyCode: 57 ('Meta') 2023-09-12 09:47:10.987 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase. 2023-09-12 09:47:11.025 [info] [KeybindingService]: / Soft dispatching keyboard event 2023-09-12 09:47:11.026 [info] [KeybindingService]: \ Keyboard event cannot be dispatched 2023-09-12 09:47:11.026 [info] [KeybindingService]: / Received keydown event - modifiers: [shift,meta], code: ShiftLeft, keyCode: 16, key: Shift 2023-09-12 09:47:11.027 [info] [KeybindingService]: | Converted keydown event - modifiers: [shift,meta], code: ShiftLeft, keyCode: 4 ('Shift') 2023-09-12 09:47:11.027 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase. 2023-09-12 09:47:11.300 [info] [KeybindingService]: / Soft dispatching keyboard event 2023-09-12 09:47:11.301 [info] [KeybindingService]: | Resolving shift+meta+[KeyN] 2023-09-12 09:47:11.301 [info] [KeybindingService]: \ From 2 keybinding entries, matched workbench.action.newWindowTab, when: no when condition, source: user. 2023-09-12 09:47:11.301 [info] [KeybindingService]: / Received keydown event - modifiers: [shift,meta], code: KeyN, keyCode: 78, key: n 2023-09-12 09:47:11.301 [info] [KeybindingService]: | Converted keydown event - modifiers: [shift,meta], code: KeyN, keyCode: 44 ('N') 2023-09-12 09:47:11.301 [info] [KeybindingService]: | Resolving shift+meta+[KeyN] 2023-09-12 09:47:11.302 [info] [KeybindingService]: \ From 2 keybinding entries, matched workbench.action.newWindowTab, when: no when condition, source: user. 2023-09-12 09:47:11.302 [info] [KeybindingService]: + Invoking command workbench.action.newWindowTab. ```
jrieken commented 1 year ago

Thanks for clarifying. I can reproduce when I invoke workbench.action.newWindowTab with a custom keybinding. It doesn't seem to honour that the feature is disabled

jrieken commented 1 year ago

To reproduce

{
  "key": "cmd+k n",
  "command": "workbench.action.newWindowTab"
}
bpasero commented 1 year ago

These commands are already disabled in the commands picker, so pushing a change to simply refuse execution when native tabs are not enabled in settings.

wesleyboar commented 1 year ago

What will the end result for user be?

That VS Code opens new window instead of new tab?

bpasero commented 1 year ago

It is a no-op. We do not support native tabs in the UI if you do not enable them. I believe you are trying to do something which we are not supporting: show command center and native tabs, and so please upvote https://github.com/microsoft/vscode/issues/172464