Copy button beside asset url

My idea is:

Add a copy button beside the asset url on the view asset page.

I think these groups of people would benefit from this idea:

Most users of Mautic

Why I think they would benefit from this idea:

It’s a time saver for anyone copying the link into an email or onto another website.

Any code or resources to support this idea:

No, but I can write it

Are you willing to work on this idea?:

Yes

What skills and resources do you need to explore this further?

I would like someone to let me know if this UI element appears anywhere else in the Mautic codebase so that the styles can be re-used

Hey there!

Thanks for the suggestion, in fact we have a PR which is introducing a template for this exact behaviour:

It hasn’t landed in the asset bundle yet but I have no doubt it’ll be ported there at some point in the near future. If you’re able to help reviewing and testing that PR then we can make that happen quicker!

cc @andersoneccel for visibility.

1 Like

I see that the one you mentioned got merged. Yay!

I did a bit of code review plus manual testing and I found a couple of small issues. What is the protocol? Would I create a new pull request just for this issue and anything else minor?

Or could I merge that with a pull request for adding this behaviour to the asset page?

How separate does this project prefer these to be? Probably separate?

1 Like

Thanks for doing the review and testing!

If you find some bugs or issues and you know how to fix them, first off I’d check if there are any reports in the issue queue so you can mark them as resolved with your fix - you can also raise an issue if you want, so others find it. Then if you can, please make a PR. Bug fixes should go against the 6.0 branch, you can also make a mirror PR against 7.x if you have the time which makes life a bit easier for our release leads not having to back-merge. We’ve got some docs on making the PR on the Community Handbook.

We separate things out into one PR for one issue, so I’d suggest a bugfix first (6.0 and mirror on 7.x if you can), and then a separate feature PR to add the new feature on Assets - that must be against the 7.x branch as we only introduce features in the minor and major releases, of which 7.0 will be the next one.

Thanks for being up for contributing!