-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Webview and other views cannot remember their height #106585
Comments
@mjbvz this makes GHPRI look pretty bad as the webview-view ends up taking up most of the space: microsoft/vscode-pull-request-github#3227. |
@alexr00 Are you still seeing this in the GitHub PR extension? I just tested but it seems like the view takes up half of the space If you still see this, can you please provide specific steps to reproduce this? |
@mjbvz to repro:
Please ignore the incorrect diffs in the screen shots. It's a known issue that I'll make a recovery release for in GHPRI this week! |
Thanks. I can't yet reproduce this on desktop but can hit this on web following those steps However I also reproduce this with the outline view if I move it into the @alexr00 / @sbatten Do you have any pointers on how initial view sizes are computed? |
@mjbvz this is where we expand the views and set size. vscode/src/vs/base/browser/ui/splitview/paneview.ts Lines 141 to 167 in 4a130c4
|
@alexr00 Is there an easy way to reproduce this with a local build? This is a complete pain to debug on GitHub.dev and I don't know how to get into this state in a local desktop/web build |
Version: 1.66.0-insider (Universal) I still see the original issue on VS Code (Desktop). Notice the order of expanding. When reloading github.dev, I guess restoring views would be restored in the same order by chance, which causes the issue. 2022-03-04.18.41.29.mov |
@tamuratak Thanks! @sbatten Adding you since I can reproduce this using any types of views. I tested using the source control views that git lens adds which are all normal tree views, not webview views |
I talked with @sbatten about this and we determined the original issue is by-design. The most recent demo video shows why this is the case:
This results in the overall height of both views increasing but both views were correctly preserving their height through all of the stages We don't think there's a good way to fix this. The example above is a minimal repo, but there are many other ways that users could get into this situation with more complex sequences of actions So I'm closing this specific issue as by-design but will open a new issue to continue investigating the issue with the GitHub pr extension seeing views not restored the the expected heights on first load / reload |
Version: 1.50.0-insider
Commit: cca20eb
Date: 2020-09-12T00:56:22.923Z
Electron: 9.3.0
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 17.7.0
I have tested the Webview View API. That greatly works. However, Webview views cannot remember their height. Expanding and collapsing them change their total height. How can extension authors work around it?
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: