-
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
Show "Collapse All" command in tree view toolbar. #12514
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.
Hi @tsmaeder,
Thank you very much for that change! I tested it with a single-root and a multi-root tree and both times the behavior was as expected. The flag is also correctly considered (i.e., if missing of false
the button is not shown) so everything is working very nicely.
I do have some minor comments from which at least the command label one should be addressed. The others are more general thoughts and questions.
packages/plugin-ext/src/main/browser/plugin-frontend-contribution.ts
Outdated
Show resolved
Hide resolved
packages/plugin-ext/src/main/browser/plugin-frontend-contribution.ts
Outdated
Show resolved
Hide resolved
Hmh...I noticed that the shown actions are not correct when starting up with the view open in a view container with only one view. This is the case where the |
…#12513. Contributed on behalf of STMicroelectronics Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
fa7c60d
to
e8ed7dd
Compare
@martin-fleck-at I addressed the comments and fixed the behavior when a single view is present in a view container: you can test this by opening the "Test View Drag and Drop" and then refreshing the browser. |
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 re-tested the code and everything seems to be working now fine. Thank you @tsmaeder!
Contributed on behalf of STMicroelectronics Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
Contributed on behalf of STMicroelectronics
What it does
Closes #12513.
Adds a "Collapse All" toolbar item in tree views contributed by plugins if the plugin requests it in the options (
showCollapseAll
). This PR introduces the concept ofDynamicWidget
. It allows to update the toolbar after the contents of a view widget has been create lazily.How to test
Use the procedure from the related issue and make sure the icon appears. You can also use the built-in "NPM SCRIPTS" view as a second test case.
Review checklist
Reminder for reviewers