Frontmatter
| id | 8092 |
| title | [Refactor] Rename container.sortable to container.dragResortable |
| state | Closed |
| labels | enhancementdeveloper-experienceairefactoring |
| assignees | tobiu |
| createdAt | Dec 11, 2025, 8:24 PM |
| updatedAt | Dec 11, 2025, 9:11 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8092 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 11, 2025, 8:59 PM |
[Refactor] Rename container.sortable to container.dragResortable
tobiu assigned to @tobiu on Dec 11, 2025, 8:25 PM
tobiu closed this issue on Dec 11, 2025, 8:59 PM

tobiu
Dec 11, 2025, 9:11 PM
✦ I would rate the impact of this session as High.
Impact Analysis:
Architectural Clarity (High):
- Disambiguation: The most critical win is separating sortable (data sorting) from dragResortable (item reordering). This resolves a confusing naming collision that was causing friction in complex components like Grids and Tables. It makes the API self-documenting.
- Standardization: Moving the SortZone creation logic to container.Base and establishing a clear override pattern (loadSortZoneModule, createSortZone) enforces a consistent architecture across the framework.
Developer Experience (High):
- Less Boilerplate: By leveraging inheritance in grid and table header toolbars, we deleted redundant imperative code. Future container extensions will be easier to write.
- Predictability: Developers now know exactly which config controls what behavior. dragResortable is explicit.
Maintainability (Medium-High):
- Centralized Logic: Fixing or enhancing the drag-and-drop initialization logic now happens in one place (container.Base), rather than being scattered across multiple afterSet... methods.
- CSS Consolidation: Merging the toolbar animation CSS into container/SortZone.scss simplifies the theme structure.
Risk (Medium - Breaking Change):
- This is a breaking change. Any existing application using sortable: true on a TabContainer, Dashboard, or generic Container for drag-and-drop will break until updated.
- However, the migration path is trivial (search & replace), and the long-term benefit of avoiding the sortable conflict outweighs the short-term pain.
Summary: This was a necessary maturation step for the framework. As you added more complex components (Grid, Table), the overloaded sortable term became a technical debt liability. Paying it down now prevents future bugs and makes the learning curve smoother for new adopters. The code is cleaner, DRY-er, and more semantic.
Rename
sortabletodragResortableinsrc/container/Base.mjsand related files to disambiguate from grid data sorting. Scope:sortable_todragResortable_andafterSetSortabletoafterSetDragResortableinsrc/container/Base.mjs.src/dashboard/Container.mjsandsrc/tab/Container.mjs.sortable_todragResortable_insrc/tree/List.mjs.draggable_todragResortable_insrc/grid/header/Toolbar.mjsandsrc/table/header/Toolbar.mjs.sortablein these files (it controls data sorting).src/draggable/container/SortZone.mjsto checkowner.dragResortable.sortable: truewithdragResortable: truein container configurations.