-
-
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
Using shinycssloaders inside an rmarkdown #8
Comments
Do you have an example of how you apply the spinner in When I will have a bit more time I'll try to investigate if this can be circumvented somehow... |
I don't know if it is documented anywhere, but you can use the
|
The CSS for the loader doesn't seem to be inserted into the document. |
I have added a new branch called Limitations are the following:
A working example is given here. |
Hi @andrewsali , thank you very much for such a useful library. I could add shinyccsloaders in my flexdashboard based document. However, I would like to know how to generate a new Could you please give me a hint about how to use the Regards. |
Is this possible to use with flexdashboard? Following from the example you linked, I don't understand how to add it to the yaml when I am not outputting an html_document.
|
shinycssloaders does not officially support flexdashboards because they are not shiny apps. It's possible that they might work with some special hacking, if someone here is able to get it to work and post their solution here that would be great, but it might not be possible. |
Cool, thank you! I definitely will not be the one to figure that out since I thought a flexdashboard was a shiny app, but hopefully someone else will :) |
flexdashboard is rmarkdown. The line between rmarkdown and shiny keeps getting fuzzier with time, but it's still not shiny, sorry :) |
Thanks! This explains a lot. |
Hi @melissagwolf @daattali . I was able to use it with Flexdashboard. I just did it the same way @andrewsali explained in his example. What is the exact problem you are having? My yaml looks something like this: title: "Dynamic Model Fit"
output:
flexdashboard::flex_dashboard:
orientation: columns
includes:
in_header: cssloaders_in_header.html
runtime: shiny |
@pernaletec what version of shinycssloaders did you use? The master branch, or the special branch that @andrewsali created? |
My main reference was this example: https://github.com/daattali/shinycssloaders/tree/rmarkdown/example/rmarkdown |
Thanks for sharing |
@pernaletec @daattali Could one of you help me install the version from the special branch? I'm getting a pandoc error without it. Apologies for the entry level question! I tried this:
Downloading GitHub repo daattali/shinycssloaders@master |
"rmarkdown" is not a subdirectory, it's a branch. So don't use the "subdir" parameter. I forget what the right parameter is for installing a specific branch, it might be "ref". |
Ah. I got it to install, but I had to bypass the update for glue that was requested by the branch (only the binary version is available and my computer won't install it). This causes shinycss to fail when I run @andrewsali 's demo: pandoc.exe: C:\Users\missg\AppData\Local\Temp\RtmpMBZ78l\cssloaders_in_header.html: openBinaryFile: does not exist (No such file or directory) Warning: Error in : pandoc document conversion failed with error 1 C'est la vie - I will find another package! Thanks all for your help - I really appreciate it. |
Hi, this package and thread is new to me, but after some trial and error I sort of succeeded in my application: I largely followed @andrewsali instructions, which worked mostly from the beginning. The only two things didn't work well were the spinner was on the very top edge of the container, and my plotlyOutput(height = "100%") was changed to default 400px. I did the following to correct the two issues: This worked for my narrow-scoped application, but I didn't test for broader situations. Best, |
Thanks! If you think you got it working very well in a robust way, feel free to add a small section to the README telling future people how to do this :) |
Hi @daattali , thanks for your comment. I did a one-off trouble-shoot around the existing code, and provided the necessary modifications to make it successfully run in my only application. I'd definitely love to contribute more and do more robust testing. However, the fact that this function is not in the master branch (it's only in the rmarkdown branch last updated three years ago), makes it hard to contribute. Do you have plan to merge the rmarkdown branch to master? Best, |
You're right, I forgot this was all dependent on another branch. I suppose the best solution if we wanted to support Rmd would be to create a separate function and separate files, in the master branch, that would work with rmd. If anybody wants to take on that initiative, I would welcome that. |
I just checked, there's no merge conflict between rmarkdown and master branches, do you want me to create a pull request, or it's easier for you to do it. I could take a better look at the rmd_in_header function by @andrewsali and hopefully improve upon. |
I'll let you take care of that :) Bring the necessary files in and please do some testing to make sure the regular withSpinner isn't affected |
For completion, here is the solution @andrewsali (original author) proposed years ago (I'm copying it here because I want to clean up stale git branches). It includes 3 files: File 1:
|
@mkinare @kent37 @pernaletec @xiangnandang @melissagwolf @M-Z @intael @robbfitzsimmons @seabbs @lvalnegri @fawda123 @juliasilge @pernaletec @razielar @MarcoFelipeKing The latest github version of shinycssloaders should now support rmarkdown. Can you please try it and let me know if it works or not for you. Thanks! |
My simple example works. |
It works well for me! |
I am using flexidashboard and shinycssloader v0.2.0. When I try to get the loading animation I get the message "Loading..." instead of the animation.
The text was updated successfully, but these errors were encountered: