-
Notifications
You must be signed in to change notification settings - Fork 16
Add buttons to Manage DOIs dialog to create/delete edit link for Dockstore DOIs #2090
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/1.17.0 #2090 +/- ##
==================================================
- Coverage 41.82% 41.77% -0.05%
==================================================
Files 391 392 +1
Lines 12348 12377 +29
Branches 2952 2957 +5
==================================================
+ Hits 5164 5171 +7
- Misses 4876 4893 +17
- Partials 2308 2313 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
denis-yuen
left a comment
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.
For discussion
| </div> | ||
| <div *ngIf="showMoreEditLinkInfo"> | ||
| <p class="size-small gray-caption"> | ||
| Dockstore uses Zenodo's link sharing feature to create a secret link with edit access so you can edit the DOI. You must be |
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.
Ditto here
src/app/shared/entry/doi/manage-dois/manage-dois-dialog.component.html
Outdated
Show resolved
Hide resolved
src/app/shared/entry/doi/manage-dois/manage-dois-dialog.component.html
Outdated
Show resolved
Hide resolved
|
|
||
| deleteDoiAccessLink() { | ||
| this.manageDoisDialogService.deleteDoiAccessLink(this.entry); | ||
| this.dockstoreDoiAccessLink = undefined; |
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.
Borderline nitpicky, but we might not unset dockstoreDoiAccessLink until the observable has successfully completed. That way, the user can try again in the case of failure (due to network problems or whatever). With this change, the implementation/flow of deleteDoiAccessLink looks more similar to requestDoiAccessLink.
43089da to
6a75261
Compare
|
|
||
| requestDoiAccessLink() { | ||
| this.manageDoisDialogService.requestDoiAccessLink(this.entry).subscribe((accessLink) => { | ||
| this.dockstoreDoiAccessLink = accessLink; |
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.
Out of curiosity, do workflowsService.getDOIEditLink (called in ngOnInit) and manageDoisDialogService.requestDoiAccessLink do the same thing?
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.
Not quite: workflowsService.getDOIEditLink gets the edit link if it exists, otherwise returns a 404. It does not create edit links. manageDoisDialogService.requestDoiAccessLink creates an edit link if it does not exist and throws an error if it does.
src/app/shared/entry/doi/manage-dois/manage-dois-dialog.component.html
Outdated
Show resolved
Hide resolved
|
|
FYI, I changed the browser used for the integration tests to Chrome. After integration_test_2 failed 5 times, I made the switch and it passed on the first try. Maybe a coincidence but we can monitor to see if the flakiness continues with Chrome. |
Description
This PR adds buttons to the Manage DOIs dialog so that a user can create an edit access link to edit the metadata of an automatically generated Dockstore DOI on Zenodo. This single link can be used to edit all versions of the DOI. In order for the changes to be saved on Zenodo, the user must be logged into their Zenodo account, otherwise the attempt to publish the changes will fail with a 403.
Once the user is done editing the DOI, they can delete the access link from the Manage DOIs dialog.
Take note of the sentence after the Dockstore DOIs. There is a "Show more" button that hides the details of the edit link so that the dialog is not too cluttered.
I'm not completely satisfied with the wording, so please feel free to leave suggestions.
Review Instructions
Issue
https://ucsc-cgl.atlassian.net/browse/SEAB-6462
Security
If there are any concerns that require extra attention from the security team, highlight them here.
Please make sure that you've checked the following before submitting your pull request. Thanks!
npm run buildmarkdown-wrappercomponent, which does extra sanitizationnpm auditand ensure you are not introducing new vulnerabilities