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

Copy to Clipboard button next to the tool id in job information #11478

Merged
merged 8 commits into from
Feb 25, 2021

Conversation

OlegZharkov
Copy link
Contributor

@OlegZharkov OlegZharkov commented Feb 25, 2021

fixes #11473

Clipboard button next to the tool id:

image

Additionaly it brings generic copy-to-clipboard component e.g.:

<copy-to-clipboard message="Tool ID was copied to your clipboard" :text="job.tool_id" />

@github-actions github-actions bot added this to the 21.05 milestone Feb 25, 2021
Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

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

Maybe that's too much decomposing, but maybe the copy button can be its own vue component ? Otherwise this is great!

@OlegZharkov
Copy link
Contributor Author

OlegZharkov commented Feb 25, 2021

Maybe that's too much decomposing, but maybe the copy button can be its own vue component ?

I mean, we could if it's useful, do we have another usecase for this?

Otherwise this is great!

thanks!

@mvdbeek
Copy link
Member

mvdbeek commented Feb 25, 2021

You could make this generic, so that the text to copy is being passed in. Then we have the copy button (and the styling) in a single place. It also makes the parent component slimmer, so you don't have for instance the copyToolId method in the body of the parent component. It's a style question, I don't want to hold up the PR.

@OlegZharkov
Copy link
Contributor Author

You could make this generic, so that the text to copy is being passed in. Then we have the copy button (and the styling) in a single place. It also makes the parent component slimmer, so you don't have for instance the copyToolId method in the body of the parent component. It's a style question, I don't want to hold up the PR.

no worries, I will do it now

@OlegZharkov
Copy link
Contributor Author

OlegZharkov commented Feb 25, 2021

You could make this generic, so that the text to copy is being passed in. Then we have the copy button (and the styling) in a single place. It also makes the parent component slimmer, so you don't have for instance the copyToolId method in the body of the parent component. It's a style question, I don't want to hold up the PR.

So I changed it to <copy-to-clipboard :text="{variable_to_be_copied}" message="{text on toast}" />

@mvdbeek
Copy link
Member

mvdbeek commented Feb 25, 2021

Thank you, that's great!

@OlegZharkov
Copy link
Contributor Author

should I change icon to this one? 🤔
image

@dannon
Copy link
Member

dannon commented Feb 25, 2021

@OlegZharkov Good call -- yes, we should use the same icon consistently

Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
@dannon dannon merged commit 39c6880 into galaxyproject:dev Feb 25, 2021
@OlegZharkov
Copy link
Contributor Author

thanks @mvdbeek @dannon @afgane

@OlegZharkov OlegZharkov deleted the btn-toolid branch February 25, 2021 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a Copy to Clipboard button next to the tool id
3 participants