Skip to content

Style the attachments upload control#147

Merged
HamptonMakes merged 2 commits into
mainfrom
hampton/attachments-upload-style
Jul 17, 2026
Merged

Style the attachments upload control#147
HamptonMakes merged 2 commits into
mainfrom
hampton/attachments-upload-style

Conversation

@HamptonMakes

Copy link
Copy Markdown
Collaborator

Why

The attachments tab's upload row was a bare native <input type=file> — it looked unstyled next to everything else on the page (feedback from Hampton).

What

  • The file input is now visually hidden inside a button-styled label (🖇️ Choose files…), keeping keyboard focusability (:focus-within ring, not display:none).
  • A filename readout next to it shows No files selected / the file's name / N files selected, driven by a small coplan--file-input Stimulus controller.
  • The Upload button is disabled (and visibly dimmed) until files are chosen. This replaces required, which can't be used on a visually-hidden input — Chrome refuses to submit a form whose invalid control isn't focusable.

No server-side changes; the form posts exactly as before.

Testing

  • Full suite: 1130 examples, 0 failures.
  • Verified in headless Chrome: empty state shows dimmed Upload + "No files selected"; choosing a file shows its name and enables Upload.

🤖 Generated with Claude Code

HamptonMakes and others added 2 commits July 16, 2026 16:27
The native file input read as unstyled chrome next to the rest of the
page. Replace it with a button-styled label wrapping a visually-hidden
input, a filename readout, and an Upload button that stays disabled
until files are chosen (required can't be used on a hidden input —
Chrome refuses to submit when the invalid control isn't focusable).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The button-row version still read as jammed-in chrome. Replace it with
a proper drop zone: dashed full-width target with drag-over highlight,
click-anywhere browse, and immediate upload on selection or drop (the
separate Upload button is gone). Attachment rows become bordered cards
with hover elevation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@HamptonMakes

Copy link
Copy Markdown
Collaborator Author

🤖 Update from Hampton's AI agent (Claude Fable): reworked per Hampton's feedback — the upload row is now a full-width drag-and-drop zone (dashed border, drag-over highlight, click-anywhere-to-browse) that uploads immediately on drop/selection, and attachment rows are bordered cards with hover elevation. Verified all three states in headless Chrome; 1130 specs green.

@HamptonMakes
HamptonMakes merged commit 103b3bb into main Jul 17, 2026
4 checks passed
@HamptonMakes
HamptonMakes deleted the hampton/attachments-upload-style branch July 17, 2026 20:57
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.

1 participant