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
Copy button - Details page #5832
base: main
Are you sure you want to change the base?
Conversation
Not very happy with the layout of it. Any suggestions and hints for the CSS? |
I think it's around the vertical alignment (I have not looked at the html elements being currently used to give you the proper answer but hints would be around |
ccf48ae
to
de8e125
Compare
let the one who is using the component to decide what is the text size to use Signed-off-by: Thiago Mendes <[email protected]>
make usage of copy to clipboard component into detail pages Signed-off-by: Thiago Mendes <[email protected]>
adapt current test to find heading that is not encapsulated into copy to clipboard component Signed-off-by: Thiago Mendes <[email protected]>
de8e125
to
8bb042f
Compare
@dgolovin Thank you do much for your guidance with CSS :) It looks much better now <3 |
@benoitf I completely agree, and I experienced the same feeling of confusion when opening the panel to take the screenshot. I might be a bit busy with an interview this week, but I will come back to it, do some experiments and post screenshots here as soon as possible. Thanks for your comment :) |
@trmendes good stuff anyway maybe to be less confusing it's to have the icon appearing only on hover and a different background including both the thing to copy and the copy button so we see that it's the 'same unit' I'll let others comment here |
@benoitf I took a quick look at docker desktop to see how they handle that sort of information, and they actually have a copy button for the hash and not for the object name. They also print the tag along with the name. What is the reason(s) we choose copying the name over hash? |
cc @mairin |
I had something similar open long time ago see @mairin comment on the subject #4242 (comment) |
@axel7083 Yep exactly what I was gonna suggest :) Here's a prototype, it's a little hairy but you get the idea: Screencast.from.2024-02-06.10-34-52.webm |
+1 to design from @mairin. That's a much cleaner look, which means we could use it in far more places (e.g. we don't need to decide between name or hash, both could allow copying without any UI clutter or confusion). CopyToClipboard is already used in Preferences > Resources page (#5687), I think the question is whether we use it here basically as-is or refactor it to the design first. Since there are multiple comments on placement I'd prefer the latter, also so that we wouldn't add buttons and then 'remove' them later. |
My only concern about these popup on which we need to click (not specifically here, but in different apps/websites), is related to accessibility and that you have to be quite precise with your mouse and don't move too much, or the popup disappears before you can click on it. And is it usable with keyboard only? |
Agreed, we need to make sure it is not finicky and mouse-over area is generous. Could be other things we could do too, e.g. maybe clicking on the text keeps the popup open?
FWIW, I just checked what to me is the 'Mac equivalent': copying a password from the password manager. When you're using the keyboard you never see the popup - when you tab in it auto-selects all the text and a normal Ctrl-C works fine. |
@deboer-tim Ah that is what I would suggest for keyboard... just enable ctrl+c on copyable fields on focus. |
converting do draft |
What does this PR do?
It makes usage of the “Copy To Clipboard” component, so the users can copy the title of the details page to the clipboard.
Screenshot / video of UI
What issues does this PR fix or reference?
Fixes #4241
How to test this PR?