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

Test: Tree sticky scroll support compact sticky nodes #202840

Closed
2 tasks done
benibenj opened this issue Jan 19, 2024 · 2 comments
Closed
2 tasks done

Test: Tree sticky scroll support compact sticky nodes #202840

benibenj opened this issue Jan 19, 2024 · 2 comments

Comments

@benibenj
Copy link
Contributor

benibenj commented Jan 19, 2024

Refs: #199539

Complexity: 3

Create Issue


In this update we will support compressing sticky nodes when the maximum number of elements in the tree sticky scroll widget is reached. This only works for trees that support compression like most file system trees in core (file explorer, search view rendered as tree, SCM view rendered as tree, ...). Trees contributed by extensions do not support compression.

When do we compress items together in tree sticky scroll:

  • When sticky scroll needs to render more than workbench.tree.stickyScrollMaxItemCount elements
  • When the max allowed hight for sticky scroll is reached. Sticky scroll is allowed to only take up 40% of the tree view. If it needs to render one more item in sticky scroll which would cause the widget to take more than 40% it will compress the node with the previous one.
  • Not all items support compression, for example in the search results tree a file can not be compressed together with a folder

How to test:

  1. Open a project with many nested folders (like VSCode)
  2. Change workbench.tree.stickyScrollMaxItemCount to 5 (makes it easier to test)
  3. Go to explorer view
  4. Make sure to expand many nested folders
  5. Slowly scroll through the tree. Make sure it never renders more than workbench.tree.stickyScrollMaxItemCount elements.
  6. When sticky scroll renders the max amount of elements and you scroll over another expanded nested folder, then it will render that folder together with the last sticky scroll element.
  7. Make the size of the explorer view smaller by resizing it (will require to have another expanded view in the sidebar). See how it compresses more sticky scroll items together to make sure the widget does not take more than 40% of the view.
  8. Change the workbench.tree.stickyScrollMaxItemCount value and repeat steps 4 - 6
  9. Test this in another tree, for example in the search view you can search for the word 'toolbar', this will lead to many nested results. Make sure to display the results as a tree structure.

BEFORE: WITHOUT COMPRESSION

Code_-_Insiders_GrRqTHA0XJ

AFTER: WITH COMPRESSION

Code_-_Insiders_10pWNnb4Mh

@benibenj benibenj added this to the December / January 2024 milestone Jan 19, 2024
@hediet hediet removed their assignment Jan 23, 2024
@hediet
Copy link
Member

hediet commented Jan 23, 2024

Nice job!

@dinofx
Copy link

dinofx commented Feb 6, 2024

Excellent. This should have been highlighted in the video/animation in the release notes. I hope others find this issue before they open duplicate feature requests.

@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants