-
Notifications
You must be signed in to change notification settings - Fork 49
Continuous spinner component not started on initialization #20
Comments
No, I don't think that the spinner should start immediately after initialization, because it can be initialized, but is not visible to the user. It would make more sense to start the spinner when you need it. And yes, there is no stop function. But you can solve this by simply hiding the spinner via CSS or use JavaScript to remove it from the DOM To start the loop you can simply call the loop method. // on page load
const spinners = Spinner. upgradeAllElements();
// after an action
spinners.forEach(spinner => {
spinner.loop();
}); |
Hey there, thanks for the response!
✔️ That's expected and perfectly fine.
True, but specifically for a continuous spinner, it makes no difference if it is already looping invisibly. The user can easily control visibility of the spinner with his own known methods as mentioned above. The main point though is API UX and making the usage of the component easier. The concrete case that lead to the issue was:
You see, there were two pain points that seem unnecessary in the specific case of continuous spinners. Would be cool if that could be remedied by either changing the behaviour or at least documenting the expected usage of the spinner component better. Thanks for your time! |
Well, that spinner covers several cases. It also shows a load spinner for upload or a continuous spinner. But the documentary is still expandable. But I think Audi and Strichpunkt Design are going to continue using it. When using Audi UI components I would be careful because of the missing license. But if you have an excerpt of the code snippet I might be able to help you with how to install it. (Of course with the background that you start the Continuous Spinner with |
Working on an Audi project as external contractor, so not an issue.
Thanks for the offer. We got it all working, I just wanted to share the suboptimal experience to maybe improve the developer experience a bit. |
Okay, can you close the issue? |
I still think there is someting to improve in the spinner component, so I leave it up to you to close the issue and/or create a new issue that is more actionable for you. |
When a continuous spinner is initialized, it is not started/looped. Since a continuous spinner is supposed to loop indefinitely and there exists no
stop
, it should be started automatically.Also, the spinner is not automatically initialized via
upgradeAllElements()
for no apparent reason (?).The text was updated successfully, but these errors were encountered: