msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
20 stars 12 forks source link

Cold chain: Date picker can't be used while data is loading #2758

Open fergie-nz opened 8 months ago

fergie-nz commented 8 months ago

What went wrong? 😲

While data for coldchain monitoring graph is rendering, the date range of the graph can't be changed.

This is a little bit annoying if you select a wide range by mistake, and need to wait for it to load.

This might be a low priority issue, but could be very annoying if there are users with very low performance machines which take a long time to load.

This is partially related to issue #2757 because it might solve it getting stuck.

https://github.com/msupply-foundation/open-msupply/assets/90807420/278d98b1-2799-4cb6-9d6c-0df3ee71f59d

Expected behaviour 🤔

Date range can be edited to reset query even in loading state

How to Reproduce 🔨

Steps to reproduce the behaviour:

Go to coldchain -> monitoring in omSupply Select a date range Attempt to change the selection while the graph is rendering

mark-prins commented 8 months ago

Interesting - I'd never noticed that before! If any of the react query calls takes a long time, then all of the components aside from the AppDrawer are unresponsive while loading. Have tried adding a delay to the outbound shipment list and that behaves the same. I'd like to know why - given that these are async calls I wouldn't expect this to happen. Have had a bit of a look but haven't found the cause so far.