Closed jupiter007 closed 1 month ago
1 Warning | |
---|---|
:warning: | This PR is too big! Consider breaking it down into smaller PRs. |
Generated by :no_entry_sign: Danger
Hi @briri. I added a new TypeAhead component, but I stored my code updates to the Research Outputs page in a temporary file, because we need to make some code updates to accommodate the new "Other Repository Name" field, otherwise the form will break. I was wondering how we want to handle making those changes.
This looks good to me Juliet. I also think that adding 'Other ...' to the labels for the name, description and URL will help them associate it with their selection of 'Other'. Good thinking!
As for attaching the input values to the larger DMP JSON object, we will want to update the
src/model.js
. The Rails side has logic in it already to determine if theDataRepository
class that is sent in is new or existing. Would it be difficult to reuse that class? At least in the current DMPTool? We can revaluate and handle this all differently rebuild
Thanks Brian. I will take a look and see if I can figure out how to add the new field into the model.
Thanks Brian. I will take a look and see if I can figure out how to add the new field into the model.
Would you be able to map those fields onto the existing ones in the model rather than adding new fields to the model?
Fixes #580
Changes proposed in this PR:
researchoutputs-new.js
" that contains my changes to the Research Outputs component to use the new TypeAhead component, and to prevent the display of theRepository Description
andRepository URL
fields on initial load. These fields will only be displayed when the user selects "Other
" from the dropdown. We need to add additional code to handle the addition of the new "Other Repository Name" field before I can move this code to researchoutputs.js.tabIndex=-1
to Spinner, so that user cannot tab to it