Add fields to specify a researcher, instrument, protocol and possibly date. Perhaps make the form duplicate the form to associate each file with its sequence metadata
Alternatives
None
Dependencies
None
Comment
None
ISSUE OWNER SECTION
Assumptions
None
Limitations
This will not implement the processing of the new form fields (except to process the individual file fields as opposed to the multi-file picker). This will be handled in a yet-to-be-defined issue that autofills the Sequences and Peak Annotation Files sheets.
[x] 1.4.4. Form validation for date format YYYY-MM-DD
2. A way to add or remove form rows will be supplied (see the advanced search) #1210, #1207, #1204
[x] 3. There must exist a way to drag and drop multiple files to add form rows
[x] 3.1. There must be an intuitive way to show that files can be dragged and dropped (refer to old branch code for the drop-area that was made and removed for the mzxml file names input)
[x] 3.2. Dragging and dropping files must not leave forms containing no selected files (i.e. add files to existing rows sequentially before creating new rows)
4.OPTIONAL: There must exist a way to conveniently enter/duplicate the sequence metadata (e.g. cookies #1218, copy/paste entire row #1233, adding rows duplicates values in the row where the "+" was clicked #1204, dropping files duplicates values from ~the last row~ a template [DONE], etc)
DESIGN
Interface Change description
New form entries will exist for each file: researcher, protocol, instrument, and date.
There will be +/- buttons.
Instead of a multi-file picker on the submission start page, forms for individual files (including the sequence details) will be replicated in a manner similar to the advanced search, only with the ability to drag and drop a group of files to replicate the forms. Existing sequence selections in the last form (empty or populated) will be default-filled into each new form.
There will exist a drop-area to add files (and replicate forms).
Optionally, I will add copy, paste, and copy-and-paste-all (copy-and-paste-empties - or perhaps change behavior based on depression of a modifier key) buttons at the end of each form to copy and paste the sequence details between forms.
Code Change Description
I will use the drop-area code that was added and then removed for an early version of the submission page for mzXML files. I think it still exists in a branch. It will need to be edited to replicate forms.
Form replication will happen in a similar manner to the advanced search page (using the same multi-form code), only without the hierarchical nesting.
I may need to add a javascript file or css file for some of the requirements.
The DataSubmissionValidationForm will get new fields (which is straightforward).
The template will get a hidden div with the skeleton form.
Replicating forms will have to grab the values of the form whose "+" button was clicked and fill in values for the fields.
The javascript code that processes dropped files will have to copy the values of the last form (populated or not) and paste it into every added form. I might use a user-copied form for the dropped files if I implement the copy/paste buttons.
FEATURE REQUEST
Inspiration
None provided
Description
Add fields to specify a researcher, instrument, protocol and possibly date. Perhaps make the form duplicate the form to associate each file with its sequence metadata
Alternatives
None
Dependencies
None
Comment
None
ISSUE OWNER SECTION
Assumptions
None
Limitations
Affected Components
DataRepo/forms.py
DataRepo/templates/submission/includes/1_start.html
DataRepo/views/upload/submission.py
static/js/file_list_drop_area.js
static/js/formsets.js
Requirements
1.
User can associate the following sequence details with each individual peak annotation file:1.1.
Researcher1.1.1.
Text box1.1.2.
Required1.1.3.
Placeholder: "John Doe"1.1.4.
Autofill based on current researcher DB content (but novel value allowed)1.1.5.
Focussing an empty field must reveal a dropdown. Arrowing down on a populated field must reveal a dropdown.1.2.
Instrument1.2.1.
Text box1.2.2.
Required1.2.3.
Placeholder: "Exploris240"1.2.4.
Autofill based on field choices (but novel value allowed)1.2.5.
Focussing an empty field must reveal a dropdown. Arrowing down on a populated field must reveal a dropdown.1.3.
Protocol1.3.1.
Text box1.3.2.
Required1.3.3.
Placeholder: "polar-HILIC-25-min"1.3.4.
Autofill based on current researcher DB content (but novel value allowed)1.3.5.
Focussing an empty field must reveal a dropdown. Arrowing down on a populated field must reveal a dropdown.1.4.
Date1.4.1.
Text box1.4.2.
Required1.4.3.
Placeholder: "2024-09-12" (today's date)1.4.4.
Form validation for date formatYYYY-MM-DD
2.
A way to add or remove form rows will be supplied (see the advanced search) #1210, #1207, #12043.
There must exist a way to drag and drop multiple files to add form rows3.1.
There must be an intuitive way to show that files can be dragged and dropped (refer to old branch code for the drop-area that was made and removed for the mzxml file names input)3.2.
Dragging and dropping files must not leave forms containing no selected files (i.e. add files to existing rows sequentially before creating new rows)4.
OPTIONAL: There must exist a way to conveniently enter/duplicate the sequence metadata (e.g. cookies #1218, copy/paste entire row #1233, adding rows duplicates values in the row where the "+" was clicked #1204, dropping files duplicates values from ~the last row~ a template [DONE], etc)DESIGN
Interface Change description
New form entries will exist for each file: researcher, protocol, instrument, and date.
There will be +/- buttons.
Instead of a multi-file picker on the submission start page, forms for individual files (including the sequence details) will be replicated in a manner similar to the advanced search, only with the ability to drag and drop a group of files to replicate the forms. Existing sequence selections in the last form (empty or populated) will be default-filled into each new form.
There will exist a drop-area to add files (and replicate forms).
Optionally, I will add copy, paste, and copy-and-paste-all (copy-and-paste-empties - or perhaps change behavior based on depression of a modifier key) buttons at the end of each form to copy and paste the sequence details between forms.
Code Change Description
I will use the drop-area code that was added and then removed for an early version of the submission page for mzXML files. I think it still exists in a branch. It will need to be edited to replicate forms.
Form replication will happen in a similar manner to the advanced search page (using the same multi-form code), only without the hierarchical nesting.
I may need to add a javascript file or css file for some of the requirements.
The
DataSubmissionValidationForm
will get new fields (which is straightforward).The template will get a hidden div with the skeleton form.
Replicating forms will have to grab the values of the form whose "+" button was clicked and fill in values for the fields.
The javascript code that processes dropped files will have to copy the values of the last form (populated or not) and paste it into every added form. I might use a user-copied form for the dropped files if I implement the copy/paste buttons.
Tests
A test for each requirements.