I have my app with backend as supabase. For efficient navigation i’ve applied the usual suspects like pagination, preserve on navigation, indexing on backend queries, auto-fetch is off for collections and collections are fetched on need basis(that too only the columns we need), real time being disabled etc.
My issue is : When the app loads the first time in a day or after a few days or when its republished after a bug fix or upgrade, all pages take a few seconds to load (cause probably all the front end stuff is getting downloaded to the cache of the device again), but once each page is loaded once in a session, the consequent navigations are snappy i.e. you don’t need a loading screen/skeleton loading/loading icon.
Now if i add a loading icon with a fixed time, it runs everytime - even when you don’t need it, which is again not useful, cause i only need the loading to happen when a page needs it so a user knows when the page load is taking time and when its not.
Hence - Is there a way to get loading appear only when needed ?
I use the built in page loader action and it works great. Essentially when a user clicks on a page link a small loading bar appears at the top of the screen and shows the loading status. When a page loads quickly, it only appears for a split second, often so fast its not even noticeable.
Not exactly what your looking for, as this solution still technically always displays a page loader, but I have had no complaints or confusion from our users regarding load times.
@ruak, if you’re using a loading icon, I would recommend binding its display to the isLoading variable of one of your table views as described here. If you’re still using old colletions, the related collection variable may be named isFetching
In the docs, you’ll see there’s also another approach where you trigger the condition with a workflow. That requires a bit more manual setup but should still suit your use case more than a time delay. Apologies for the outdated image to create a variable. I’ll update it asap: