-
Notifications
You must be signed in to change notification settings - Fork 2.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
[tree] fix scroll behavior when selecting or expanding a node #8154
[tree] fix scroll behavior when selecting or expanding a node #8154
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really happy the annoying glitch was fixed 👍
I verified using multiple trees and it all works correctly when manually scrolling and selecting a node (no more annoying jump):
- explorer
- search-in-workspace
- problems
- npm scripts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes work well 👍 ! Tested the trees in Explorer, Search-in-workspace and Problems. The scroll no longer jumps up and scrolls the selected element away.
13b1492
to
d67005f
Compare
@akosyakov Thank you for your previous review. You are right, my solution was not very optimal. I have updated the code, if you can review again that would be great. As mentioned in the PR description(updated), I made use of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes work correctly when only clearing what is necessary 👍
please when you read something on the internet, think whether conditions are really applicable to our case |
d67005f
to
d1768cf
Compare
@akosyakov the code was updated to only |
Resizing was just my example of the case when the height of a row can change. I don't know what else can cause change of the height. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try.
It would be good if someone writes down what was the root cause of the issue and why such change fixes it. I don't understand it.
d1768cf
to
12ec6bc
Compare
Fixes: eclipse-theia#3347 Fixes: eclipse-theia#1593 The following commit updates the tree-widget to fix an issue when trees are manually scrolled and nodes are selected causing a jump (poor user-experience). The changes include: - updating the default resize parameter for forceUpdate to false since we only want to clear the entire cache when a resize actually occurs - updates the onResize to properly resize when performing a forceUpdate Signed-off-by: Anas Shahid <muhammad.shahid@ericsson.com> Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
12ec6bc
to
fd1bf81
Compare
@kittaakos can you review this to see if it solves the issue for file-dialog for you? |
I have tried it and quickly compared the behavior with the |
What it does
Fixes: #3347, Fixes: #1593
The following commit updates the
tree-widget
to fix an issue when trees across the framework (ex: explorer, file dialog) are scrolled and nodes are selected which causes a jump and subsequently a poor user-experience.The change includes updating the default value of the
resize
parameter inforceUpdate
tofalse
since we should only properly perform a cacheclearAll
only when an explicit resize has occurred.How to test
debug console
is properly rendered when resizedReview checklist
Reminder for reviewers
Signed-off-by: Anas Shahid muhammad.shahid@ericsson.com
Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com
Recordings: