Skip to content
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

Merged

Conversation

svonworl
Copy link
Contributor

@svonworl svonworl commented Oct 24, 2024

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!

  • Check that your code compiles by running npm run build
  • Ensure that the PR targets the correct branch. Check the milestone or fix version of the ticket.
  • If this is the first time you're submitting a PR or even if you just need a refresher, consider reviewing our style guide
  • Do not bypass Angular sanitization (bypassSecurityTrustHtml, etc.), or justify why you need to do so
  • If displaying markdown, use the markdown-wrapper component, which does extra sanitization
  • Do not use cookies, although this may change in the future
  • Run npm audit and ensure you are not introducing new vulnerabilities
  • Do due diligence on new 3rd party libraries, checking for CVEs
  • Don't allow user-uploaded images to be served from the Dockstore domain
  • If this PR is for a user-facing feature, create and link a documentation ticket for this feature (usually in the same milestone as the linked issue). Style points if you create a documentation PR directly and link that instead.
  • Check whether this PR disables tests. If it legitimately needs to disable a test, create a new ticket to re-enable it in a specific milestone.

@svonworl svonworl self-assigned this Oct 24, 2024
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.64%. Comparing base (d7fa51d) to head (c5a8f67).
Report is 1 commits behind head on release/2.13.0-beta.1.

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.
📢 Have feedback on the report? Share it here.

if (!workflow) {
getTRSId(workflow: Workflow | undefined): string {
if (workflow) {
return workflow.entryTypeMetadata.trsPrefix + workflow.full_workflow_path;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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!

Copy link
Contributor Author

@svonworl svonworl Oct 24, 2024

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...

Copy link

@svonworl svonworl merged commit c9ff712 into release/2.13.0-beta.1 Oct 24, 2024
17 of 19 checks passed
@svonworl svonworl deleted the feature/dock-2592/fix-trs-id-copy-button branch October 24, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants