feat(core): Dock Improvements - Sorting, Categorizing, Overflow Menu & Context Menu#156
feat(core): Dock Improvements - Sorting, Categorizing, Overflow Menu & Context Menu#156adriandarian wants to merge 2 commits intovitejs:mainfrom
Conversation
…context menu - Add dock sorting by `defaultOrder` property (higher values appear first) - Add dock categorizing with visual separators between category groups - Add overflow "Show More" menu when entries exceed maxVisible (default: 8) - Add right-click context menu for dock entries with: - Refresh iframe - Open in new tab - Copy URL - Toggle address bar visibility - Hide from dock (placeholder) - Add address bar UI for iframe panels with refresh/open buttons - Add `DockEntrySettings` interface for per-entry user preferences - Assign categories and defaultOrder to builtin dock entries
|
Appreciate the PR - but as you packed too many features into one PR I can't merge it as is - I will reimplement them piece by piece, but thems for your PR as the fundation |
would you like me to break it down into smaller PRs then you can just review since I did the work already? if so what do you consider too big of a PR so I can keep it under the threshold? Also are specifics or changes you would make to the current PR to carry forward into the smaller PRs? |
|
Apparently, your agents already listed 5 bullet points that are implemented, which to me should all be separated into 5 different PRs. There are so many tiny details I have opinions on, where it would be very hard to move all of them together in this PR. I already reimplemented some of them on the main branch by hand, where you can refer to . |
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