As a user I want the new document form to lead with file upload and treat all metadata fields as optional so I can save a document quickly without filling everything out upfront #68

Closed
opened 2026-03-25 14:11:58 +01:00 by marcel · 0 comments
Owner

Background

The current "New Document" form presents all fields at equal weight and requires the user to scroll past metadata to upload a file. For someone digitizing quickly, the priority is: get the file in, give it a rough title, save. Everything else can wait.

User Journey

User navigates to "New Document". The file upload area is the most prominent element — large, clearly labelled, at the top. Below it is a single title field (auto-populated from the filename when a file is selected). A "Save" button is always active — no required fields block saving. The rest of the form (date, sender, receivers, tags, transcription) is below, either always visible or in a collapsible "More details" section. The user can fill in as much or as little as they want before saving.

When a file is selected, the filename is used to pre-fill the title field if the title is still empty.

E2E Scenarios

Scenario: Save a document with only a file
  Given I am on the new document page
  When I upload a PDF file
  And I click Save without filling in any other field
  Then a new document is created with the filename as title
  And I am redirected to the document detail page

Scenario: Filename pre-fills title
  Given I am on the new document page
  When I select a file named "Brief_1965.pdf"
  Then the title field is auto-populated with "Brief_1965"

Scenario: Title field is not overwritten if already filled
  Given I am on the new document page
  And I have typed "Weihnachtsbrief 1965" in the title field
  When I select a file
  Then the title field still shows "Weihnachtsbrief 1965"

Implementation notes

  • On the backend, title should fall back to originalFilename if not provided — so the frontend can omit it from the POST and the document still has a human-readable name.
  • The "More details" section (if collapsed by default) should expand automatically when any field inside it has a value (e.g. when navigating back to the form after a validation error).
  • This issue is purely frontend — no new endpoints needed.
## Background The current "New Document" form presents all fields at equal weight and requires the user to scroll past metadata to upload a file. For someone digitizing quickly, the priority is: get the file in, give it a rough title, save. Everything else can wait. ## User Journey User navigates to "New Document". The file upload area is the most prominent element — large, clearly labelled, at the top. Below it is a single title field (auto-populated from the filename when a file is selected). A "Save" button is always active — no required fields block saving. The rest of the form (date, sender, receivers, tags, transcription) is below, either always visible or in a collapsible "More details" section. The user can fill in as much or as little as they want before saving. When a file is selected, the filename is used to pre-fill the title field if the title is still empty. ## E2E Scenarios ``` Scenario: Save a document with only a file Given I am on the new document page When I upload a PDF file And I click Save without filling in any other field Then a new document is created with the filename as title And I am redirected to the document detail page Scenario: Filename pre-fills title Given I am on the new document page When I select a file named "Brief_1965.pdf" Then the title field is auto-populated with "Brief_1965" Scenario: Title field is not overwritten if already filled Given I am on the new document page And I have typed "Weihnachtsbrief 1965" in the title field When I select a file Then the title field still shows "Weihnachtsbrief 1965" ``` ## Implementation notes - On the backend, `title` should fall back to `originalFilename` if not provided — so the frontend can omit it from the POST and the document still has a human-readable name. - The "More details" section (if collapsed by default) should expand automatically when any field inside it has a value (e.g. when navigating back to the form after a validation error). - This issue is purely frontend — no new endpoints needed.
marcel added the file-upload label 2026-03-25 14:14:30 +01:00
Sign in to join this conversation.
No Label file-upload
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marcel/familienarchiv#68