You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to have a prompt that has a TTL/timeout with a visual countdown, the user has N seconds/minutes to provide an input before the process exits.
I'd like to be able to do this, as I prompt a user Are you sure? before proceeding with a destructive change to a remote data store. However, consider the scenario where the user never provides an input and the prompt hangs (they go to get a coffee and forget). It's quite possible that the original information they were acting on is now wrong (i.e. the data store has since been updated). I want to narrow the window of how long the prompt can hang.
Describe alternatives you've considered
I've attempted to use the built in functionality of prompt combined with timeouts and intervals but I just can't seem to get a good UX. I can make the prompt timeout but I can't visualise that to the user with a countdown that dynamically updates:
Describe the solution you'd like
I would like to have a prompt that has a TTL/timeout with a visual countdown, the user has N seconds/minutes to provide an input before the process exits.
I'd like to be able to do this, as I prompt a user
Are you sure?
before proceeding with a destructive change to a remote data store. However, consider the scenario where the user never provides an input and the prompt hangs (they go to get a coffee and forget). It's quite possible that the original information they were acting on is now wrong (i.e. the data store has since been updated). I want to narrow the window of how long the prompt can hang.Describe alternatives you've considered
I've attempted to use the built in functionality of prompt combined with timeouts and intervals but I just can't seem to get a good UX. I can make the prompt timeout but I can't visualise that to the user with a countdown that dynamically updates:
Example
From charmbraclets bubbletea TUI package on Go
https://github.com/charmbracelet/bubbletea
The text was updated successfully, but these errors were encountered: