The Flagsmith organisation with the "Disabled Flags" project selected shows a spinner that never resolves.
Why it can hang
isLoading is loadingOrganisation || loadingUsage || loadingLimit. There is no upper bound on any of them. A request that never settles, rather than failing, leaves the page spinning with nothing to say.
A request that errors is handled: isError renders "Usage could not be loaded". The gap is a request that neither resolves nor rejects, or one slow enough to look that way.
What to do
- find out what the usage endpoint does for that project, since a response that never arrives is a backend problem first
- give the page a way out regardless: after some threshold, say the data is taking longer than expected rather than spinning indefinitely
- an indefinite spinner is the least useful state on the page, and it is the one we currently fall into by default
Done when
No combination of organisation and project leaves the page spinning with no explanation.
The Flagsmith organisation with the "Disabled Flags" project selected shows a spinner that never resolves.
Why it can hang
isLoadingisloadingOrganisation || loadingUsage || loadingLimit. There is no upper bound on any of them. A request that never settles, rather than failing, leaves the page spinning with nothing to say.A request that errors is handled:
isErrorrenders "Usage could not be loaded". The gap is a request that neither resolves nor rejects, or one slow enough to look that way.What to do
Done when
No combination of organisation and project leaves the page spinning with no explanation.