Skip to content

feat(hub-ui): raise the recent dock out of the float bar's overflow - #305

Merged
antfu merged 1 commit into
mainfrom
honest-oranges-travel
Aug 27, 2026
Merged

feat(hub-ui): raise the recent dock out of the float bar's overflow#305
antfu merged 1 commit into
mainfrom
honest-oranges-travel

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

What

In float mode, a dock selected from beyond the bar — the overflow popover or a dock group — is now raised into a dedicated recent dock slot between the bar's visible items and the overflow button. Deselecting it (or selecting a visible neighbour) keeps it there, one click away, instead of folding it straight back out of reach.

With a 3-slot bar over entries A–E:

  • [A] [B] [C] | [Overflow] — select D from the popover → [A] [B] | {D} [Overflow]
  • Unselect D, or select A/B → D stays: [A] {B} | [D] [Overflow]
  • Select E from the popover → E replaces D: [A] [B] | {E} [Overflow]
  • Select C (inside the natural slice) → back to [A] [B] {C} | [Overflow]

The recent slot consumes one of maxVisibleItems, the raised entry is lifted out of the overflow popover (badge follows), and a grouped member is always raised on selection — its own entry never has a rail slot of its own. The id persists per-tab as recentDockId on the existing devframes-dock-session sessionStorage store, so it survives reloads.

How

  • @devframes/hub: DockSessionStorage gains an optional recentDockId.
  • @devframes/hub-ui dock-settings.ts: docksSplitGroupsWithCapacity accepts a resolved recent entry and reserves its slot (skipped when there's no overflow, or when the recent entry sits inside the natural visible slice — it renders in place there, releasing the slot); new pure helpers resolveRecentDockEntry (persisted id → raisable entry, dropping unregistered/hidden ones) and resolveNextRecentDockId (the selection rule).
  • Dock.vue renders the recent slot and updates recentDockId by watching the selection, so palette / RPC / restore selections behave the same as rail clicks.
  • Unit tests cover the full A–E walkthrough, the group-member and lone-overflow-fold cases, and the resolver; a WithRecentDock story shows the slot live (behavior also verified interactively in Storybook).

Created with the help of an agent.

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
devframe Ready Ready Preview Aug 27, 2026 6:24am

@antfu
antfu merged commit 63bd57d into main Aug 27, 2026
10 of 11 checks passed
@antfu
antfu deleted the honest-oranges-travel branch August 27, 2026 06:38
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