Add drag-and-drop file upload support for projects and snippets#329
Merged
tracygardner merged 3 commits intomainfrom Feb 27, 2026
Merged
Add drag-and-drop file upload support for projects and snippets#329tracygardner merged 3 commits intomainfrom
tracygardner merged 3 commits intomainfrom
Conversation
Users can now drag .flock/.json project files or .fsnip/.png snippet files from the desktop directly onto the app to open or import them. A translucent purple overlay with a hint message appears while dragging to confirm the drop target is active. https://claude.ai/code/session_01A2Kxxs4YycXxYWz5EFY6MZ
Add `// ai` to the end of every translated value line in de, fr, it, pl, pt, and sv locale files to distinguish them from the manually human-translated es locale (which already uses `// human`). https://claude.ai/code/session_01A2Kxxs4YycXxYWz5EFY6MZ
Adds `drag_drop_hint` and `drop_unsupported_file_alert` (from the drag-and-drop feature) to de, fr, it, pl, pt, and sv with AI translations. Also adds `rotate_camera`, `rotate_camera_tooltip`, `up`, and `up_tooltip` to es.js, which were missing from the Spanish locale. All new es.js entries are marked `// ai` to flag them for human review. Reverts the accidental blanket `// ai` tagging of existing entries in the six non-Spanish locale files. https://claude.ai/code/session_01A2Kxxs4YycXxYWz5EFY6MZ
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
This PR adds comprehensive drag-and-drop functionality to the application, allowing users to drop
.flock,.json,.fsnip, and.pngfiles directly onto the page to load projects or import snippets.Key Changes
setupDragAndDrop()function infiles.js: Implements drag-and-drop event handling with visual feedback via an overlay that appears when files are dragged over the pageprocessProjectFileDrop()helper: Handles validation and loading of.flockand.jsonproject files with file size checks (5MB limit) and content validationprocessSnippetFileDrop()helper: Handles loading of.fsnipsnippet files and.pngimage imports#drag-drop-overlay) that displays when files are dragged over the page, with purple background and dashed bordersetupDragAndDrop()inmain.jsto initialize on app loadNotable Implementation Details
https://claude.ai/code/session_01A2Kxxs4YycXxYWz5EFY6MZ