Skip to content

feat: docked groups#377

Merged
antfu merged 9 commits into
vitejs:mainfrom
antfubot:feat/docked-groups
Jun 11, 2026
Merged

feat: docked groups#377
antfu merged 9 commits into
vitejs:mainfrom
antfubot:feat/docked-groups

Conversation

@antfubot

Copy link
Copy Markdown
Contributor

Description

Introduces docked groups — a way to collapse several dock entries under a single dock-bar button — and uses them to reshape how Vite Plus integrations are presented.

This builds on the dock-group data layer landed upstream in devframe/@devframes/hub 0.5.4 (groupId on dock entries + the type: 'group' entry with defaultChildId), which this PR upgrades to. A group is a flat pointer, not containment: members stay independently registered and are orphan-tolerant — a groupId pointing at an unregistered group renders as a normal top-level entry.

What you get

  • One button, many tools. A group renders as a single dock-bar button. Activating it opens a popover of its members, or — when defaultChildId is set — jumps straight to that member. The open member's view gains a sidebar listing its siblings for sub-navigation. Empty groups hide themselves.
  • Wired across the float, edge, and standalone docks, plus the command palette (members nest under their group).
  • Vite+ is now a group, not a hard-coded category. Vite DevTools seeds a built-in "Vite+" group; integrations (Rolldown, …) join it via groupId: DEVTOOLS_VITEPLUS_GROUP_ID instead of the removed ~viteplus category.
  • Group-aware settings. The docks settings page renders a group as a section with its members nested beneath it; each member can be hidden, reordered, and pinned independently, and the whole group can be hidden via its own row.

This unlocks the motivating use case: a framework like Nuxt can split its features into individually-pluggable Vite DevTools entries, all collected under one Nuxt button — see the new playground example.

Linked Issues

Additional context

  • New public API: DevToolsViewGroup type and DEVTOOLS_VITEPLUS_GROUP_ID constant (kit), reflected in the API snapshots.
  • Pure grouping helpers (getRegisteredGroupIds / getGroupMembers / getEntryGroup + the collapseGroups option) carry the logic and are unit-tested; reviewers may want to focus on the persisted-iframe layout changes in DockPanel/DockEdge/DockStandalone (a relative flex-1 view wrapper keeps iframe positioning intact beside the new sidebar).
  • pnpm lint, pnpm test, pnpm typecheck, and pnpm build all pass.

This PR was created with the help of an agent.

antfubot added 3 commits June 11, 2026 06:07
Upgrade devframe/@devframes/hub to 0.5.4 to pick up the dock-group data
layer (`groupId` on entries + the `type: 'group'` entry with
`defaultChildId`), then build the client experience on top of it.

A group renders as a single dock-bar button. Activating it opens a
popover of its members, or — when `defaultChildId` is set — jumps
straight to that member. The open member's view gains a sidebar listing
its siblings for sub-navigation. Membership is a flat pointer: members
stay independently registered and orphan-tolerant (a `groupId` pointing
at an unregistered group renders as a normal top-level entry).

Wired across the float, edge, and standalone docks, plus the command
palette (members nest under their group). Adds a "Nuxt" group example to
the playground and unit tests for the grouping helpers.
`~viteplus` was a hard-coded dock category that visually banded Vite Plus
integrations together. Now that docked groups exist, model it as a real
group: Vite DevTools seeds a built-in "Vite+" group, and integrations join
it via `groupId: DEVTOOLS_VITEPLUS_GROUP_ID` rather than the category.

Drops `~viteplus` from the category union and order maps, points the
Rolldown UI at the new group, and lets the empty-group rule hide the Vite+
button until an integration registers under it.
Extend the docks settings page to manage grouped entries: a group renders
as a section whose members are nested beneath it. Each member can be
hidden, reordered (arrows or drag), and pinned independently, and the
whole group can be hidden via its own row. Reordering is generalized over
containers so categories and groups share the same drag/move machinery.

Adds an explicit `defaultOrder` to the playground Nuxt group members and
covers the hide/order helper semantics with tests.
@pkg-pr-new

pkg-pr-new Bot commented Jun 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vitejs/devtools@377
npm i https://pkg.pr.new/@vitejs/devtools-kit@377
npm i https://pkg.pr.new/@vitejs/devtools-rolldown@377
npm i https://pkg.pr.new/@vitejs/devtools-self-inspect@377

commit: 3b563d4

antfu and others added 6 commits June 11, 2026 15:50
Slim the in-view group sidebar down to a narrow vertical rail of icons
with hover tooltips for titles, instead of a wide labelled list. Keeps the
active highlight and member badges; frees up horizontal space for the view.
Add a "Docked groups" section covering the `group` entry type, `groupId`
membership, `defaultChildId`, orphan tolerance, the built-in Vite+ group,
and the group-aware settings controls. Update the entry-type table, the
`DockEntry` interface, and the common-options reference.
# Conflicts:
#	packages/core/src/client/webcomponents/.generated/css.ts
…lures

The devframe/@devframes/hub 0.5.4 upgrade lands the upstream vitejs#339 fix, so
the static-build SPA now renders without the `createHash` or `messages:list`
dump errors. The `it.fails` guards consequently pass and CI flags them as
"expected to fail"; drop `.fails` so they assert the fixed behavior.
@antfu antfu merged commit dacf89f into vitejs:main Jun 11, 2026
7 checks passed
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