oxiton-foundation / click-metrics

Click Matrics is a powerful URL shortening and analytics platform designed to streamline the process of generating short URLs, creating QR codes, and tracking detailed analytics for each link.
https://click-metrics.vercel.app
MIT License
30 stars 42 forks source link

[Feature] : adding icon to copy URL to the clipboard #163

Open sahithinandikula opened 5 months ago

sahithinandikula commented 5 months ago

Related Issue(s)

Description

I have asked to add the icon that when clicked copies the URL to the clipboard.

Changes Made

I made the changes in links.tsx file to add an icon that copies the generated URL to the clipboard.

Screenshots (if applicable)

image

Checklist

Before submitting your pull request, ensure that you have completed the following tasks:

github-actions[bot] commented 5 months ago

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our #24. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

sahithinandikula commented 5 months ago

@Smitkhobragade Generate short link button is not working , so I made the changes in such a way that when input is not provided or empty , it displays message "No URL available to copy". If the URL is generated it displays "URL copied to clipboard"

Smitkhobragade commented 5 months ago

hey @sahithinandikula . can you do it like. when there is no URL Present in Box. it should not show the copy button. and when there is some URL present then it should become visible. ?

Also can you shift the button on / beside the input box ? something arrangement like this --> image

sahithinandikula commented 5 months ago

@Smitkhobragade I have made the changes as you mentioned. The button will now be visible only if the URL is generated.

Smitkhobragade commented 5 months ago

Okay. and what about the button position which I said to shift beside the Input ?

Can you provide a video if possible ? @sahithinandikula

sahithinandikula commented 5 months ago

@Smitkhobragade The copy button is displayed only when a valid short URL exists. The input field and copy button are wrapped to ensure proper alignment. Sorry, but I cannot provide with the video because my changes will only be visible if any short URL is generated. Since the GENERATE SHORT link button is not working. I am unable to provide it, hope its okay for you.

Smitkhobragade commented 5 months ago

You can insert a dummy URL to view it ? if it's okay to attach a photo also it will work, I will then Finalize the PR. @sahithinandikula

I am not able to Guess like how is it looking...

Swarnendu0123 commented 5 months ago

GENERATE SHORT link button is not working. I am unable to provide it, hope its okay for you.

@sahithinandikula you have to start the backend in another terminal, and then you can get the short URL from the backend.

sahithinandikula commented 5 months ago

@Smitkhobragade

https://github.com/oxiton-foundation/click-metrics/assets/138794574/45961b27-68f0-49c8-b08e-377e74e42b37

Smitkhobragade commented 5 months ago

@Swarnendu0123 .

Swarnendu0123 commented 5 months ago

Icon size is too small. Increase the icon size.

sahithinandikula commented 5 months ago

image

@Swarnendu0123 is this okay?

Swarnendu0123 commented 5 months ago

Now it looks good, but can you please increase the width of the Card?

sahithinandikula commented 5 months ago

@Swarnendu0123 I hope this is okay!

image

Swarnendu0123 commented 5 months ago

The UI which you have developed seems like we are copying the source url itself. The copy button should be at the right of the generated url. What do you suggest @Smitkhobragade?

Smitkhobragade commented 5 months ago

The UI which you have developed seems like we are copying the source url itself. The copy button should be at the right of the generated url. What do you suggest @Smitkhobragade?

Correct @Swarnendu0123 .

It provides a confusion that which url is been copied the generated one. Or the supplied one..

sahithinandikula commented 5 months ago

@Smitkhobragade Can I make it as earlier Screenshot 2024-06-10 192827

Swarnendu0123 commented 5 months ago

Copy icon should appear at the right of the generated url. And when the url is already generated, then only we should render the copy button, otherwise we shouldn't render the copy button.