covid19india / covid19india-react

Tracking the impact of COVID-19 in India
https://www.covid19india.org
MIT License
6.86k stars 3.41k forks source link

Adding Skip-forward ▶️ and Skip-backward ◀️ to timeline 📅 #2479

Closed malay-satapathy closed 3 years ago

malay-satapathy commented 3 years ago

Is your feature request related to a problem? Please describe. While using the website to scroll on the timeline to see past or future date records, there is no button to click for going to the previous or next day. Going to the previous/next date is possible only in two ways:

  1. Clicking on the date 📅 below the FastForward button.
  2. Pressing previous/next keys from the keyboard. ( P.S ~ I realised this only when I check the code ) ⌨️

Describe the solution you'd like A Skip forward ( ▶️ ) and Skip backward ( ◀️ ) button will be added to the Timeline component. Upon clicking on those buttons, users can navigate to previous or next dates.

Describe alternatives you've considered The alternatives to the solution is by the two possible ways mentioned above. The feature I am trying to add will be the cherry on the cake! 🍒 😄

Additional context I made the changes in my forked branch and the video 🎥 for same is attached below.

https://user-images.githubusercontent.com/43433334/119225322-b8e07f00-bb20-11eb-9340-b4624121c37e.mp4

malay-satapathy commented 3 years ago

@shuklaayush Tagging you here as I saw the Timeline ⌛ component is developed and maintained by you. Let me know if I can add this feature?

shuklaayush commented 3 years ago

@malay-satapathy Appreciate the request, but this doesn't seem to simplify things. On the contrary, it'll probably add more redundancy. If I have to click on the skip-forward button now to go to the next date, why won't I just click on the date itself?

malay-satapathy commented 3 years ago

@shuklaayush Agree with your rationale! It will just increase the cognitive load on the end-user using the application.

I had another feature improvement for the Timeline component. The speed of transition from one date to the end date is slow! We can have speed controls for dates transition. What do you feel about this enhancement?

shuklaayush commented 3 years ago

I think the transition is slow because of the heavy rerender. If you switch between dates quickly without stopping at a date, the transition should be smooth. If you can somehow reduce the rerendering time though, then that would be really welcome.

Also, one can always use the calendar to switch between dates that are far apart. image