atk4 / ui

Robust and easy to use PHP Framework for Web Apps
https://atk4-ui.readthedocs.io
MIT License
440 stars 104 forks source link

Show loader on button once clicked until loaded/finished #2143

Open mvorisek opened 5 months ago

mvorisek commented 5 months ago

related with https://github.com/atk4/ui/pull/2142 change

In the future, it should be solved by a loader added to the triggering element (like button), the triggering element should be probably also disabled until the action is complete

This is quite essential to have especially in cases if modal is slow to load and it should be restricted to call it multiple times in parallel.

Currently nothing is shown until the modal is loaded, UX should be improved by showing loaded on the triggering button until the action is completed/loaded to keep the user informed the action click triggered an action.

mvorisek commented 5 months ago

https://github.com/atk4/ui/blob/5.0.0/demos/javascript/js.php#L59 demo already shows loader on a button, so let's unify this across all "triggering clickable components".