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

UI Conditionally Copy Tooltips #12890

Merged
merged 3 commits into from Oct 21, 2021
Merged

UI Conditionally Copy Tooltips #12890

merged 3 commits into from Oct 21, 2021

Conversation

zofskeez
Copy link
Contributor

It was requested that the Last Vault rotation timestamp value for static database roles which is presented in a tooltip could be clicked to copy to the clipboard.

What was changed

  • added short delay to ToolTip component which allows content to remain visible on hover
  • added CopyButton to InfoTableRow component
  • added integration test

How to test

  • create database connection
  • add static role
  • get credentials for role
  • hover over Last Vault rotation value and click tooltip

image

Since the ToolTip component yields components for the trigger and content it seemed best to defer responsibility of copying to the outer component. I considered creating a component to wrap the content component from ember basic dropdown which could then accept an argument such as copyText and yield that but ultimately decided against it. I'm happy to move in that direction if there is support for it.

@zofskeez zofskeez added the ui label Oct 20, 2021
@hashicorp-cla
Copy link

hashicorp-cla commented Oct 20, 2021

CLA assistant check
All committers have signed the CLA.

@vercel vercel bot temporarily deployed to Preview – vault October 20, 2021 21:03 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook October 20, 2021 21:03 Inactive
Copy link
Contributor

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

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

Nice work! 🚀

@@ -71,6 +71,29 @@ module('Integration | Component | InfoTableRow', function(hooks) {
assert.equal(tooltip, 'Tooltip text!', 'renders tooltip text');
});

test('it should copy tooltip', async function(assert) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👏

@zofskeez zofskeez modified the milestones: triaged, 1.9 Oct 21, 2021
@zofskeez zofskeez merged commit 39b80b8 into main Oct 21, 2021
@zofskeez zofskeez deleted the ui/copy-tooltips branch October 21, 2021 15:27
qk4l pushed a commit to qk4l/vault that referenced this pull request Feb 4, 2022
* adds conditional tooltip copying to InfoTableRow component

* adds changelog entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants