Skip to content

feat(ui): describe all supported paste and upload formats in Dropzone - #235

Merged
obvious-autobuild-staging[bot] merged 3 commits into
masterfrom
feat/input-dropzone-paste-descriptions
Oct 20, 2026
Merged

obvious-autobuild-staging[bot] merged 3 commits into
masterfrom
feat/input-dropzone-paste-descriptions

Conversation

@obvious-autobuild-staging

Copy link
Copy Markdown
Contributor

Why

After adding support for Markdown pipe tables, ChatGPT multi-table documents, psql/MySQL ASCII box tables, wrapped API payloads, and JSONL/NDJSON, the empty-state Dropzone still said only "Paste CSV or TSV here" / "Paste JSON here", and the file picker's accept list omitted .md, .jsonl, and .ndjson (TEXT_EXTENSION also omitted .jsonl). Users had no upfront signal in the input area that they could paste or upload those formats directly.

What changed

  • Empty-state Dropzone (app/src/components/Dropzone.tsx, AC-19 / D18):
    • Updated data-testid="dropzone-title" to "Paste CSV, TSV, or Markdown table" in CSV → JSON mode and "Paste JSON or JSONL here" in JSON → CSV mode.
    • Added a concise muted format summary (data-testid="dropzone-formats"):
      • CSV → JSON: "Supports CSV, TSV / spreadsheet cells, Markdown & ChatGPT docs (multi-table), and psql / MySQL box tables"
      • JSON → CSV: "Supports JSON arrays, nested objects, wrapped API payloads ({ data: […] }), and JSONL / NDJSON"
    • Updated <textarea data-testid="paste-field"> placeholder and aria-label in both modes, with single-line sans-serif placeholder styling so the longer hint never wraps or triggers a vertical scrollbar on mobile (375px–390px) or desktop (1440px).
  • File Picker & Upload Extension Gate (app/src/components/InputPane.tsx, app/src/lib/files.ts):
    • Extended <input type="file" data-testid="file-input"> accept to .csv,.tsv,.txt,.md,text/csv,text/tab-separated-values,text/markdown in CSV mode and .json,.jsonl,.ndjson,.txt,application/json,application/x-ndjson in JSON mode.
    • Added .jsonl to TEXT_EXTENSION (/\\.(csv|tsv|txt|json|jsonl|ndjson|md|log)$/i) in app/src/lib/files.ts.
  • Tests, Changelog & Build (app/dist):
    • Updated Dropzone.test.tsx, files.test.ts, and App.test.tsx to cover the expanded format copy, accept attribute, and isTextFile extensions.
    • Added bundled changelog entry #24 in app/src/changelog/entries.ts and rebuilt app/dist.

Tradeoffs

  • Kept the supported-formats summary as a single muted subtitle (data-testid="dropzone-formats") inside the centered Dropzone rather than adding format badges or permanent chrome in OptionsRow, preserving the zero-clutter empty state (D1, D18).

How to Review

  • app/src/components/Dropzone.tsx — dropzone-title, dropzone-formats, and paste-field placeholder/aria-label.
  • app/src/components/InputPane.tsx & app/src/lib/files.ts — file-input accept attribute and TEXT_EXTENSION.
  • app/src/components/Dropzone.test.tsx, app/src/lib/__tests__/files.test.ts, app/src/App.test.tsx — unit and integration coverage.

Verification

  • cd app && npm run lint && npx tsc -b --noEmit && npm test (35 test suites, 612 tests passing)
  • cd app && npm run build && cd .. && bash .github/scripts/verify-seo.sh (45,494 bytes prerendered HTML verified)
  • Interactive agent-browser headless Chromium visual QA at 1440×900 (CSV → JSON and JSON → CSV) and 390×844 mobile viewport

Human author: David Boskovic (david@obvious.ai)

🔗 Obvious Project · 🧵 Obvious Thread · 🔀 Obvious PR Artifact

ObviousApp and others added 3 commits October 20, 2026 16:43
Update Dropzone heading, format summary, and paste-field placeholder/aria-label for CSV → JSON and JSON → CSV modes, and extend file-input accept and TEXT_EXTENSION to include .md, .jsonl, and .ndjson.

Co-authored-by: David Boskovic <david@obvious.ai>
Verify dropzone-title, dropzone-formats, paste-field placeholder/aria-label, file-input accept, and isTextFile extension coverage across CSV → JSON and JSON → CSV modes.

Co-authored-by: David Boskovic <david@obvious.ai>
Add bundled changelog entry #24 and rebuild prerendered app/dist bundle.

Co-authored-by: David Boskovic <david@obvious.ai>
@obvious-autobuild-staging
obvious-autobuild-staging Bot marked this pull request as ready for review October 20, 2026 16:49
@obvious-autobuild-staging
obvious-autobuild-staging Bot merged commit a07066d into master Oct 20, 2026
2 checks passed
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