Skip to content

feat(sidebar): hide pinned section when empty - #249

Closed
zorahrel wants to merge 1 commit into
the-ora:mainfrom
zorahrel:feat/hide-empty-pinned-section
Closed

zorahrel wants to merge 1 commit into
the-ora:mainfrom
zorahrel:feat/hide-empty-pinned-section

Conversation

@zorahrel

Copy link
Copy Markdown
Contributor

Closes #158

Problem

The Pinned header and its dashed drop placeholder are rendered unconditionally, so anyone who never pins a tab sees a permanent empty block in the sidebar, plus a Divider() separating it from the tab list. Issue #158 asks for exactly this.

Change

PinnedTabsList builds its header and placeholder only when there are pinned tabs or a drag is in progress, so the drop target still appears precisely when it is actionable. ContainerView skips the whole section under the same condition, and the divider follows it.

With the empty block gone the surrounding spacing was too loose, so sidebar spacing goes 16 -> 8 and the pinned list 8 -> 4.

Testing

Built Release on macOS 26.2. Verified: with zero pinned tabs the section is gone and favorites sit directly above the tab list; dragging a tab makes the placeholder appear and it accepts the drop; with pinned tabs present header, list and divider render as before.

Closes #158

The 'Pinned' header and its drop placeholder are always rendered, so
users who never pin a tab still see a permanent empty block plus a
divider between favorites and the tab list.

The section is now built only when there are pinned tabs or a drag is
in progress, so the drop target still appears exactly when it is
actionable. The divider follows the same rule.

Also tightens the sidebar spacing (16 -> 8) and the pinned list
spacing (8 -> 4) now that the empty block no longer separates them.
@greptile-apps

greptile-apps Bot commented Sep 15, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with the empty-state and drag-state rendering behavior remaining coherent.

Summary

This PR hides the empty pinned-tabs section while preserving it as a drop target during tab dragging.

  • Conditionally renders the pinned section when pinned tabs exist or a drag is active.
  • Hides the divider when there are no pinned tabs.
  • Tightens sidebar and pinned-list spacing.

Reviews (1) · Last reviewed commit: "feat(sidebar): hide pinned section when ..."

@zorahrel zorahrel closed this Sep 22, 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.

Option to hide favorites and pinned tabs placeholders

1 participant