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

Package not working with shiny 1.4 #14

Open
luismurao opened this issue Nov 30, 2019 · 8 comments
Open

Package not working with shiny 1.4 #14

luismurao opened this issue Nov 30, 2019 · 8 comments

Comments

@luismurao
Copy link

I have tried to run the example in the readme and for some reason, it seems that the package is not working with the new version of shiny (1.4.0).

@MarkEdmondson1234
Copy link
Owner

MarkEdmondson1234 commented Nov 30, 2019 via email

@luismurao
Copy link
Author

There are no error messages everything seems to work normally, but the taps linking to the functionalities of the dashboard don't work.

@DivadNojnarg
Copy link
Collaborator

The point is that shiny 1.4 now relies on query > 3, whereas genteellyShiny has only query 1.x...

@MarkEdmondson1234
Copy link
Owner

@DivadNojnarg is it possible to update the jQuery in the package, or will it break other stuff?

@DivadNojnarg
Copy link
Collaborator

DivadNojnarg commented Dec 20, 2019

It will be pretty complex to update since the gentelella admin template has Bootstrap 4 and not 3. I am not sure they still have the 3 branch. Anyway, shiny 1.4 has an option to only use jQuery 1.x but in our case, it also seems that the shiny Bootstrap version is slightly different than that of gentelellaShiny.

options(shiny.jquery.version=1)
library(shiny)
 library(gentelellaShiny)
 library(shinyWidgets)

shinyApp(
  ui = gentelellaPageCustom(
   title = "Shiny Gentelella",
   navbar = gentelellaNavbar(
    navbarItems = notif(
     id = "menunotif",
     icon = icon("envelope-o"),
     status = "primary",
     expanded = FALSE,
     lapply(X = 1:5, FUN = function(i) {
      notifItem(
       title = "John Doe",
       date = "3 min ago",
       img = paste0("https://image.flaticon.com/icons/svg/163/16382", i,".svg"),
       "Film festivals used to be do-or-die moments
       for movie makers. They were where..."
      )
     })
    )
   ),
   sidebar = gentelellaSidebar(
    uiOutput("profile"),
    sidebarDate(),
    sidebarMenu(
     sidebarItem(
      "Tab 1",
      tabName = "tab1", 
      icon = tags$i(class = "fas fa-chart-bar"), 
      badgeName = "new",
      badgeStatus = "danger"
     ),
     sidebarItem(
      "Tab 2",
      tabName = "tab2", 
      icon = tags$i(class = "fas fa-info")
     )
    )
   ),
   body = gentelellaBody(
    tabItems(
     tabItem(
      tabName = "tab1",
      fluidRow(
       column(
        width = 4,
        align = "center",
        sliderInput(
         "obs",
         "Number of observations:",
         min = 0,
         max = 1000,
         value = 500
        )
      ),
      column(
       width = 8,
       align = "center",
       plotOutput("distPlot")
      )
     )
     ),
     tabItem(
      tabName = "tab2",
       jumbotron(
        title = "Hello, world!",
        "This is a simple hero unit, a simple jumbotron-style
        component for calling extra attention to featured
        content or information."
       )
      )
     )
   ),
   footer = gentelellaFooter()
  ),
  server = function(input, output, session) {
   output$distPlot <- renderPlot({
    hist(rnorm(input$obs))
   })
   
   counter <- reactiveValues(connect = 0)
   
   observeEvent(counter$connect == 0, {
    inputSweetAlert(
      session = session, 
      inputId = "name",
      title = "What's your name ?"
    )
   })
   
   output$profile <- renderUI({
    sidebarProfile(
     name = input$name,
     img = "https://image.flaticon.com/icons/svg/236/236831.svg"
    )
   })
  }
 )

The above code works. However, this is definitely time to think about upgrading.

@luismurao
Copy link
Author

@DivadNojnarg Thak you for the update

@MarkEdmondson1234
Copy link
Owner

Thanks, merged the pull with the message.

@chrlryo
Copy link

chrlryo commented Sep 3, 2020

Here is the error message I get:
Error in alert(width = 3, status = "warning", title = "An alert", "Best check yo self,\n you're not looking too good.") : unused arguments (width = 3, status = "warning", title = "An alert")

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

No branches or pull requests

4 participants