feat: import local mods by dropping files anywhere in the window - #373
Open
Slush97 wants to merge 1 commit into
Open
feat: import local mods by dropping files anywhere in the window#373Slush97 wants to merge 1 commit into
Slush97 wants to merge 1 commit into
Conversation
Dropping .vpk/.zip/.7z/.rar files on any page or surface now stages them in the existing batch import modal. A capture-phase window controller classifies drops by extension, hands paths to the modal through the store, and shows an app-wide drag indicator. The add-variants modal suppresses the global controller while mounted so its own drop zone keeps ownership; drops during an active batch are rejected with feedback instead of being silently lost. Specialized image/MP3/GLB zones keep every file type the controller does not claim. Claude-Session: https://claude.ai/code/session_01MjfS6sYi3NrviAzA4LWifk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.vpk/.zip/.7z/.rarfiles anywhere in the app now stages them in the existing batch import modal, with an app-wide drag indicator. Design doc:docs/global-mod-file-drop-plan.md.src/lib/useGlobalModFileDrop.ts) classifies drops by extension at drop time: supported mod files are claimed and handed to the modal through the store; everything else passes through so the image, MP3, and GLB zones keep their file types. Default file-navigation protection is preserved.classifyDroppedModFiles()incustomModImport.tsreplaces the modal's inline classification; both the controller and the modal use it (unresolved > rejected error priority kept, including the Windows archive-viewer virtual-file guidance).appStore:openBatchImport(paths?),consumeBatchImportPaths,setBatchImportBusy,closeBatchImport,setSuppressGlobalModDrop(replacessetBatchImportOpen). Pending paths are consumed with functional updates so rapid successive drops are never lost.ImportCustomModsModalregisterssuppressGlobalModDropwhile mounted, so its own VPK drop zone keeps ownership and the batch importer never opens on top of it. Drops during an active batch submission are rejected with a toast instead of being silently discarded.layout.modDrop.indicator,layout.modDrop.busy); locale manifest regenerated.Test plan
pnpm exec vitest run(1319 tests, includes new parser and store handoff suites)pnpm typecheck,pnpm lint,pnpm i18n:check, manifest check🤖 Generated with Claude Code
https://claude.ai/code/session_01MjfS6sYi3NrviAzA4LWifk