triggerdotdev / jsonhero-web

JSON Hero is an open-source, beautiful JSON explorer for the web that lets you browse, search and navigate your JSON files at speed. 🚀. Built with 💜 by the Trigger.dev team.
https://jsonhero.io
Apache License 2.0
9.01k stars 482 forks source link

"Go" button on homepage should indicate loading state after clicking #151

Closed abhaykumarvats closed 1 year ago

abhaykumarvats commented 1 year ago

The "Go" button doesn't show any sort of loading state when clicked. If the pasted JSON is big, it can take significant amount of time for it to get parsed. So, it becomes important to show user some sort of loading state.

https://user-images.githubusercontent.com/19573579/232228775-051421aa-515d-4708-8928-ab4d7f05ae74.mov

I would like to work on it, if accepted. Thanks.

matt-aitken commented 1 year ago

This would be great to do. Remix'suseTransition is built to do this: https://remix.run/docs/en/1.15.0/hooks/use-transition#usetransition

abhaykumarvats commented 1 year ago

@matt-aitken Yes, I had the same approach in mind. Thanks for the suggestion. Just one question: What should be the label of button while it's in loading state?