LearnNewsExamplesServices
Frontmatter
id7201
titleDashboard Drag & Drop
stateOpen
labels
enhancementepicno auto close
assigneestobiu
createdAtAug 21, 2025, 12:03 AM
updatedAtNov 19, 2025, 3:01 PM
githubUrlhttps://github.com/neomjs/neo/issues/7201
authortobiu
commentsCount1
parentIssuenull
subIssues
7202 Phase 1: Foundational Sorting
7203 Phase 2: Live In-Page Proxy
7204 Phase 3: Dynamic Proxy Transitioning (Windowing)
7205 Phase 4: Framework-Level Dashboard Abstraction
7206 Initial Dashboard Drag & Drop
7207 Enhance container.SortZone for Complex Layouts
7208 main.addon.DragDrop: onDragMove() => pass the dragElement rect to the app worker
7209 draggable.dashboard.SortZone: moveTo() => regression bug
7210 Implement Window Management Permission Request
subIssuesCompleted5
subIssuesTotal9
blockedBy[]
blocking[]

Dashboard Drag & Drop

Openenhancementepicno auto close
tobiu
tobiu commented on Aug 21, 2025, 12:03 AM

Overview

This epic covers the implementation of drag-and-drop functionality for the main widgets within the Colors App dashboard (apps/colors/view/Viewport.mjs). The goal is to allow users to reorder the Grid, Pie Chart, and Bar Chart components. The implementation should be inspired by the fluid, main-thread driven drag-and-drop logic used for TabContainer headers.

This epic serves as the foundational R&D for the multi-window dashboard capabilities of the upcoming Neo Studio.

Key Requirements

  • Users can reorder the three main dashboard widgets.
  • The HeaderToolbar at the top of the viewport will be excluded from reordering.
  • The drag operation should be initiated by clicking and dragging the header of each widget.
  • The drag-and-drop experience should be visually fluent, with the drag proxy moving pixel-by-pixel.

Design Rationale & Strategy

This section outlines the key architectural decisions and strategic insights that inform the implementation phases.

  • Architectural Approach (Phase 1): The plan is to refactor the existing toolbar.SortZone into a more generic container.SortZone. While simply reusing the toolbar-specific class might be a faster shortcut, the refactoring approach was chosen as the correct long-term solution. It establishes a clean, reusable abstraction for sorting items in any flexbox-based container, improving maintainability and avoiding technical debt.

  • Live Proxy (Phase 2): The core goal is to create a high-fidelity user experience, where the dragged component is not a static image but remains a fully "live" instance. This leverages the Neo.mjs VDOM engine's ability to reparent live components, which is a key technical differentiator and provides the foundation for the advanced effects in Phase 3.

  • Dynamic Windowing (Phase 3): The implementation of this ambitious phase is significantly de-risked and accelerated by adapting existing, proven logic. The apps/colors/view/ViewportController already contains robust functionality for detaching a live widget into a separate popup window. Phase 3 will adapt this logic to trigger dynamically mid-drag. Furthermore, Neo.util.Rectangle.getIntersection() has been identified as the ideal utility for the boundary-check calculations.

tobiu assigned to @tobiu on Aug 21, 2025, 12:03 AM
tobiu added the enhancement label on Aug 21, 2025, 12:03 AM
tobiu added the epic label on Aug 21, 2025, 12:03 AM
tobiu added sub-issue #7202 on Aug 21, 2025, 12:04 AM
tobiu added sub-issue #7203 on Aug 21, 2025, 12:05 AM
tobiu added sub-issue #7204 on Aug 21, 2025, 12:06 AM
tobiu added sub-issue #7205 on Aug 21, 2025, 12:06 AM
tobiu referenced in commit 01020b6 - "Dashboard Drag & Drop #7201: epic md file" on Aug 21, 2025, 12:07 AM
tobiu added sub-issue #7206 on Aug 21, 2025, 12:34 AM
tobiu added sub-issue #7207 on Aug 21, 2025, 11:12 AM
tobiu added sub-issue #7208 on Aug 21, 2025, 8:46 PM
tobiu referenced in commit 57a5d97 - "#7201 switched drag-handles back to cursor pointer (important for e.g. tab header buttons)" on Aug 21, 2025, 8:58 PM
tobiu added sub-issue #7209 on Aug 21, 2025, 9:22 PM
tobiu added sub-issue #7210 on Aug 21, 2025, 9:50 PM
tobiu removed the stale label on Nov 19, 2025, 3:01 PM
tobiu added the no auto close label on Nov 19, 2025, 3:01 PM