Skip to content

Explorer: add explorer.collapseResource to collapse a specific folder (by URI) without changing focus (#261598) #262980

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Csabesz07
Copy link

Summary

Adds two new commands explorer.collapseResource and explorer.collapseResourceRecursive that collapses a specific folder (and it's child folders with the recurscive command) in the Explorer given its resource URI, without changing focus/selection.

Motivation

Extensions and automation need to collapse folders programmatically without UI flicker or stealing focus. Existing commands operate only on the focused element.

Implementation

  • Registers explorer.collapseResource (args: URI).
  • Registers explorer.collapseResourceRecursive (args: URI).
  • No behavior change to existing commands.

Backwards compatibility

  • New command only; no changes to existing public commands.

Related

Addresses #261598

@Csabesz07
Copy link
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants