feat(app): drag-and-drop images into meeting notes, remove image button#3873
Merged
Conversation
…tton the top-right image button opened a file picker to insert images — clunky and visually noisy. drop images straight onto the note instead: while a file is dragged over the window a black drop zone appears, and dropping reads the image(s), resizes them, and embeds them in the editor. - remove the insert-image toolbar button + its file-picker handler (and the now-unused ImageIcon / openFileDialog imports) - tauri owns OS file drops at the webview level (native drags never surface as DOM drop events), so listen on getCurrentWebview().onDragDropEvent — same pattern standalone-chat already uses - enter/over -> show a black drop overlay; drop -> resize + data-url the paths via the existing image-utils and call noteEditorRef.insertImages() - non-image drops are ignored Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
the webview drag-drop event is window-global, so the first cut inserted a dropped image into the open note no matter where in the window it landed, and the always-mounted (hidden) chat also staged the same file into its composer. now: - hit-test the drop position against the note's own box; ignore drops that land elsewhere, and only show the black overlay while an image drag is actually over the note - the embedded chat ignores the global drop while it is hidden (offsetParent null), killing the silent double-insert - non-image drops now toast instead of failing silently - images insert at the drop point (posAtCoords) instead of the stale caret Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
what
the top-right image button in the meeting note view is gone. it opened a file picker to insert images — clunky and visually noisy. you now drag an image straight onto the note: a black drop zone appears while a file is dragged over the window, and dropping embeds the image(s) into the editor.
why
drag-and-drop is the expected way to get an image into a note. the picker button was redundant and didn't fit the obsidian-style editing the note view is going for.
how
handleInsertImagesfile-picker handler (and the now-unusedImageIcon/openFileDialogimports)getCurrentWebview().onDragDropEvent, the same patternstandalone-chatalready usesenter/over→ show the black drop overlay;drop→ resize + data-url the dropped paths via the existingimage-utils, thennoteEditorRef.insertImages()(the exact insert path the picker used)visual
ascii fallback:
test plan
bun run build(next build) compiles;tsc --noEmitclean🤖 Generated with Claude Code