Omkar-Sonawane-23 / VedicVani

https://vedic-vani.vercel.app
27 stars 41 forks source link

Introduce Loading Animation for Next/Generate Buttons #103

Closed Sujith-Srikar closed 6 months ago

Sujith-Srikar commented 6 months ago

Is your feature request related to a problem? Please describe.

When users repeatedly click the "Next" or "Generate" buttons multiple times in quick succession, the interface exhibits unexpected behavior due to the rapid change of text content. This can lead to confusion and a poor user experience. To address this issue and provide a smoother interaction, I propose introducing a loading animation to indicate that the action is in progress.

Describe the solution you'd like

  1. Implement a loading animation, such as a spinner or progress bar, adjacent to the "Next" and "Generate" buttons.
  2. Upon clicking the buttons, display the loading animation to signify that the request is being processed.
  3. Disable the buttons temporarily to prevent multiple rapid clicks while the operation is ongoing.
  4. Once the operation completes, hide the loading animation and re-enable the buttons.

Video Explanation

https://github.com/Omkar-Sonawane-23/VedicVani/assets/136736119/b89c89dc-5886-4ce7-a8ad-dafa3639db6c

@Omkar-Sonawane-23 Please assign me this issue under GSSoC'24. I am interested in this to work on. Thank You!

rahul1841 commented 6 months ago

Improved User Experience: Providing visual feedback ensures users are aware that their request is being processed, reducing confusion and frustration. Enhanced Interface Clarity: Disabling the buttons during processing prevents unexpected behavior due to rapid clicks, resulting in a more stable interface. @Omkar-Sonawane-23, I have extensive experience in enhancing user interfaces and handling asynchronous operations effectively. I am confident in my ability to implement this feature to improve our application's user experience. Could you please assign this task to me? I am eager to contribute to solving this issue and enhancing the overall interaction quality.

sameer-soni commented 6 months ago

@rahul1841 Thanks for your feedback and your interest to work on improving this. Speaking from a user's perspective, what if I want to skip to the next 4th shlok or summary so I spammed the next button 4 times to reach there fast, if the button would be disabled after each click, user will have to wait longer and can eventually annoy him. This was my perspective from a user's pov.

Sujith-Srikar commented 6 months ago

Hence my solution is to make a loading animation so that the user experience will increase

sameer-soni commented 6 months ago

@Sujith-Srikar okay, I'm assigning it to you, add the loading animation.