tisn.app icon indicating copy to clipboard operation
tisn.app copied to clipboard

Manage the loading status better.

Open AlbertoPdRF opened this issue 4 years ago • 5 comments

Right now there are some issues with how the loading status of components with multiple hooks is handled, as when the first hook finishes it will update the state and the user will be misleaded to think that all loading has ended when in fact that's not the case. Instead of using a single boolean to manage the loading status, it would be better to have an object of booleans to manage the loading status of each hook and use that to determine if all loading has ended or not.

AlbertoPdRF avatar May 24 '20 15:05 AlbertoPdRF

Investigate if instead of using an object is better to use a set for this.

AlbertoPdRF avatar Jun 18 '20 16:06 AlbertoPdRF

May I know which page is this being affected?

idiglove avatar Sep 05 '20 13:09 idiglove

Hi @idiglove! 👋 Thanks for your interest on this issue!

There are multiple pages being affected by this, it probably happens on any page using multiple useEffect hooks. You can see one example in the Chat component. If you want to work on this issue, I could help you make a list of which components need to be fixed, or anything you need really 😊

AlbertoPdRF avatar Sep 06 '20 11:09 AlbertoPdRF

@AlbertoPdRF Loading seems fine to me. I have also sent big messages through chats. How can I replicate this issue?

idiglove avatar Oct 12 '20 12:10 idiglove

To try and see the issue more clearly, you could set timeouts on the different useEffect hooks and see how the loading bar disappears even when the application is still loading some stuff. Feel free to ping me on Slack if you want me to take a look to this with you!

AlbertoPdRF avatar Oct 12 '20 17:10 AlbertoPdRF