Repository navigation
Respect explorer.compactFolders in the search results tree - #325654
varshitha (dobbydobap) wants to merge 4 commits into
Conversation
| ], | ||
| this.searchDataSource, | ||
| { | ||
| compressionEnabled: this.configurationService.getValue<boolean>('explorer.compactFolders'), |
| this._register(Event.filter(this.configurationService.onDidChangeConfiguration, e => e.affectsConfiguration('explorer.compactFolders'))(() => | ||
| this.tree.updateOptions({ compressionEnabled: this.configurationService.getValue<boolean>('explorer.compactFolders') }))); |
There was a problem hiding this comment.
Good catch, I'd only mirrored half of the Explorer's isCompressionEnabled. Added the screen-reader-optimized guard to compressionEnabled and a matching onDidChangeScreenReaderOptimized subscription so both update paths recompute together, same as explorerView. Thanks!
|
pushed an update, besides the |
|
verified this in a dev build. with a nested one thing worth flagging for anyone reproducing: this is only visible with |
Fixes #301832. The Search view's results tree (
WorkbenchCompressibleAsyncDataTree) never setcompressionEnabled, so it always compacted single-child folders regardless ofexplorer.compactFolders. This reads the setting at construction and updates on change, mirroring how the Explorer view already does it — no new setting, just honoring the existing one in Search too.The Explorer also turns compression off when a screen reader is optimized, so this now does the same and updates live via
onDidChangeScreenReaderOptimized. Both conditions go through a singleisCompressionEnabled()helper rather than being repeated at each call site.