tarkah / tickrs

Realtime ticker data in your terminal 📈
MIT License
1.2k stars 59 forks source link

don't render until fully loaded #29

Closed tarkah closed 4 years ago

tarkah commented 4 years ago

this partially addresses #23 & #22 (the other part being retries on the API request if failed). Those issues were caused by not having 100% of the needed API data. This holds off on rendering until we get all the needed data so things don't look incorrect / partial / broken.

It'd be nice to add some sort of loading indicator. On my connection, loading takes less than a second so it won't be noticeable. But if for some reason loading the API data take a minute, it'd be nice to have a pronounced indicator.

tarkah commented 4 years ago

@daniel-j-h This is how it'll look until 100% of the data is fetched. You won't see any partial plot points / miscalculations anymore. It will only show up once all the API data is fetched. Note the "Loading..." as the name.

I really want to see if I'm able to add some sort of cool animation to go along with the loading state. Though I'll never notice it with my connection, on less reliable connections it might look nice.

image

tarkah commented 4 years ago

I've make it one step better and added a small animation which I think does the trick

Peek 2020-09-11 17-00

It even adds the indicator when switching time frames and it's waiting for that data to load...

Peek 2020-09-11 17-08

daniel-j-h commented 4 years ago

Sweet! :tada:

I might just have the loading problems because I'm mostly looking at the charts when I have some time e.g. after kicking off an expensive task or download / upload, and then my connection is just terrible :see_no_evil: This will be great for usability! :rocket: