Appsilon / shiny.semantic

Shiny support for powerful Fomantic UI library.
http://appsilon.github.io/shiny.semantic
Other
497 stars 96 forks source link

[Bug]: CSS stylesheet broken #434

Closed nickgrealy closed 1 year ago

nickgrealy commented 1 year ago

Guidelines

Project Version

latest

Platform and OS Version

macOS

Existing Issues

88

What happened?

A CDN resource is no longer available - 404 not found.

The CSS file is missing: https://d335w9rbwpvuxm.cloudfront.net/2.8.3/semantic.min.css

Note: The JS file however, DOES exist: https://d335w9rbwpvuxm.cloudfront.net/2.8.3/semantic.min.js

UPDATE: JS file now missing too: https://d335w9rbwpvuxm.cloudfront.net/2.8.3/semantic.min.js

Steps to reproduce

I'm currently maintaining a Shiny project on behalf of a client - this has started occurring to an app currently in production.

Expected behavior

No changes - that the CDN would continue to provide the file.

Attachments

No response

Screenshots or Videos

No response

Additional Information

I can't find any reference to d335w9rbwpvuxm or semantic.min.css in the source code... which I assume means it's a dynamic import?

As a project maintainer - this makes it very difficult to troubleshoot.

Secondly, self hosting the files should be the default. I realise there are performance implications, but introducing an external dependency which requires internet connectivity is not ideal.

I can see from this config page, that we have an option to self host the files using shiny.custom.semantic.cdn or even shiny.semantic.local...

Can someone point me to where I can grab the files and set this up please?

vibalre commented 1 year ago

Working on a PR to fix this issue, we are planning to use library 2.9.2 to solve this.

As a quick fix, you can try this: options("shiny.custom.semantic.cdn" = "https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2").

nickgrealy commented 1 year ago

Thanks @vibalre , confirming that workaround is working.

For future self - here's the dockerfile changes.

# overwrite config
RUN echo "local(options(shiny.port = 3838, shiny.host = '0.0.0.0', shiny.custom.semantic.cdn = 'https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2'))" > /usr/lib/R/etc/Rprofile.site

OR better yet, self host.

Download the zip, unpack the dist/ folder to app/www/semantic-2.8.3.

RUN echo "local(options(shiny.port = 3838, shiny.host = '0.0.0.0', shiny.custom.semantic = '/home/app/app/www/semantic-2.8.3'))" > /usr/lib/R/etc/Rprofile.site
jakubnowicki commented 1 year ago

@nickgrealy @vibalre the CDN resources are back.

nickgrealy commented 1 year ago

Thanks @jakubnowicki.

I think I'll continue to use self hosted going forwards.