LearnNewsExamplesServices
Frontmatter
id8087
title[Refactor] Unify SortZone logic in Container.Base and remove Toolbar specific implementations
stateClosed
labels
epicairefactoring
assigneestobiu
createdAtDec 11, 2025, 4:58 AM
updatedAtDec 11, 2025, 5:05 AM
githubUrlhttps://github.com/neomjs/neo/issues/8087
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 11, 2025, 5:05 AM

[Refactor] Unify SortZone logic in Container.Base and remove Toolbar specific implementations

Closed v11.17.0 epicairefactoring
tobiu
tobiu commented on Dec 11, 2025, 4:58 AM

This epic refactoring unifies the draggable sorting logic by promoting it from Neo.toolbar.Base to Neo.container.Base.

Key Changes:

  1. Neo.container.Base:
    • Added sortable_ (reactive), sortZone, and sortZoneConfig.
    • Implemented loadSortZoneModule() for lazy loading.
    • Implemented createSortZone(config) to handle instantiation and allow subclasses to inject instance-specific configs.
    • Implemented afterSetSortable to orchestrate lazy loading and creation, using Neo.merge for config flexibility.
  2. Neo.toolbar.Base:
    • Removed redundant sortable logic (now inherited).
  3. Neo.dashboard.Container:
    • Removed duplicated logic.
    • Overrode loadSortZoneModule to use dashboard/SortZone.
    • Overrode createSortZone to inject instance-specific configs (dragProxyConfig, dragProxyExtraCls) and listener implementations.
  4. SortZones:
    • Deleted src/draggable/toolbar/SortZone.mjs and DragZone.mjs.
    • Subclasses (Grid, Table, Tab) updated to extend Neo.draggable.container.SortZone (via BaseSortZone alias).
  5. Subclasses:
    • Updated Neo.grid.Container, Neo.table.Container, Neo.tab.Container to use sortable (non-reactive) for overrides to avoid conflicts.

Goal: Reduce code duplication, improve maintainability, and provide a consistent sorting capability for all Containers.

tobiu added the epic label on Dec 11, 2025, 4:58 AM
tobiu added the ai label on Dec 11, 2025, 4:58 AM
tobiu added the refactoring label on Dec 11, 2025, 4:58 AM
tobiu assigned to @tobiu on Dec 11, 2025, 4:59 AM
tobiu referenced in commit 60fd9b0 - "[Refactor] Unify SortZone logic in Container.Base and remove Toolbar specific implementations #8087" on Dec 11, 2025, 4:59 AM
tobiu closed this issue on Dec 11, 2025, 5:05 AM