Skip to content

fix(library): allow folder drops when non-priority sort is active#207

Open
helseaCat wants to merge 1 commit into
LeagueToolkit:mainfrom
helseaCat:fix/dnd-folder-drop-with-sort
Open

fix(library): allow folder drops when non-priority sort is active#207
helseaCat wants to merge 1 commit into
LeagueToolkit:mainfrom
helseaCat:fix/dnd-folder-drop-with-sort

Conversation

@helseaCat
Copy link
Copy Markdown

Fixes #181

Problem

Selecting any sort other than "Priority" disabled all drag-and-drop, including dragging mods into folders. The single dndDisabled flag gated both reordering and folder drops.

Steps to reproduce

  1. Create a folder in the library
  2. Have a mod outside the folder
  3. Switch sort to "Enabled First" (or any non-priority sort)
  4. Try to drag the mod into the folder — blocked on v1.8.1

Fix

Split dndDisabled into dndDisabled (search/patcher/filters) and reorderDisabled (non-priority sort). DnD stays active for folder drops; only reordering is suppressed.

Also rewrote collision detection to use pointerWithin for folder targets in all sort modes — folders only highlight when the pointer is directly over them, fixing a pre-existing issue where nearby folders would falsely activate.

Verification

  • pnpm check passes (typecheck + lint + format + 268 tests)
  • Non-priority sort: folder drops work, reorder blocked, no false animations
  • Priority sort: full DnD works, folders require direct hover
  • Folder grip handles hidden in non-priority sorts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Moving Mods into Folders with Sort By on Enabled First

1 participant