Skip to content

fix: sidebar gap when switching between table and query tabs (#759)#761

Closed
datlechin wants to merge 1 commit intomainfrom
fix/sidebar-gap-stable-toolbar-759
Closed

fix: sidebar gap when switching between table and query tabs (#759)#761
datlechin wants to merge 1 commit intomainfrom
fix/sidebar-gap-stable-toolbar-759

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

The "Toggle Results" toolbar button was conditionally added/removed based on tab type. NavigationSplitView's NSSplitViewController recalculates the sidebar's top safe-area inset whenever toolbar items change on the detail column, producing a visible gap shift.

Always include the button but hide it on table tabs with opacity(0) + allowsHitTesting(false). Toolbar layout stays stable across tab switches.

1 file, 16 additions, 12 deletions.

Test plan

  • Switch between table tab and query tab — no gap shift in sidebar
  • "Toggle Results" button visible and functional on query tabs
  • "Toggle Results" button invisible and non-interactive on table tabs
  • Multiple window tabs — gap consistent across all

Closes #759

The "Toggle Results" ToolbarItem was conditionally added/removed based
on isTableTab. NavigationSplitView's NSSplitViewController recalculates
the sidebar's top safe-area inset when toolbar items change on the
detail column, producing a visible gap shift.

Fix: always include the ToolbarItem but hide it on table tabs with
opacity(0) + allowsHitTesting(false). This keeps the toolbar layout
stable across tab switches, preventing the sidebar inset recalculation.

Closes #759
@datlechin datlechin force-pushed the fix/sidebar-gap-stable-toolbar-759 branch from 912f843 to 000222d Compare April 15, 2026 08:14
@datlechin
Copy link
Copy Markdown
Collaborator Author

Closing — the opacity/allowsHitTesting approach causes an NSView layout loop crash when closing tabs. The sidebar gap (#759) needs a different fix approach (likely fixing the sidebar's safeAreaInset to not depend on toolbar item count).

@datlechin datlechin closed this Apr 15, 2026
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.

inconsistent sidebar gap

1 participant