Skip to content
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

Notebook editor layout glitch while resizing #100224

Closed
roblourens opened this issue Jun 15, 2020 · 3 comments
Closed

Notebook editor layout glitch while resizing #100224

roblourens opened this issue Jun 15, 2020 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders notebook verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

roblourens commented Jun 15, 2020

Jun-15-2020 13-44-16

Seems like the basic issue is that here, we are using the old scrollWidth to compute the new height, with the new total width, so when sizing the editor to be smaller, scrollWidth is always > width. I see the same wrong computation in a basic text editor, but I guess it's not a problem when the height is wrong there.

this._getContentHeight(width, height, scrollWidth)

This fixes it

image

but I really have no clue if that's the right thing to do, also scrollWidth is used in _updateHeight. I think that's ok because that's not called when these numbers are changing so scrollWidth will just be equal to contentWidth or width.

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug notebook labels Jun 15, 2020
@roblourens roblourens added this to the June 2020 milestone Jun 15, 2020
@roblourens
Copy link
Member Author

@rebornix I think I've done all the debugging I can do on this. The change in my screenshot might be enough or it might break stuff. Do you have any idea or should we loop in Alex?

@rebornix
Copy link
Member

thanks for the investigation, @alexdima can you confirm if it's safe?

@alexdima
Copy link
Member

👍 The analysis is very good and that change makes good sense.

@mjbvz mjbvz added the verified Verification succeeded label Jul 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders notebook verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@roblourens @rebornix @alexdima @mjbvz and others