Add expand-all action in search - #85428
Conversation
| @IViewletService private readonly viewletService: IViewletService, | ||
| @IPanelService private readonly panelService: IPanelService | ||
| ) { | ||
| super(id, label, 'search-action codicon-chrome-restore'); |
There was a problem hiding this comment.
How can I add a new codicon for expand-all ?
(codicon-chrome-restore is just a placeholder)
There was a problem hiding this comment.
@misolori Can we get expand-all codicon? Probably just collapse-all but with a plus.
|
Thanks for taking this on! As discussed in the original issue, I think it would be better if this were only visible when there are items to expand. The trick is the three states:
As the default behavior for search is now to show all results expanded, I think we should lean towards providing Collapse functionality, and the "Expand All" action should only appear if everything is collapsed, with only the "Collapse All" being visible otherwise. It might even make sense to only add a context menu entry for expanding all, as with #84087 the search results will almost always be fully expanded cc roblourens for ideas |
|
I agree, would rather not see two buttons at the same time. Just having a context menu option would be easier but it would be great to figure out the button behavior. |
|
Jackson Kearl (@JacksonKearl) roblourens |
6dd6a7d to
daf7687
Compare
|
Hello Jackson Kearl (@JacksonKearl) (CC: roblourens ) |
daf7687 to
0d67976
Compare
Fix bug skipping checking collapse state of first node.
|
I fixed the issue with the first node being treated differently (the while-loop was skipping the first node, changed to do-while) and added a hook to update the action when the tree state is toggled outside of this action. Should be good to go once we get an icon. Thanks for your work on this! |
|
roblourens Jackson Kearl (@JacksonKearl) I updated Codicons in master to now include a |
Thank you for your fixing and merging this PR 🙇✨ |


This PR fixes #28090
(Please let me know if there's a smart way to implement unit tests).