As a user I would like a visual indicator of how long until the next refresh synced with the designated interval, such as a countdown timer.
Auto-refresh is an excellent Streamlit component extension that solves a frequent issue - refreshing Streamlit component or page in a non-blocking manner.
Because auto-refresh utilizes an interval timer, having a synced visual indicator would be a natural functionality extension.
Details:
Add optional html/js timer functionality.
Allow initialization option to turn countdown timer on - defaults to False.
Allow initialization option to specify desired countdown timer text.
I ran the gamut trying time.sleep, asyncio.sleep, and html/js based timers, but they all either blocked or were out of sync with the interval. I don't actually care that the interval is exactly the specified amount of time (5 minutes, for example), but I'd like for the countdown timer to be generally in-sync with the interval, and more importantly, clear and reset when the interval resets.
Overview:
Details:
Proposed Solution:
Notes: