Layout: regression in view actions placement (fix #292481) (#295226)

This commit is contained in:
Benjamin Pasero
2026-02-13 19:47:30 +01:00
committed by GitHub
parent e595eedd0f
commit 0165d77665

View File

@@ -151,7 +151,7 @@ export class AuxiliaryBarPart extends AbstractPaneCompositePart {
private onDidChangeAutoHideViewContainers(e: { before: number; after: number }): void {
// Only update if auto-hide is enabled and composite bar would show
const autoHide = this.configurationService.getValue<boolean>(LayoutSettings.ACTIVITY_BAR_AUTO_HIDE);
if (autoHide && (this.configuration.position !== ActivityBarPosition.HIDDEN)) {
if (autoHide && (this.configuration.position === ActivityBarPosition.TOP || this.configuration.position === ActivityBarPosition.BOTTOM)) {
const visibleBefore = e.before > 1;
const visibleAfter = e.after > 1;
if (visibleBefore !== visibleAfter) {
@@ -266,14 +266,17 @@ export class AuxiliaryBarPart extends AbstractPaneCompositePart {
}
// Check if auto-hide is enabled and there's only one visible view container
const autoHide = this.configurationService.getValue<boolean>(LayoutSettings.ACTIVITY_BAR_AUTO_HIDE);
if (autoHide) {
// Use visible composite count from the composite bar if available (considers pinned state),
// otherwise fall back to the tracker's count (based on active view descriptors).
// Note: We access paneCompositeBar directly to avoid circular calls with getVisiblePaneCompositeIds()
const visibleCount = this.visibleViewContainersTracker.visibleCount;
if (visibleCount <= 1) {
return false;
// while the activity bar is configured to be top or bottom.
if (this.configuration.position === ActivityBarPosition.TOP || this.configuration.position === ActivityBarPosition.BOTTOM) {
const autoHide = this.configurationService.getValue<boolean>(LayoutSettings.ACTIVITY_BAR_AUTO_HIDE);
if (autoHide) {
// Use visible composite count from the composite bar if available (considers pinned state),
// otherwise fall back to the tracker's count (based on active view descriptors).
// Note: We access paneCompositeBar directly to avoid circular calls with getVisiblePaneCompositeIds()
const visibleCount = this.visibleViewContainersTracker.visibleCount;
if (visibleCount <= 1) {
return false;
}
}
}