Skip to content

Add drag-and-drop file support to the input textarea#2

Merged
c6-dev merged 2 commits intomasterfrom
copilot/add-drag-and-drop-support
Mar 16, 2026
Merged

Add drag-and-drop file support to the input textarea#2
c6-dev merged 2 commits intomasterfrom
copilot/add-drag-and-drop-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 16, 2026

The input textarea only supported pasting text or using the file picker. Users couldn't drag and drop files directly onto it.

Changes

  • Drag events on #input-areadragover (prevents browser default navigation, adds visual class), dragleave (removes class; guards against flicker and leaving to browser chrome via relatedTarget === null check), drop (reads file, populates textarea)
  • File-type validation on drop — rejects non-.yaml/.yml/.json files with an error message, consistent with the existing <input accept=".yaml,.yml,.json">
  • .drag-over CSS class — dashed blue outline + light blue background while a file is held over the textarea
  • Placeholder text — updated to mention drag & drop as an input method

Screenshot

UI showing updated placeholder text and drag-and-drop support


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: c6-dev <31777460+c6-dev@users.noreply.github.com>
Copilot AI changed the title [WIP] Add drag and drop functionality for input file area Add drag-and-drop file support to the input textarea Mar 16, 2026
Copilot AI requested a review from c6-dev March 16, 2026 10:31
@c6-dev c6-dev marked this pull request as ready for review March 16, 2026 10:37
@c6-dev c6-dev merged commit 3e60a02 into master Mar 16, 2026
2 checks passed
@c6-dev c6-dev deleted the copilot/add-drag-and-drop-support branch March 26, 2026 05:35
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.

2 participants