-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/limited rights #89
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @J4bbi. In terms of the resulting UI I think this is good. I'm slightly conflicted on the implementation tbh.
I can see that this was the shortest possible route to get from the existing license field to the behaviour we want but the end result is that for what we get (a modal with two buttons give or take) the code seems overly complex.
I'm aware that your guys time is finite so lets go ahead with this implementation for now (after addressing the comments I've added). I'm going to add an item to the backlog to explore simplifying the implementation down the line.
This is a potentially naive question but could a select input do the job?
site/ic_data_repo/assets/semantic-ui/js/ic_data_repo/LimitedLicenseModal.js
Outdated
Show resolved
Hide resolved
site/ic_data_repo/assets/semantic-ui/js/ic_data_repo/LimitedLicenseModal.js
Outdated
Show resolved
Hide resolved
6b82f4c
to
6231cb9
Compare
Thanks @cc-a I found it tricky to replicate the functionality of the current component, that would also have required providing the hard-coded licenses and not use the search index. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @J4bbi. Looks good.
# Conflicts: # assets/js/invenio_app_rdm/overridableRegistry/mapping.js
This PR limits the availability of licenses for the user to choose from in the submission form. The full list of 419 licenses is taken from the SPDX list of licenses is to be found in invenio-rdm-records.
The standard functionality is to allow multiple licenses and custom licenses. This is done by providing an "Add custom" button, as well as an "Add standard" button. Clicking the "Add standard" button open ups a search modal that searches the
api/vocabularies/licenses
endpoint using the react-searchkit library.This PR creates three new/modifies components:
LimitedLicenseFieldItem
,LimitedLicenseModal
andLimitedLicenseField
.The backend endpoint is of course untouched.
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