Support regular background widget refresh
I, like probably many others, am using Glance as a home page and new tab page. The search bar is where I start most of my navigation (hence #706), but I am frequently waiting for widgets to refresh before anything shows up. This PR aims to address some of these issues and ensure page loads are speedy every time.
-
Predictive Widget Refresh
- Updates widgets that are outdated OR will become outdated before the next refresh cycle
- Prevents widgets from being stale when users visit pages
- Example: With 15min refresh interval, a widget expiring in 5min gets updated proactively
-
Configurable
- background-refresh-enabled (default: false) - opt-in
- background-refresh-interval (default: 15m) - customizable refresh frequency
server:
background-refresh-enabled: true
background-refresh-interval: 10m
This is awesome. Another improvement is load widgets dynamically similar to getHomepage.
Load the dashboard instantly but for custom-api widgets, allow for empty <div> placeholders while API data is being fetched. Once request is processed, inject data into the placeholder <div>s. With the option to refresh the specific custom-api widgets on an interval.