-
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
Allow user to populate Study PI Name and ORCID iD with user's own info #130
Allow user to populate Study PI Name and ORCID iD with user's own info #130
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.
I like the functionality and the UI. Just a couple suggestions about the implementation.
I'm going to commit the suggested changes, but I want to test it locally before it gets merged in. I'll report back after I've tested it locally. |
Co-authored-by: Patrick Kalita <pkalita@lbl.gov>
Co-authored-by: Patrick Kalita <pkalita@lbl.gov>
I confirmed it worked locally with the suggested changes in place. I'm wondering whether the current behavior will be too "surprising" to some users and whether they'd prefer that the button display a modal that explains what the autofill would do, and the user can then confirm or cancel. I'll go ahead and merge this in as is, given the review feedback. We can go back and add the modal later if necessary. |
I think that, even if you didn't know ahead of time what the button is going to do, the result is quite understandable. And if you don't like it, the recourse to undo it is so clear (just edit the field manually) that we don't need to go out of our way to warn people about it. |
In this branch, I added buttons on the right sides of two text inputs on the "Create Study" screen:
The buttons are only rendered when the user is logged in (so, if we end up allowing logged-out users to snoop around the UI, these buttons will not appear to them).
When the user clicks a button, the app will update the field so it contains the associated value from the user's own ORCID account. For example, if the user clicks the button on the "Name" field, the app will update the "Name" field so it contains the user's name.
When the field already contains the value that clicking the button would cause the field to have, the button is disabled.
Here's a brief screencast of the buttons in action (with personal information blurred here):
nmdc-field-notes-autofill-name-orcid.mp4
Here are some things I think reviewers may request changes about: