-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #381 from RinteRface/add-shinylive
Add shinylive
- Loading branch information
Showing
38 changed files
with
235 additions
and
715 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ inst/examples/**/rsconnect | |
.vscode | ||
*.icloud | ||
docs | ||
|
||
/.quarto/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: bs4Dash | ||
Type: Package | ||
Title: A 'Bootstrap 4' Version of 'shinydashboard' | ||
Version: 2.3.3 | ||
Version: 2.3.4 | ||
Authors@R: c( | ||
person("David", "Granjon", email = "[email protected]", role = c("aut", "cre")), | ||
person(family = "RinteRface", role = "cph"), | ||
|
@@ -11,7 +11,7 @@ Maintainer: David Granjon <[email protected]> | |
Description: Make 'Bootstrap 4' Shiny dashboards. Use the full power | ||
of 'AdminLTE3', a dashboard template built on top of 'Bootstrap 4' | ||
<https://github.com/ColorlibHQ/AdminLTE>. | ||
URL: https://rinterface.github.io/bs4Dash/index.html, https://github.com/RinteRface/bs4Dash | ||
URL: https://rinterface.github.io/bs4Dash/index.html, https://github.com/RinteRface/bs4Dash, https://bs4dash.rinterface.com/ | ||
BugReports: https://github.com/RinteRface/bs4Dash/issues | ||
License: GPL (>= 2) | file LICENSE | ||
Imports: | ||
|
@@ -32,7 +32,7 @@ Suggests: | |
DT, | ||
thematic (>= 0.1.2) | ||
Encoding: UTF-8 | ||
RoxygenNote: 7.2.3 | ||
RoxygenNote: 7.3.2 | ||
VignetteBuilder: knitr | ||
Collate: | ||
'feedbacks.R' | ||
|
@@ -56,3 +56,5 @@ Collate: | |
'skinSelector.R' | ||
'utils.R' | ||
RdMacros: lifecycle | ||
Depends: | ||
R (>= 2.10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
--- | ||
output: github_document | ||
always_allow_html: true | ||
--- | ||
|
||
```{r setup, include=FALSE} | ||
library(bslib) | ||
library(bs4Dash) | ||
knitr::opts_chunk$set(echo = TRUE) | ||
``` | ||
|
||
|
@@ -11,32 +14,29 @@ knitr::opts_chunk$set(echo = TRUE) | |
[![R build status](https://github.com/RinteRface/bs4Dash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/bs4Dash/actions) | ||
[![version](https://www.r-pkg.org/badges/version/bs4Dash)](https://CRAN.R-project.org/package=bs4Dash) | ||
[![cranlogs](https://cranlogs.r-pkg.org/badges/bs4Dash)](https://CRAN.R-project.org/package=bs4Dash) | ||
[![total](https://cranlogs.r-pkg.org/badges/grand-total/bs4Dash)](https://www.rpackages.io/package/bs4Dash) | ||
[![total](https://cranlogs.r-pkg.org/badges/grand-total/bs4Dash)](https://CRAN.R-project.org/package=bs4Dash) | ||
[![Codecov test coverage](https://codecov.io/gh/RinteRface/bs4Dash/branch/master/graph/badge.svg)](https://codecov.io/gh/RinteRface/bs4Dash?branch=master) | ||
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/assets/devices.min.css" type="text/css" /> | ||
|
||
> Bootstrap 4 shinydashboard using [AdminLTE3](https://github.com/ColorlibHQ/AdminLTE) | ||
<br> | ||
|
||
<div class="card"> | ||
<a href="https://dgranjon.shinyapps.io/virtual_patient_v2/" target="_blank"><img src="https://community.rstudio.com/uploads/default/original/2X/e/eb1013fd09ccf10cbe13da3f0168eebfcb0eba75.gif"></a> | ||
</div> | ||
```{r showcase-code, eval=TRUE, echo=FALSE} | ||
card( | ||
bs4Dash:::create_link_iframe(bs4Dash:::shinylive_links["inst/examples/showcase"]), | ||
full_screen = TRUE, | ||
style = "margin: 0 auto; float: none;" | ||
) | ||
``` | ||
|
||
<br> | ||
|
||
<div class="card"> | ||
<a href="https://analytichealth.co.uk/pharmly-portal/" target="_blank"><img src="https://analytichealth.co.uk/wp-content/uploads/2021/10/PA-bs4Dash.gif"></a> | ||
<a href="https://analytichealth.co.uk/pharmly-portal/" target="_blank"><img src="https://analytichealth.co.uk/wp-content/uploads/2021/10/PA-bs4Dash.gif" alt="bs4Dash usage medical dashboard"></a> | ||
</div> | ||
|
||
<br> | ||
|
||
```{r, echo=FALSE} | ||
bs4Dash:::app_container("https://dgranjon.shinyapps.io/virtual_patient_v2/", deps = TRUE) | ||
``` | ||
|
||
## New users moving to bs4Dash v2.0.0 | ||
## From shinydashboard to bs4Dash | ||
|
||
Taking the simple `{shinydashboard}` example: | ||
|
||
|
@@ -73,7 +73,7 @@ server <- function(input, output) { | |
shinyApp(ui, server) | ||
``` | ||
|
||
Starting from v2.0.0, moving to `{bs4Dash}` is rather simple: | ||
Moving to `{bs4Dash}` is rather simple, as we just replace `library(shinydashboard)`: | ||
|
||
```r | ||
library(bs4Dash) | ||
|
@@ -106,14 +106,6 @@ server <- function(input, output) { | |
shinyApp(ui, server) | ||
``` | ||
|
||
|
||
## Upgrading bs4Dash to 2.0.0 | ||
- `{bs4Dash}` is undergoing major rework to make it easier to come from `{shinydashboard}`. The current development version 2.0.0 provides a 1:1 supports, in other word moving from `{shinydashboard}` to `{bs4Dash}` is accomplished by changing `library(shinydashboard)` to `library(bs4Dash)`. | ||
|
||
- `{bs4Dash}` v2.0.0 also provides 1:1 with `{shinydashboardPlus}` to ease compatibility. | ||
|
||
- Apps built with `{bs4Dash}` version <= 0.5.0 are definitely not compatible with v2.0.0 due to substantial breaking changes in the API. We advise users to keep the old version for old apps and move to to the new version for newer apps. | ||
|
||
## Installation | ||
|
||
```r | ||
|
@@ -124,7 +116,6 @@ install.packages("bs4Dash") | |
``` | ||
|
||
## Demo | ||
See a working example on shinyapps.io [here](https://dgranjon.shinyapps.io/bs4DashDemo/). | ||
You may also run: | ||
|
||
```r | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
pak::pak("parmsam/r-shinylive@feat/encode-decode-url") | ||
|
||
create_shinylive_links <- function(path) { | ||
|
||
dirs <- list.dirs(path)[-1] | ||
|
||
vapply( | ||
list.dirs(path)[-1], | ||
shinylive:::url_encode_dir, | ||
FUN.VALUE = character(1) | ||
) | ||
} | ||
|
||
create_vignettes_links <- function() { | ||
create_shinylive_links("inst/examples/vignettes-demos") | ||
} | ||
|
||
shinylive_links <- create_vignettes_links() | ||
usethis::use_data(shinylive_links, internal = TRUE, overwrite = TRUE) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
*.html | ||
*.R | ||
|
||
/.quarto/ |
Oops, something went wrong.