I have just released a free plugin aimed at showing a loader bar to users when you don’t know how long an event will take (i.e. you don’t know how long it will take ChatGPT to respond).
Here’s a detailed description of the plugin:
Defines the value of a loader bar. Create any custom design and change the width of the element as the returned value (“progress percentage”) of this plugin.
This is designed for events where you don’t know how long they are going to take to complete (i.e. API response times like chatGPT).
The underlying math defines two formulas. The first formula dictates the value of the loader bar from 0 to the r value and the second formula dictates the value from the r value to 100%. If the event (i.e. the API call) you’re trying to create the loader bar for never completes, the loader bar will take infinitely long to reach the r value. If the event completes in 5 seconds and the loader bar has reach 50%, say, the second formula will kick in and smoothly transition the loader bar to quickly take the remaining percentage to 100%.
f_1 is the formula governing 0 to the r value and f_2 is from the r value to 100%.
The plugin allows you to specify the following values:
x_95 = the time it takes to reach 95% of final value. This is basically how fast the loader bar starts out
k = the shape of f_1 (lower values will cause the output to approach the maximum at a much slower rate and vice versa
t_add = How long you want f_2 to run for (once the plugin switches to using f_2, the loader bar will take an additional t_add seconds to complete (i.e. reach 100%))
You can find the demo page here with a nice visual of how the plugin works:
Bubble | No-code apps (bubbleapps.io)
Here is the link to the editor:
Progress-bar-demo | Bubble Editor
Hopefully it makes your apps a bit better.