feat: Dashboard enterprise-grade organization with drag-and-drop#1972
feat: Dashboard enterprise-grade organization with drag-and-drop#1972alex-fedotyev wants to merge 7 commits intomainfrom
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Knip - Unused Code Analysis⚪ 0 change in total issues (240 on main → 240 on PR)
What is this?Knip finds unused files, dependencies, and exports in your codebase. Run |
PR Review
|
E2E Test Results✅ All tests passed • 91 passed • 3 skipped • 963s
Tests ran across 4 shards in parallel. |
9d1a5c2 to
0d2b11f
Compare
a7afc78 to
fd8799e
Compare
fd8799e to
20a628e
Compare
d65d046 to
0fb0522
Compare
0fb0522 to
e38c98b
Compare
e38c98b to
74ee92a
Compare
74ee92a to
4aee30f
Compare
4aee30f to
ae5981a
Compare
ae5981a to
82579ce
Compare
82579ce to
8d7be4f
Compare
8d7be4f to
de53c17
Compare
de53c17 to
39414b1
Compare
Add 'group' type alongside 'section'. Groups optionally support tabs
via inline tabs:[{id,title}] array — 2+ tabs renders a tab bar, 0-1
is a plain group. Tiles get optional tabId for tab assignment.
activeTabId persisted to server (Grafana/Kibana shared state pattern).
DashboardDndContext (116 lines): provider for sortable container reorder. DashboardDndComponents (98 lines): EmptyContainerPlaceholder with centered [+ Add] button, SortableSectionWrapper. DragHandleProps typed.
GroupContainer (347 lines): bordered container with smart tab support. Plain group: header with + menu (Add Tile / Add Tab). Tabbed group (2+ tabs): tab bar with hover-only x, inline +, rename. First 'Add Tab' auto-creates two tabs. Removing to 1 disables tabs. Render-prop children(activeTabId). Theme-aware borders.
Grip icon on hover. DragHandleProps. Theme-aware borders.
useDashboardContainers (275 lines): section/group CRUD, tab management. Add Tab auto-creates two tabs, delete to 1 disables tabs. Always-confirm delete (even empty containers). Shared makeId from tilePositioning. useTileSelection (74 lines): Shift+click + Cmd+G grouping.
Floating drag bar: absolute positioned, no content shift on hover. Group rendering: plain or tabbed based on tabs array length. Move to Section: shows group tab entries as 'Group > Tab Name'. Tile auto-repositions at bottom of target grid on move. Add menu: Section / Group only (no separate Tab Container). Delete confirmation always shown. Empty placeholders with [+ Add] button. Select-and-group: Shift+click tiles then Cmd+G.
39414b1 to
6ea1263
Compare
6ea1263 to
1929e28
Compare
1929e28 to
aeaca9e
Compare
49 tests: schema validation (section/group only, rejects tab type), group with optional tabs, tab tile filtering, tabId cleanup, cross- container moves, section reorder, tile grouping.
aeaca9e to
2682bfe
Compare
Summary
Implements the remaining features from #1929: drag-and-drop tile organization, section reordering, tab and group container types, and UX polish.
Builds on #1926 (authoring UX + DashboardContainer abstraction).
Changes by commit
feat: Extend DashboardContainer schema for tab and group types'tab'and'group'to the container type enumactiveTabIdfor tab state,parentIdfor child tab containersfeat: Add @dnd-kit drag-and-drop infrastructure for dashboards@dnd-kit/core,@dnd-kit/sortable,@dnd-kit/utilitiesDashboardDndContext.tsx: provider, drag handles, drop zones, sortable wrapperspointerWithincollision detection for correct cross-section targetingfeat: Add GroupContainer and TabContainer componentsGroupContainer: bordered, always-visible, drag handle, inline renameTabContainer: multi-tab bar with add (+), rename (double-click), remove (x), tab switchingfeat: Add drag handle to SectionHeader, fix theme-aware bordersvar(--mantine-color-default-border)for light/dark themesfeat: Integrate DnD, container types, and polish into dashboard pagetest: Add tests for container types, reordering, and grouping— 14 new testsfeat: Implement multi-tab container supportparentIdon containers links child tabs to parent tab setVerified via Playwright MCP on Vercel preview
Test plan
Closes #1929