Open luismurao opened 4 years ago
Could you show any error messages you get?
From: Luis Osorio notifications@github.com Sent: Saturday, November 30, 2019 6:26 PM To: MarkEdmondson1234/gentelellaShiny Cc: Subscribed Subject: [MarkEdmondson1234/gentelellaShiny] Package not working with shiny 1.4 (#14)
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).
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkEdmondson1234/gentelellaShiny/issues/14?email_source=notifications&email_token=AAYCPLBDAFW5M3YS6CHCWJ3QWKO5RA5CNFSM4JTHRN62YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H5ANNCQ, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYCPLDLLYGP64NLRDTDZI3QWKO5RANCNFSM4JTHRN6Q.
There are no error messages everything seems to work normally, but the taps linking to the functionalities of the dashboard don't work.
The point is that shiny 1.4 now relies on query > 3, whereas genteellyShiny has only query 1.x...
@DivadNojnarg is it possible to update the jQuery in the package, or will it break other stuff?
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.
@DivadNojnarg Thak you for the update
Thanks, merged the pull with the message.
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")
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).