Skip to content
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

[Bug]: CSS stylesheet broken #434

Closed
1 task done
nickgrealy opened this issue Apr 26, 2023 · 4 comments
Closed
1 task done

[Bug]: CSS stylesheet broken #434

nickgrealy opened this issue Apr 26, 2023 · 4 comments
Labels

Comments

@nickgrealy
Copy link

nickgrealy commented Apr 26, 2023

Guidelines

  • I agree to follow this project's Contributing 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?

@nickgrealy nickgrealy added the bug label Apr 26, 2023
@nickgrealy nickgrealy changed the title [Bug]: CSS stylesheets broken [Bug]: CSS stylesheet broken Apr 26, 2023
@vibalre
Copy link
Member

vibalre commented Apr 26, 2023

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
Copy link
Author

nickgrealy commented Apr 26, 2023

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
Copy link
Member

@nickgrealy @vibalre the CDN resources are back.

@nickgrealy
Copy link
Author

Thanks @jakubnowicki.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants