feat(core): allow a group entry to override its in-group sub-category order#468
Open
antfubot wants to merge 1 commit into
Open
feat(core): allow a group entry to override its in-group sub-category order#468antfubot wants to merge 1 commit into
antfubot wants to merge 1 commit into
Conversation
… 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.
@vitejs/devtools
@vitejs/devtools-kit
@vitejs/devtools-oxc
@vitejs/devtools-rolldown
@vitejs/devtools-vite
@vitejs/devtools-vitest
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A group's members sort their in-group sub-categories (the dual role of a grouped member's own
category) using the same sharedDEFAULT_CATEGORIES_ORDERtable 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, mirroringDEFAULT_CATEGORIES_ORDER's contract. Omitted sub-categories keep their weight from the shared table.getGroupMembersGrouped()resolves the owning group entry and threads itscategoryOrderintodocksGroupByCategories()as a new (per-call)categoryOrderOverrideoption, scoped to that one split — the outer bar and every other group are unaffected.@devframes/hubrelease (pinned dep is^0.7.11), so it's shimmed locally via declaration merging onDevframeViewGroupinpackages/kit/src/types/docks.ts, with a note to delete the shim once the dependency bumps past the release that ships it for real.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.