feat(core): Dock Improvements - Sorting, Categorizing, Overflow Menu & Context Menu #156
+518
−21
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
This PR implements all dock-related features from the TODO issue, significantly improving the dock UX with better organization, overflow handling, and contextual actions.
Features Implemented
1. 🔢 Dock Sorting
Dock entries are now sorted by
defaultOrderproperty (higher values appear first). This allows plugins to control where their dock entries appear relative to others.Changes:
.sort()tovalues()method2. 📁 Dock Categorizing
Dock entries are now visually grouped by category with subtle separators between groups. Categories appear in this order:
app→framework→web→default→advancedCategory definitions (already existed in types):
app- Application-specific toolsframework- Framework integrations (Vue, React, etc.)web- Web-related tools (network, storage, etc.)default- General purpose (when no category specified)advanced- Power user tools (terminals, settings, etc.)Changes:
~terminals,~logs,~settings) now havecategory: 'advanced'3. 📋 Dock Show More (Overflow Menu)
When dock entries exceed
maxVisible(default: 8), excess entries collapse into a "..." overflow menu with a badge showing the count.Features:
maxVisibleprop (set to 0 to disable)New component:
4. 🖱️ Context Menu for Dock Entries
Right-click on any dock entry to access contextual actions.
For iframe docks:
For all docks:
New component:
Features:
5. 🔗 Address Bar for Iframe Panels
Iframe dock panels can now show an optional address bar at the top.
Features:
DockEntryState.settings)Changes:
DockEntrySettingsinterfaceType Changes
Files Changed
packages/kit/src/client/docks.tsDockEntrySettingsinterfacepackages/core/src/client/webcomponents/state/docks.tssettingsin entry statepackages/core/src/node/host-docks.tspackages/core/src/client/webcomponents/components/DockEntries.vuepackages/core/src/client/webcomponents/components/DockEntry.vuepackages/core/src/client/webcomponents/components/ViewIframe.vuepackages/core/src/client/webcomponents/components/Dock.vuepackages/core/src/client/standalone/App.vuepackages/core/src/client/webcomponents/components/DockContextMenu.vuepackages/core/src/client/webcomponents/components/DockOverflowMenu.vueTesting
pnpm typecheckpassespnpm lintpassespnpm vitest run- all 93 tests passLinked Issues
Closes #9 (dock-related tasks)
Additional context