Skip to content

feat(core): allow a group entry to override its in-group sub-category order#468

Merged
antfu merged 2 commits into
mainfrom
silver-bugs-post
Jul 24, 2026
Merged

feat(core): allow a group entry to override its in-group sub-category order#468
antfu merged 2 commits into
mainfrom
silver-bugs-post

Conversation

@antfubot

@antfubot antfubot commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Description

A group's members sort their in-group sub-categories (the dual role of a grouped member's own category) using the same shared DEFAULT_CATEGORIES_ORDER table the outer dock bar uses. This adds a per-group override so a single group can reshuffle its own sub-category order without touching the shared table or any other group.

  • DevframeViewGroup.categoryOrder?: Record<string, number> — sort-weight overrides for a group's in-group sub-categories, keyed by sub-category id. Lower sorts earlier, mirroring DEFAULT_CATEGORIES_ORDER's contract. Omitted sub-categories keep their weight from the shared table.
  • getGroupMembersGrouped() resolves the owning group entry and threads its categoryOrder into docksGroupByCategories() as a new (per-call) categoryOrderOverride option, scoped to that one split — the outer bar and every other group are unaffected.
  • @devframes/hub and devframe upgraded to 0.7.12 (devframes/devframe#133), which ships DevframeViewGroup.categoryOrder for real, so the local declaration-merging shim used during development was removed. The other @devframes/* catalog deps stay on 0.7.11 (unaffected, peer against devframe is satisfied by 0.7.12).
  • Docs (docs/kit/dock-system.md, the kit skill reference) and unit tests (dock-groups.test.ts) updated accordingly.

Linked Issues

Additional context

None.


This PR was created with the help of an agent.

… order

A group's members currently sort their in-group sub-categories using the
same shared DEFAULT_CATEGORIES_ORDER table as the outer dock bar. Add
DevframeViewGroup.categoryOrder — a per-group Record<category, weight>
override that reweights only that group's own sub-category split, leaving
every other group and the outer bar on the shared table.

The field is defined upstream in devframes/devframe#133 but not yet in a
published @devframes/hub release, so it's shimmed locally via declaration
merging on DevframeViewGroup until the dependency bumps past that release.
@pkg-pr-new

pkg-pr-new Bot commented Jul 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/@vitejs/devtools@468

@vitejs/devtools-kit

npm i https://pkg.pr.new/@vitejs/devtools-kit@468

@vitejs/devtools-oxc

npm i https://pkg.pr.new/@vitejs/devtools-oxc@468

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/@vitejs/devtools-rolldown@468

@vitejs/devtools-vite

npm i https://pkg.pr.new/@vitejs/devtools-vite@468

@vitejs/devtools-vitest

npm i https://pkg.pr.new/@vitejs/devtools-vitest@468

commit: 21078f4

…er shim

DevframeViewGroup.categoryOrder ships for real in @devframes/hub 0.7.12
(devframes/devframe#133), so the local declaration-merging shim from the
previous commit is no longer needed.
@antfu
antfu merged commit 69bed0b into main Jul 24, 2026
10 checks passed
@antfu
antfu deleted the silver-bugs-post branch July 24, 2026 04:13
antfubot added a commit to antfubot/devtools-1 that referenced this pull request Jul 24, 2026
… embedded settings

- Upgrade @vitejs/devtools + @vitejs/devtools-kit to ^0.4.6 and @devframes/hub
  + devframe to ^0.7.12.
- Set `categoryOrder` on the Nuxt dock group (vitejs/devtools#468) so the
  in-group sub-categories sort in Nuxt's own order (app, vue-devtools, analyze,
  server, modules, documentation, advanced) instead of the shared default table.
  Default uncategorised tabs to `app` in the frame-nav manifest to match.
- Hide settings that are redundant when embedded (owned by the Vite DevTools
  dock): the tab visibility/order panel, the color-mode toggle, the SideNav
  options, and the close-on-outside-click toggle.
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