-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add fill_container argument for a responsive spinner ui container #77
base: master
Are you sure you want to change the base?
Conversation
… and shrink with the parent container
Thanks for looking into this and taking the initiative to find the problem and possible fix! I took a while to respond because I don't know how I feel about this. Something about this just doesn't feel clean. That's not your fault - I think htmltools/bslib in general is getting a little bloated and causing its too many dependencies to be very tightly coupled with it. It looks like the required CSS ( In general, the loader does automatically try to take up the space of its parent (you can see that with |
+1 for this. The spinners are otherwise unusable with bslib cards. Unfortunately the work around that I had just stopped working with some htmltools update I did I guess...
That doesn't even work any more :( |
It would be nice if the default behavior of an output using a spinner was just the same as the output without the spinner—i.e., no additional |
I appreciate all the input here, but I think I'm still going to wait a little longer before dealing with this. I feel it's still too early to try to adhere to bslib's new features simply because bslib and htmltools are going through so many changes at the moment and bslib hasn't stabilized yet. bslib seems to be having breaking changes in almost every release, and it looks like the UI layout functionality is still trying to figure itself out. I'll revisit this when bslib and its counterparts (htmltools/shiny) seem more stable. |
Totally agree. It has become much bigger than its original scope. Hoping it becomes more stable because bslib is one of the only consistently maintained package that is working to improve the state of high-level shiny UI components. |
Hi Dean,
Related to #76, I investigated the issue and it turns out that htmltools 0.5.4 added some new css classes that "are allowed to grow and shrink when their parent is opinionated about their height". The two main classes are "html-fill-item" and "html-fill-container".
So, I added a boolean argument to the withSpinner function that appends these css classes to the spinner container.
Obviously this requires to import the more recent htmltools update (>= 0.5.4).
Reprex:
Let me know if this is a good addition to the shinycssloaders package.
Also, this might help get rid of the proxy.height argument since the spinner will always fit the children? But I'm not sure about that since I haven't done enough with the proxy.height argument
Best,
Khaled