You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Workbench miss relayout after viewport size changes #108267
when testing codespace, I can reproduce more than 50% of the time
In Safari Devtools, if I add a resize listener to window.visualViewport and print the viewport size when it changes, it always emits the event when the viewport resizes. It might mean that Safari is emitting events out correctly.
In Safari Devtools, whenever I open the bundled js or try to inspect the workbench Dom element, devtools crash so I can't debug at all
Benjamin Pasero (@bpasero) do you have ideas about how we can add some log (maybe emit to outputs channel, behind a flag) and then we can continue our investigation which part might misbehave?
Does this issue occur when all extensions are disabled?: Yes/No
Peng Lyu (@rebornix) looks like the log level was not properly wired in for web, I pushed a change and now you can set the log level as query param to get trace output. I would suggest you add this debug info as logService.trace.
Successfully debug Codespace with Safari Dev Tools, I found the root cause is how Codespace wraps VS Code workbench. The DOM structure is like
- body
- div.vscs-dev-panel
- div.vscs-workbench-body
- vscode workbench
In our workbench, we layout the workbench by following rules
If the container of the workbench is not document.body, use the container's dimension
If its container is document.body, then use window.visualViewport on iOS, window on other platforms
In Codespace environment, VS Code workbench is not document.body, so we will always use its dimension as the workbench's dimension. Since its container is not resized properly, sometimes it becomes larger than the visual viewport.
We can't always use window.visualViewport as the size (or maxSize) of the workbench as its container's size can be smaller than visualViewport, due to the existence of div.vscs-dev-panel.
Activity
web - add support for setting log level (#108267)
bpasero commentedon Oct 8, 2020
Peng Lyu (@rebornix) looks like the log level was not properly wired in for web, I pushed a change and now you can set the log level as query param to get trace output. I would suggest you add this debug info as
logService.trace.URL: http://localhost:8080/?payload=[[%22verbose%22,%22true%22],[%22logLevel%22,%22trace%22]]
re #108267. add trace log for window viewport resize
rebornix commentedon Oct 15, 2020
Successfully debug Codespace with Safari Dev Tools, I found the root cause is how Codespace wraps VS Code workbench. The DOM structure is like
In our workbench, we layout the workbench by following rules
document.body, use the container's dimensiondocument.body, then usewindow.visualViewporton iOS,windowon other platformsIn Codespace environment, VS Code workbench is not
document.body, so we will always use its dimension as the workbench's dimension. Since its container is not resized properly, sometimes it becomes larger than the visual viewport.We can't always use
window.visualViewportas the size (or maxSize) of the workbench as its container's size can be smaller thanvisualViewport, due to the existence ofdiv.vscs-dev-panel.The current recommended fix for this issue is Codespace resizes
div.vscs-workbench-bodyproperly based on visual viewport change. Created a tracking issue in Codespace https://github.com/github/codespaces/issues/1443rebornix commentedon Oct 15, 2020
As explained above, changes need to be made in embedder. Closing it as it's already being tracked by upstream, nothing needs to be done from our side.