LearnNewsExamplesServices
Frontmatter
id8160
titleDecouple and Configure Window Detachment Thresholds in SortZone
stateClosed
labels
enhancementai
assigneestobiu
createdAtDec 27, 2025, 10:00 PM
updatedAtMar 30, 2026, 1:32 PM
githubUrlhttps://github.com/neomjs/neo/issues/8160
authortobiu
commentsCount2
parentIssue8163
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 30, 2026, 1:32 PM

Decouple and Configure Window Detachment Thresholds in SortZone

Closedenhancementai
tobiu
tobiu commented on Dec 27, 2025, 10:00 PM

Currently, Neo.draggable.container.SortZone uses the same intersection logic (or similar 50% ratios) for both in-app item sorting (swapping items) and window detachment/re-integration. This limits UX tuning, as users often expect a "tear-off" into a new window to happen sooner (e.g., at 20% overlap) than an item swap.

Goal:

  1. Decouple the window detachment/re-integration thresholds from the standard sorting thresholds.
  2. Introduce specific configs (e.g., detachThreshold: 0.2, reattachThreshold: 0.8).
  3. Ensure onDragMove logic uses the correct threshold for the correct action (sorting vs. window boundary checks).
tobiu added the enhancement label on Dec 27, 2025, 10:00 PM
tobiu added the ai label on Dec 27, 2025, 10:00 PM
tobiu added parent issue #8163 on Dec 27, 2025, 10:33 PM
tobiu assigned to @tobiu on Dec 28, 2025, 1:07 AM
tobiu referenced in commit 9a7d24f - "Decouple and Configure Window Detachment Thresholds in SortZone #8160 wip" on Dec 28, 2025, 3:14 AM
tobiu referenced in commit 628fb8d - "#8160 wip" on Dec 28, 2025, 2:10 PM
tobiu
tobiu Dec 28, 2025, 2:11 PM

Input from Gemini:

✦ ### Session Refactoring Summary (Issue #8160)

In this session, we focused on decoupling window detachment thresholds and consolidating the intersection logic.

Key Changes:

  1. SortZone.mjs Refactoring:
    • Extracted the core intersection and threshold logic into a dedicated checkWindowBoundary(data) method.
    • Introduced an onWindowDragContinue(intersectionRatio, data) hook, allowing subclasses to react to drag moves that stay within the detached/attached state boundaries.
    • Consolidated the logic for detachThreshold and reattachThreshold to ensure consistent behavior across all sorting zones.
  2. DashboardSortZone.mjs Alignment:
    • Removed duplicated boundary check logic in onDragMove, now delegating to super.onDragMove().
    • Implemented onWindowDragContinue to handle the hand-off to DragCoordinator for remote drag updates when the item is detached.
  3. State Sanitation:
    • Removed the experimental isReintegrating flag and logic, reverting to a cleaner state machine.
  4. Method Ordering:
    • Methods have been re-sorted chronologically per project guidelines.

Outcome: The threshold logic is now centralized and correctly handles directionality (inwards vs. outwards) using lastIntersectionRatio. The system is prepared for further investigation into the re-detach behavior after full re-integration.

@github-actions - 2026-03-29T04:13:48Z

This issue is stale because it has been open for 90 days with no activity.

  • 2026-03-29T04:13:49Z @github-actions added the stale label
tobiu removed the stale label on Mar 30, 2026, 1:32 PM
tobiu closed this issue on Mar 30, 2026, 1:32 PM