gis-ops / valhalla-app

This is the demo web app running on https://valhalla.openstreetmap.de
https://valhalla.openstreetmap.de
MIT License
163 stars 90 forks source link

Added Timeout For Colour in Copy clipboard (In Settings Sidebar Tab) #96

Closed inceptionabhishek closed 1 year ago

inceptionabhishek commented 1 year ago

🛠️ Fixes Issue

In the setting tab, when we click on copy to clipboard we can see that its color changes to green which is a good user experience. However, it stays Green throughout the application unless the user leaves the platform or refreshes the page. Even if we click again on the "copy to clipboard", it stays the same, which is obviously not a good user experience.

👨‍💻 Changes proposed

I would like it to automatically change to its original color after 1 second or 2 seconds for a better user experience. So, I am suggesting adding a timeout of 1 second, after 1 second state: copied will get changed to false, and so do the color.

📄 Note to reviewers

Actually, I noticed this issue just after my previous pull request, otherwise, I would have solved this in that previous PR itself.

📷 Screenshots

Before :

Untitled video - Made with Clipchamp

After changes :

after