-
Notifications
You must be signed in to change notification settings - Fork 16
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
DOCK-2594: Fix TRS ID "copy button" bug #2035
DOCK-2594: Fix TRS ID "copy button" bug #2035
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/2.13.0-beta.1 #2035 +/- ##
=========================================================
- Coverage 41.66% 41.64% -0.02%
=========================================================
Files 394 394
Lines 12318 12317 -1
Branches 2959 2959
=========================================================
- Hits 5132 5130 -2
- Misses 4861 4862 +1
Partials 2325 2325 ☔ View full report in Codecov by Sentry. |
if (!workflow) { | ||
getTRSId(workflow: Workflow | undefined): string { | ||
if (workflow) { | ||
return workflow.entryTypeMetadata.trsPrefix + workflow.full_workflow_path; |
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.
No need to change, but FYI, there is a trsId
field now: https://github.com/dockstore/dockstore/blob/c8459501ac20132294376702c6c8a81338d3c9bf/dockstore-webservice/src/main/resources/openapi3/openapi.yaml#L12529-L12530
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.
the trsId
should be available for Workflow
https://github.com/dockstore/dockstore/blob/c8459501ac20132294376702c6c8a81338d3c9bf/dockstore-webservice/src/main/java/io/dockstore/webservice/core/Entry.java#L969-L971
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.
Forgot about that, changed. Thanks Kathy!
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.
Woops, something is wrong. Being that I'm leaving soon and we're trying to deploy again soon, reverting to original solution...
|
Description
This PR fixes the "copy" button (on the workflow page, in the "Workflow Information" section, at the right end of the "TRS" line) so that when two workflows are viewed successively, the copied value is correct. Previously, if you visited the pages for two workflows A and B, if you used the button to copy the TRS ID on workflow B's page, the copied value was the TRS ID for workflow A.
The cause was that we were updating the TRS ID field of the component when an "entryType" observable issued forth a new value. The assumption was probably that if we visited successive workflows, we'd see successive "workflow" entry type values on the line. But, for whatever reason, that's not how it was working...
Editorial: this type of bug suggests that our UI code (and more specifically, the architecture and constructs typically employed within) is making it hard for us to do simple, straightforward things (such as, in this case, display the TRS ID corresponding to the current workflow).
The branch has the wrong issue number, woops.
Review Instructions
Go to search, reproduce the steps in the first paragraph of the "Description" section above, use the button to copy the TRS ID, and confirm it has the correct value.
Issue
https://ucsc-cgl.atlassian.net/browse/DOCK-2594
dockstore/dockstore#6024
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 build
markdown-wrapper
component, which does extra sanitizationnpm audit
and ensure you are not introducing new vulnerabilities