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

Fix for copy node ID to clipboard after graph publication #11757

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

SDScandrettKint
Copy link
Member

@SDScandrettKint SDScandrettKint commented Jan 30, 2025

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

Changed the value in graph-tree.htm from node.nodeid to the return value ternary operator of getNodeIdentifier() in graph-tree.js: node.sourceIdentifierId() ? node.sourceIdentifierId() : node.nodeid.

Issues Solved

Closes #11385

Checklist

  • I targeted one of these branches:
    • dev/8.0.x (under development): features, bugfixes not covered below
    • dev/7.6.x (main support): regressions, crashing bugs, security issues, major bugs in new features
    • dev/6.2.x (extended support): major security issues, data loss issues
  • I added a changelog in arches/releases
  • I submitted a PR to arches-docs (if appropriate)
  • Unit tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • My test fails on the target branch

Accessibility Checklist

Developer Guide

Topic Changed Retested
Color contrast
Form fields
Headings
Links
Keyboard
Responsive Design
HTML validation
Screen reader

Ticket Background

Further comments

@@ -72,7 +72,7 @@
data-bind="
visible: graphTree.showIds(),
clipboard: {
value: node.nodeid,
value: node.sourceIdentifierId() ? node.sourceIdentifierId() : node.nodeid,
Copy link
Member

Choose a reason for hiding this comment

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

+1 tested

FYI if you wanted to make this exactly the same as the display value next to the button, you could just do this:

Suggested change
value: node.sourceIdentifierId() ? node.sourceIdentifierId() : node.nodeid,
value: graphTree.getNodeIdentifier(node),

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I think that'd be better actually - it'd avoid repetition and promote DRY

Copy link
Member Author

Choose a reason for hiding this comment

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

Added in e3e2d19

@SDScandrettKint SDScandrettKint merged commit 9277a78 into dev/8.0.x Jan 31, 2025
7 checks passed
@SDScandrettKint SDScandrettKint deleted the 11385_copy_node_uuid_fix branch January 31, 2025 19:50
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.

Copy node ID button copies future node instead of source node
2 participants