Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR hides the role field for the creator form field and adds help text beneath both the creator and contributor form fields. The third item referenced in the issue is to make the search field within the modal more obvious as a search field but I believe the root cause of this issue is that the placeholder text is hidden. I've added a comment to #68 as this appears to be closely related.
The implementation subclasses the relevant form components from
invenio_rdm_records
in order to override render methods and update the logic. It creates theOptionalRoleCreatibutorsField
class (and equivalents for other components) that allows control of the rendering of the role field based on theincludeRole
prop. It also adds ahelpText
prop and renders this. Inmapping.js
it then parametrizes the class with appropriateincludeRole
andhelpText
prop values for the creator and contributor fields and overrides the components in the deposit form.Overall the implementation is pretty horrible hence why it's been left in draft and requires copying quite a lot of code for the render method of relevant form components from
invenio_rdm_records
as there is no clean extension point to hook into for rendering of the role field. Adding just the help text could be done much more cleanly via subclassing as . This implementation will be brittle w.r.t updates of InvenioRDM version.All in all I'm open to other suggestions. If we could get some of this (most notably hiding the role field) pulled into invenio_rdm_records then that would be cleanest from our point of view.
Enter a brief description of the PR contents here
Developer Checklist
Developers should review and confirm each of these items before requesting review
Reviewer Checklist
Reviewers should review and confirm each of these items before approval
If there are multiple reviewers, this section can be duplicated for each reviewer
Testing
List user test scripts that need to be run
List any non-unit test scripts that need to be run