-
Notifications
You must be signed in to change notification settings - Fork 25
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
Change dataset details page PID text to a input field with copy button #1051
Change dataset details page PID text to a input field with copy button #1051
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.
Check the scicat token copy under the user settings page.
We should implement it as it is done there
@@ -66,7 +66,14 @@ | |||
</tr> | |||
<tr> | |||
<th>PID</th> | |||
<td>{{ dataset.pid }}</td> | |||
<td> | |||
<mat-form-field class="full-width"> |
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.
Instead of creating a full functional text box, can we just add the copy button, like is done under user settings with the scicat token
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.
From the best practice point of view, especially if you are an accessibility enthusiast, I wouldn't recommend to use onClick in a span to make it a button.
But in our case, I think it is completely fine to follow the pattern what we already have for consistency, and you can add an aria attribute if you want to.
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.
Okay i will check that from the settings page and improve the current code
after the changes, I would add a test, similar to this: frontend/src/app/users/user-settings/user-settings.component.spec.ts Lines 72 to 91 in 757d079
Very minor comment, I don't think the box "Toggle added for new features?" should be ticked in this case |
Description
On the detail page of a dataset is a PID. Normaly the user needs to select manually the PID. This PR adds a input field with simple copy option.
Motivation
To deliver more easy a dataset PID add a UX improvement.
Fixes:
Changes:
Tests included/Docs Updated?
Before:
After: