fgnass / spin.js

A spinning activity indicator
http://spin.js.org
MIT License
9.3k stars 1.02k forks source link

Ability to add a loading message below Spinner #326

Closed broot02 closed 6 years ago

broot02 commented 7 years ago

Would it be possible to add the ability to add a loading message to the spinner? I understand this is just a spinner, but it also a valid use case to use this for loading certain pages, and the ability to display a message could be useful as well. Not sure if this is a feature request at this point, or if it is more of a question as to if this should even happen.

My thought was that this could just be another option to set when initializing the spinner, such as loadingMessage, if it is set we would append it to the bottom of the spinner. I think we would need to get somewhat creative on the font size also, as the size of the spinner can differ also.

The problem is that with the positioning of the spinner it is difficult to mimic the same behavior of determining the absolute positioning, if we are trying to just append a message. Thoughts?

calcio1096 commented 7 years ago

Check out this tutorial. Good way to add a loading message. http://jigneshpatel-dotnet.blogspot.com/2013/03/waiting-spinner-for-long-running-form.html

theodorejb commented 6 years ago

This would likely be a useful feature, but I don't think it makes sense to be part of the core spin.js library. Feel free to create a new wrapper module that implements it.