diff --git a/.Rbuildignore b/.Rbuildignore
index a18cb35..cae1011 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -8,3 +8,6 @@
^pkgdown$
^\.github$
^CODE_OF_CONDUCT\.md$
+^README\.Rmd$
+^index\.Rmd$
+^index\.md$
\ No newline at end of file
diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml
index 6ab6888..d46a617 100644
--- a/.github/workflows/R-CMD-check.yaml
+++ b/.github/workflows/R-CMD-check.yaml
@@ -1,16 +1,14 @@
-# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
+# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
-#
-# NOTE: This workflow is overkill for most R packages and
-# check-standard.yaml is likely a better choice.
-# usethis::use_github_action("check-standard") will install it.
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
-name: R-CMD-check
+name: R-CMD-check.yaml
+
+permissions: read-all
jobs:
R-CMD-check:
@@ -22,49 +20,33 @@ jobs:
fail-fast: false
matrix:
config:
- - {os: macOS-latest, r: 'release'}
-
+ - {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- # Use 3.6 to trigger usage of RTools35
- - {os: windows-latest, r: '3.6'}
-
- # Use older ubuntu to maximise backward compatibility
- - {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'}
- - {os: ubuntu-18.04, r: 'release'}
- - {os: ubuntu-18.04, r: 'oldrel-1'}
- - {os: ubuntu-18.04, r: 'oldrel-2'}
- - {os: ubuntu-18.04, r: 'oldrel-3'}
- - {os: ubuntu-18.04, r: 'oldrel-4'}
+ - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
+ - {os: ubuntu-latest, r: 'release'}
+ - {os: ubuntu-latest, r: 'oldrel-1'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- - uses: r-lib/actions/setup-pandoc@v1
+ - uses: r-lib/actions/setup-pandoc@v2
- - uses: r-lib/actions/setup-r@v1
+ - uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
- - uses: r-lib/actions/setup-r-dependencies@v1
+ - uses: r-lib/actions/setup-r-dependencies@v2
with:
- extra-packages: rcmdcheck
-
- - uses: r-lib/actions/check-r-package@v1
-
- - name: Show testthat output
- if: always()
- run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
- shell: bash
+ extra-packages: any::rcmdcheck
+ needs: check
- - name: Upload check results
- if: failure()
- uses: actions/upload-artifact@main
+ - uses: r-lib/actions/check-r-package@v2
with:
- name: ${{ runner.os }}-r${{ matrix.config.r }}-results
- path: check
+ upload-snapshots: true
+ build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml
index 8bc9210..e1e2e52 100644
--- a/.github/workflows/pkgdown.yaml
+++ b/.github/workflows/pkgdown.yaml
@@ -1,46 +1,46 @@
+# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
+# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
- branches: master
+ branches: [main, master]
+ pull_request:
+ branches: [main, master]
+ release:
+ types: [published]
+ workflow_dispatch:
name: pkgdown
jobs:
pkgdown:
- runs-on: macOS-latest
+ runs-on: ubuntu-latest
+ # Only restrict concurrency for non-PR jobs
+ concurrency:
+ group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- - uses: r-lib/actions/setup-r@master
+ - uses: r-lib/actions/setup-pandoc@v2
- - uses: r-lib/actions/setup-pandoc@master
-
- - name: Query dependencies
- run: |
- install.packages('remotes')
- saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
- writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
- shell: Rscript {0}
+ - uses: r-lib/actions/setup-r@v2
+ with:
+ use-public-rspm: true
- - name: Cache R packages
- uses: actions/cache@v1
+ - uses: r-lib/actions/setup-r-dependencies@v2
with:
- path: ${{ env.R_LIBS_USER }}
- key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
- restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
+ extra-packages: any::pkgdown, local::.
+ needs: website
- - name: Install dependencies
- run: |
- remotes::install_deps(dependencies = TRUE)
- install.packages("pkgdown")
+ - name: Build site
+ run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}
- - name: Install package
- run: R CMD INSTALL .
-
- - name: Deploy package
- run: |
- git config --local user.email "actions@github.com"
- git config --local user.name "GitHub Actions"
- Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
+ - name: Deploy to GitHub pages 🚀
+ if: github.event_name != 'pull_request'
+ uses: JamesIves/github-pages-deploy-action@v4.4.1
+ with:
+ clean: false
+ branch: gh-pages
+ folder: docs
\ No newline at end of file
diff --git a/DESCRIPTION b/DESCRIPTION
index 391a46a..11e46db 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -15,9 +15,10 @@ Description: 'R' interface to the 'Tabler' HTML template. See more here .
URL: https://rinterface.github.io/tablerDash/, https://github.com/RinteRface/tablerDash/
BugReports: https://github.com/RinteRface/tablerDash/issues
-Imports: shiny, htmltools, knitr
-Suggests: shinyWidgets, shinyEffects, echarts4r
+Imports: shiny, htmltools
+Suggests: shinyWidgets, shinyEffects, echarts4r, knitr
License: GPL (>= 2)
Encoding: UTF-8
-LazyData: true
-RoxygenNote: 6.1.1
+RoxygenNote: 7.3.2
+Depends:
+ R (>= 2.10)
diff --git a/NEWS.md b/NEWS.md
index 270e879..5b7cddf 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,8 +1,14 @@
# tablerDash 0.1.5.9000
+## Documentation
+- Upgrade pkgdown setup.
+- Added shinylive support.
+
## Bug Fix
- Resizing a `tablerCard()` triggers the shown javascript event, telling shiny to
update the size of the contained object.
+- Fix overflow issue in `tablerCard()`. It is now correctly applied to the card
+body, so the header is always visible when scrolling.
# tablerDash 0.1.0
- first release
diff --git a/R/cards.R b/R/cards.R
index a98506f..f10243d 100644
--- a/R/cards.R
+++ b/R/cards.R
@@ -69,7 +69,6 @@ tablerCard <- function(..., title = NULL, options = NULL, footer = NULL,
cardTag <- shiny::tags$div(
class = cardCl,
- style = if (overflow) "max-height: 500px; overflow-y: auto;" else NULL,
if (!is.null(status)) shiny::tags$div(class = statusCl),
# header
if (!is.null(title)) {
@@ -113,7 +112,11 @@ tablerCard <- function(..., title = NULL, options = NULL, footer = NULL,
)
},
# body
- shiny::tags$div(class = "card-body", ...),
+ shiny::tags$div(
+ class = "card-body",
+ style = if (overflow) "max-height: 500px; overflow-y: auto; overflow-x: auto;" else NULL,
+ ...
+ ),
# footer
if (!is.null(footer)) shiny::tags$div(class = "card-footer", footer)
)
diff --git a/R/sysdata.rda b/R/sysdata.rda
new file mode 100644
index 0000000..266a80a
Binary files /dev/null and b/R/sysdata.rda differ
diff --git a/R/utils.R b/R/utils.R
index e3ab761..44c4191 100644
--- a/R/utils.R
+++ b/R/utils.R
@@ -53,3 +53,46 @@ validateTabName <- function(name) {
stop("tabName must not have a '.' in it.")
}
}
+
+#' Create shinylive iframe
+#'
+#' Useful for pkgdown website
+#'
+#' @param url app url. A shinylive link.
+#' @param mode How to display the shinylive app. Default to app mode.
+#' @param header Whether to display the shinylive header. Default to TRUE.
+#' @keywords internal
+create_app_link <- function(url, mode = c("app", "editor"), header = TRUE) {
+ mode <- match.arg(mode)
+
+ if (mode != "editor") url <- gsub("editor", mode, url)
+
+ if (!header) {
+ url <- paste0(url, "&h=0")
+ }
+
+ shiny::tags$iframe(
+ # To allow the content to fill the full screen card
+ class = "html-fill-item",
+ src = url,
+ height = "700",
+ width = "100%",
+ style = "border: 1px solid rgba(0,0,0,0.175); border-radius: .375rem;",
+ allowfullscreen = "",
+ allow = "autoplay",
+ `data-external` = "1"
+ )
+}
+
+code_chunk <- function(output, language = "r") {
+ cat(paste0("```", language))
+ cat(output)
+ cat("\n```\n")
+}
+
+print_r_code <- function(name) {
+ path <- system.file(sprintf("examples/shinylive/%s/app.R", name), package = "shiny386")
+ lines <- readLines(path)
+ to_remove <- grep("webr::", lines)
+ code_chunk(cat(paste(lines[-to_remove], collapse = "\n")))
+}
\ No newline at end of file
diff --git a/README.Rmd b/README.Rmd
new file mode 100644
index 0000000..d9401f5
--- /dev/null
+++ b/README.Rmd
@@ -0,0 +1,71 @@
+---
+output: github_document
+---
+
+
+
+```{r, include = FALSE}
+knitr::opts_chunk$set(
+ collapse = TRUE,
+ comment = "#>",
+ fig.path = "man/figures/README-",
+ out.width = "100%"
+)
+```
+
+# tablerDash
+
+
+[![R build status](https://github.com/RinteRface/tablerDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/tablerDash/actions)
+[![CRAN status](https://www.r-pkg.org/badges/version/tablerDash)](https://cran.r-project.org/package=tablerDash)
+[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://www.tidyverse.org/lifecycle/#maturing)
+[![cranlogs](https://cranlogs.r-pkg.org/badges/tablerDash)](https://cran.r-project.org/package=tablerDash)
+[![total](https://cranlogs.r-pkg.org/badges/grand-total/tablerDash)](https://www.rpackages.io/package/tablerDash)
+[![R-CMD-check](https://github.com/RinteRface/tablerDash/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/RinteRface/tablerDash/actions/workflows/R-CMD-check.yaml)
+
+
+> Tabler dashboard template for shiny with Bootstrap 4
+
+See [https://tabler.io](https://tabler.io) for the original template.
+
+## Installation
+
+This package is on CRAN:
+
+```r
+# latest devel version
+devtools::install_github("RinteRface/tablerDash")
+# CRAN version
+install.packages("tablerDash")
+```
+
+## Demo
+
+`{tablerDash}` works on all the RStudio products. See a demo [on shinyapps.io](https://dgranjon.shinyapps.io/tablerDashDemo/).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Issues
+
+Issues are listed [here](https://github.com/RinteRface/tablerDash/issues).
+
+## Code of Conduct
+
+ Please note that the tablerDash project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
+
diff --git a/README.md b/README.md
index f9ef5fa..d16cfb7 100644
--- a/README.md
+++ b/README.md
@@ -1,20 +1,29 @@
+
+
+
# tablerDash
-[![R build status](https://github.com/RinteRface/tablerDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/tablerDash/actions)
-[![CRAN status](https://www.r-pkg.org/badges/version/tablerDash)](https://cran.r-project.org/package=tablerDash)
+
+
+[![R build
+status](https://github.com/RinteRface/tablerDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/tablerDash/actions)
+[![CRAN
+status](https://www.r-pkg.org/badges/version/tablerDash)](https://cran.r-project.org/package=tablerDash)
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![cranlogs](https://cranlogs.r-pkg.org/badges/tablerDash)](https://cran.r-project.org/package=tablerDash)
[![total](https://cranlogs.r-pkg.org/badges/grand-total/tablerDash)](https://www.rpackages.io/package/tablerDash)
+[![R-CMD-check](https://github.com/RinteRface/tablerDash/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/RinteRface/tablerDash/actions/workflows/R-CMD-check.yaml)
+
> Tabler dashboard template for shiny with Bootstrap 4
-See [https://tabler.io](https://tabler.io) for the original template.
+See for the original template.
## Installation
This package is on CRAN:
-```r
+``` r
# latest devel version
devtools::install_github("RinteRface/tablerDash")
# CRAN version
@@ -23,30 +32,41 @@ install.packages("tablerDash")
## Demo
-`{tablerDash}` works on all the RStudio products. See a demo [on shinyapps.io](https://dgranjon.shinyapps.io/tablerDashDemo/).
-
+`{tablerDash}` works on all the RStudio products. See a demo [on
+shinyapps.io](https://dgranjon.shinyapps.io/tablerDashDemo/).
+
+
+
+
+
+
+
+
-
## Issues
-Issues are listed [here](https://github.com/RinteRface/tablerDash/issues).
+Issues are listed
+[here](https://github.com/RinteRface/tablerDash/issues).
## Code of Conduct
-
- Please note that the tablerDash project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
+
+Please note that the tablerDash project is released with a [Contributor
+Code of
+Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).
+By contributing to this project, you agree to abide by its terms.
diff --git a/_pkgdown.yml b/_pkgdown.yml
index c33ab58..d0ba2ca 100644
--- a/_pkgdown.yml
+++ b/_pkgdown.yml
@@ -1,3 +1,8 @@
+template:
+ bootstrap: 5
+
+url: https://rinterface.github.io/tablerDash/
+
reference:
- title: Basic dashboard functions
desc: Dashboard skeleton functions
@@ -56,10 +61,6 @@ reference:
contents:
- '`tablerDashGallery`'
-template:
- params:
- bootswatch: journal
-
navbar:
structure:
left:
diff --git a/cran-comments.md b/cran-comments.md
index 6dacaca..cee4d1b 100644
--- a/cran-comments.md
+++ b/cran-comments.md
@@ -1,19 +1,8 @@
## Test environments
-* local OS X install, R 3.4.4
-* ubuntu 14.04 (on travis-ci), R 3.4.4
+* local OS X install, R 4.2.2
+* Rhub
* win-builder (devel and release)
## R CMD check results
0 errors | 0 warnings | 1 note
-
-* This is a new release.
-
-Possibly mis-spelled words in DESCRIPTION:
- Tabler (3:8, 11:33)
-
-This is a FALSE positive, there is no mis-spelled word
-
-## Re submission
-- I wrote package names, software names and API names in single quotes (e.g. 'Tabler') in Title and Description.
-- I enlarged the description
diff --git a/docs/authors.html b/docs/authors.html
index 5611932..b499026 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -1,161 +1,89 @@
-
-
-
-
-
-
+Authors and Citation • tablerDash
+ Skip to contents
-Authors • tablerDash
+