Skip to content

feat(fresh-ui): Dropzone drag + clipboard-paste + multi-file ingest (#214)#229

Merged
rickylabs merged 2 commits into
mainfrom
feat/dropzone-paste-multifile-ingest
Jul 1, 2026
Merged

feat(fresh-ui): Dropzone drag + clipboard-paste + multi-file ingest (#214)#229
rickylabs merged 2 commits into
mainfrom
feat/dropzone-paste-multifile-ingest

Conversation

@rickylabs

Copy link
Copy Markdown
Owner

Extends the Dropzone fresh-ui component with richer ingest ergonomics:

  • Drag & drop and click-to-browse ingest with visual drag-over state.
  • Clipboard paste ingest (paste files/images directly into the zone).
  • Multi-file selection with per-file handling.
  • accept filtering so callers can constrain accepted MIME/extension types.

Tokens-only styling, a11y preserved, DataTable/registry conventions untouched. Rebased onto
current main (barrel + registry.generated.ts reconciled against the merged Icon/DataGrid).

Closes #214

@augmentcode

augmentcode Bot commented Jul 1, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Extends the Dropzone fresh-ui registry component to handle file ingest directly (drag/drop, clipboard paste, and picker) while keeping token-only styling.

Changes:

  • Adds ingest source/rejection enums and detail types (DropzoneIngestDetails, DropzoneRejectedFile)
  • Introduces accept and multiple props with shared filtering for drop/paste/picker
  • Adds new callbacks for consumers: onFile, onFiles, and onReject
  • Implements internal handlers for onDragOver, onDrop, onPaste, and file input onChange
  • Adds an aria-live status region and announcer helper for basic ingest feedback
  • Adds visually-hidden CSS for the internal file input and status text
  • Expands Dropzone tests to cover multi-file drop, clipboard item paste ingest, and accept-based rejection

Technical Notes: Filtering supports extensions (e.g. .pdf) and MIME wildcards (e.g. image/*) and applies the same policy across all ingest sources.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@@ -22,11 +49,114 @@ interface DropzoneProps extends Omit<JSX.HTMLAttributes<HTMLLabelElement>, 'clas
active?: boolean;
/** Typically a visually-hidden <input type="file">. */

@augmentcode augmentcode Bot Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The props doc says children is “typically a visually-hidden ”, but Dropzone now always renders its own internal file input as well; existing consumers that already pass an input child may end up with two inputs and changed click/focus behavior.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

data-active={active ? '' : undefined}
onDragOver={handleDragOver}
onDrop={handleDrop}
onPaste={handlePaste}

@augmentcode augmentcode Bot Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clipboard ingest is wired via onPaste on the <label>, but a plain label isn’t focusable by default and paste events are usually dispatched only to the focused element—please double-check that keyboard paste into the dropzone reliably fires in real browsers (otherwise paste ingest may be effectively unreachable).

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@rickylabs
rickylabs merged commit 434ede1 into main Jul 1, 2026
6 checks passed
@rickylabs
rickylabs deleted the feat/dropzone-paste-multifile-ingest branch July 1, 2026 23:53
rickylabs added a commit that referenced this pull request Jul 2, 2026
…eature sweep (#233)

Storefront tutorial D-01…D-05 conformance to the shipped #206#231 surface,
plus accuracy reconciliation on the fresh-ui/web-layer pages the sweep touched.

D-01 (01-scaffold): Aspire dashboard URL is https; fileTree includes
  database/ and tests/.
D-02 (02-catalog-service): real #208 CRUD surface — createCrudContract +
  @database/zod + context.db; errors thrown via the contract's typed
  errors.NOT_FOUND (no hand-rolled notFound import); router nests health
  under products (no invented health-router import).
D-03 (03-cart-contracts): register in mod.ts, PascalCase CartContractV1,
  import from @my-shop/contracts and the ./versions/v1 subpath. Reconciled
  02's products.contract.ts exports to the same PascalCase convention
  (ProductsContract/ProductsContractV1) so ch2↔ch3 imports agree.
D-04 (04/05): public `netscript plugin install saga|trigger --name … --samples`.

Feature recon to the sweep: DataTable→DataGrid (#209/#225), Icon primitive
(#211/#224) and DataGrid in fresh-ui root exports, Dropzone/prompt-input
mentions (#214/#229, #212/#226), managed <Form> class + <form> attrs
(#213/#228), useIslandMutation onMutate/onSettled (#210/#227).

Docs-only. build + check:links + check:caveats green. Refs #153.


Claude-Session: https://claude.ai/code/session_012wKHquACkXnWPDgJYhhFjN

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

dropzone: promote drag + clipboard-paste + multi-file ingest behavior

1 participant