Skip to content

feat(hub): allow per-group and hub-wide dock category order overrides#133

Merged
antfu merged 1 commit into
mainfrom
feat/group-dock-category-order
Jul 23, 2026
Merged

feat(hub): allow per-group and hub-wide dock category order overrides#133
antfu merged 1 commit into
mainfrom
feat/group-dock-category-order

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

Summary

Adds two data fields that let a category's default sort order be overridden in scope, without touching the hub-wide DEFAULT_CATEGORIES_ORDER table or affecting anything outside the override's scope:

  • DevframeViewGroup.categoryOrder — a group entry can override the sort order of its members' IN-GROUP sub-categories. Scoped to that one group only; every other group and the outer dock-bar ordering are untouched.
  • DevframeClientHostOptions.categoryOrder — the hub (the host app calling createDevframeClientHost()) can override the OUTER, top-level dock-bar category ordering across every ungrouped entry and every group button.

Both mirror the shape and merge-over-defaults contract of DEFAULT_CATEGORIES_ORDER (Record<categoryId, weight>, lower sorts earlier, keys merge over the defaults so only the categories being moved need listing).

This PR defines the data fields and their contracts; wiring the actual merge into the sort call sites is left for a follow-up.

Changes

  • packages/hub/src/types/docks.ts — new categoryOrder?: Record<string, number> on DevframeViewGroup.
  • packages/hub/src/client/host.ts — new categoryOrder?: Record<string, number> on DevframeClientHostOptions.
  • Updated the @devframes/hub/client tsnapi snapshot for the new public field.

This PR was created with the help of an agent.

- DevframeViewGroup.categoryOrder overrides the default category order
  for its members' in-group sub-categories, scoped to that group only.
- DevframeClientHostOptions.categoryOrder overrides the top-level
  dock-bar category order hub-wide.

Both mirror DEFAULT_CATEGORIES_ORDER's shape and merge-over-defaults
semantics.
@netlify

netlify Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit bf2a697
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a61de60d068170008ad56e0
😎 Deploy Preview https://deploy-preview-133--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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