Skip to content

Commit

Permalink
cleanup dead links
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg committed Apr 9, 2024
1 parent a9aacc7 commit e723367
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 39 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Suggests:
knitr,
rmarkdown,
jsonlite
URL: https://github.com/RinteRface/shinydashboardPlus, https://rinterface.com/shiny/shinydashboardPlus/
URL: https://github.com/RinteRface/shinydashboardPlus, https://shinydashboardPlus.rinterface.com/
BugReports: https://github.com/RinteRface/shinydashboardPlus/issues
Encoding: UTF-8
RoxygenNote: 7.3.1
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ or redirect at the top of the page
## Breaking changes
- change argument name in `dropdownItem()` (`boxPlus()`): "target" is replaced by "url".
- Widely simplify the `rightSidebar()` function: remove `rightSidebarTabList()`, `rightSidebarTabItem()` and
`rightSidebarPanel()` from the user interface. See [here](https://rinterface.github.io/shinydashboardPlus/articles/rightSidebar.html) to discover how to set up
`rightSidebarPanel()` from the user interface. See [here](https://shinydashboardplus.rinterface.com/articles/controlbar#controlbar) to discover how to set up
a new `rightSidebar()`
## Major changes
- add a "width" argument to the `rightSidebar()` (set to 230 pixels by default) to
Expand Down
5 changes: 4 additions & 1 deletion R/useful-items.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ accordionItem <- function(..., title, status = NULL, collapsed = TRUE,
#' })
#' observe(print(input$accordion1))
#' observeEvent(input$accordion1, {
#' showNotification(sprintf("You selected accordion N° %s", input$accordion1), type = "message")
#' showNotification(
#' sprintf("You selected accordion N° %s", input$accordion1),
#' type = "message"
#' )
#' })
#' }
#' )
Expand Down
5 changes: 4 additions & 1 deletion man/accordion.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 32 additions & 35 deletions vignettes/improved-boxes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -56,37 +56,37 @@ server <- function(input, output, session) {
req(!input$mybox$collapsed)
plot(rnorm(200))
})
output$box_state <- renderText({
state <- if (input$mybox$collapsed) "collapsed" else "uncollapsed"
paste("My box is", state)
})
observeEvent(input$toggle_box, {
updateBox("mybox", action = "toggle")
})
observeEvent(input$remove_box, {
updateBox("mybox", action = "remove")
})
observeEvent(input$restore_box, {
updateBox("mybox", action = "restore")
})
observeEvent(input$update_box, {
updateBox(
"mybox",
action = "update",
"mybox",
action = "update",
options = list(
title = h2("New title", dashboardLabel(1, status = "primary")),
status = "danger",
status = "danger",
solidHeader = TRUE,
width = 4
)
)
})
observeEvent(input$mybox$visible, {
collapsed <- if (input$mybox$collapsed) "collapsed" else "uncollapsed"
visible <- if (input$mybox$visible) "visible" else "hidden"
Expand All @@ -107,7 +107,7 @@ We call the `updateBox()` function, specifying the action to accomplish:

Knowing the state of a box significantly opens new possibilities within the application, thereby increasing interactivity. Additionally, the toggle animation has been speed up (from 0.5s to 0.1s) so as to reduce the latency.

If you want to know more about the underlying mechanisms, have a look at the box widget [documentation](https://adminlte.io/docs/2.4/js-box-widget).
If you want to know more about the underlying mechanisms, have a look at the box widget [documentation](https://github.com/ColorlibHQ/AdminLTE/tree/86990d5b48f5b9d747ee14d67df7bb200ffc6f85/documentation).

<div class="marvel-device ipad black">
<div class="camera"></div>
Expand Down Expand Up @@ -140,21 +140,21 @@ shinyApp(
header = dashboardHeader(),
body = dashboardBody(
box(
title = "Update box sidebar",
closable = TRUE,
title = "Update box sidebar",
closable = TRUE,
width = 12,
height = "500px",
solidHeader = FALSE,
solidHeader = FALSE,
collapsible = TRUE,
actionButton("update", "Toggle card sidebar"),
sidebar = boxSidebar(
id = "mycardsidebar",
width = 25,
sliderInput(
"obs",
"obs",
"Number of observations:",
min = 0,
max = 1000,
min = 0,
max = 1000,
value = 500
)
),
Expand All @@ -165,15 +165,14 @@ shinyApp(
),
server = function(input, output, session) {
observe(print(input$mycardsidebar))
output$distPlot <- renderPlot({
hist(rnorm(input$obs))
})
observeEvent(input$update, {
updateBoxSidebar("mycardsidebar")
})
}
)
```
Expand Down Expand Up @@ -201,11 +200,11 @@ shinyApp(
dashboardSidebar(),
dashboardBody(
box(
title = "Closable Box with dropdown",
closable = TRUE,
title = "Closable Box with dropdown",
closable = TRUE,
width = 12,
status = "warning",
solidHeader = FALSE,
status = "warning",
solidHeader = FALSE,
collapsible = TRUE,
dropdownMenu = boxDropdown(
boxDropdownItem("Click me", id = "dropdownItem", icon = icon("heart")),
Expand Down Expand Up @@ -284,14 +283,14 @@ shinyApp(
navPills(
id = "pillItem",
navPillsItem(
left = "Item 1",
left = "Item 1",
color = "green",
right = 10
),
navPillsItem(
left = "Item 2",
left = "Item 2",
color = "red",
icon = icon("angle-down"),
icon = icon("angle-down"),
right = "10%"
)
),
Expand All @@ -301,18 +300,17 @@ shinyApp(
title = "userBox"
),
server = function(input, output) {
observeEvent(input$pillItem, {
if (input$pillItem == 2) {
showModal(
modalDialog("A modal")
)
}
})
observeEvent(input$pillItem, {
showNotification(
sprintf("You clicked on pill N° %s", input$pillItem),
sprintf("You clicked on pill N° %s", input$pillItem),
type = "warning",
duration = 1
)
Expand Down Expand Up @@ -497,10 +495,10 @@ shinyApp(
fluidRow(
column(
width = 6,
uiOutput("active_side"),
uiOutput("active_side"),
actionButton("toggle", "Toggle flip box"),
flipBox(
id = "myflipbox",
id = "myflipbox",
trigger = "hover",
width = 12,
front = div(
Expand Down Expand Up @@ -548,18 +546,17 @@ shinyApp(
)
)
),
server = function(input, output, session) {
output$active_side <- renderUI({
side <- if (input$myflipbox) "front" else "back"
dashboardBadge(side, color = "blue")
})
output$active_side_2<- renderUI({
output$active_side_2 <- renderUI({
side <- if (input$myflipbox2) "front" else "back"
dashboardBadge(side, color = "blue")
})
observeEvent(input$toggle, {
updateFlipBox("myflipbox")
})
Expand Down

0 comments on commit e723367

Please sign in to comment.