Semantic UI in Shinyproxy loses formatting

The semantic UI package for Shiny allows you to create professional looking web apps, using the widely used semantic UI standard. See the package here: https://github.com/Appsilon/shiny.semantic

When I load a simple semantic-ui formatted Shiny app in shinyproxy, the formatting is lost. I think it might have something to do with the fact that the shiny app is loaded through an iframe (the infallible_shirley/ directory in my case). I’m not sure what the problem could be - anyone encounted something similar? Here is a basic shiny app with semantic ui:

library(shiny)
library(shiny.semantic)
library(plotly)

ui <- shinyUI(semanticPage(
  suppressDependencies("bootstrap"),
  tabset(tabs=
           list(
             list(menu="First Tab",content=
                    div(class = "ui grid",
                        div(class = "six wide column",
                            div(class = "ui raised segment", style="margin-left: 10px; width: 100%",
                                a(class="ui blue ribbon label", "Shiny semantic is beautiful"),
                                plotOutput("plot1"))))),
             list(menu="Second Tab",content=plotlyOutput("plot2"))
           )
  )
))
server <- shinyServer(function(input, output) {
  output$plot1 <- renderPlot(plot(1,1))
  
  output$plot2 <- renderPlotly(plot_ly(mtcars, x=~mpg, y=~cyl, width = "100%"))
})

shiny::shinyApp(ui, server)
1 Like

So I just tried to start from scratch, to see if I made a mistake somewhere. I’m now getting the error message:

Step 7/9 : COPY Rprofile.site /usr/lib/R/etc/
COPY failed: stat /var/lib/docker/tmp/docker-builder359139439/Rprofile.site: no such file or directory

When I try to build (sudo docker build -t me/my_app .) using the latest openanalytics/r-base docker repo. How can I debug this? I’m not sure how this managed to sudden break…

Ok, the Rprofile.site file missing was because I forgot to include it from the example app.

The shiny-semantic package now works. Starting with a clean VM and shiny proxy install fixed things. I have no idea why.

1 Like

Thanks for confirming everything works fine.

I don’t mean to spam too much, but if anyone is running into the same problem, the reason is that some poorly-designed Shiny packages load dependencies via the htmlwidgets package via http. My problem arose when I secured my site (https). When you do this, you can’t load stylesheets etc. from a http site with a different domain name. This is a cross-domain violation that isn’t allowed by https.

1 Like