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

Pre release changes 0.5.1 #460

Merged
merged 3 commits into from Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion DESCRIPTION
@@ -1,7 +1,7 @@
Type: Package
Package: shiny.semantic
Title: Semantic UI Support for Shiny
Version: 0.5.0.9003
Version: 0.5.1
Authors@R: c(person("Filip", "Stachura", email = "filip@appsilon.com", role = "aut"),
person("Dominik", "Krzeminski", role = "aut"),
person("Krystian", "Igras", role = "aut"),
Expand All @@ -10,6 +10,7 @@ Authors@R: c(person("Filip", "Stachura", email = "filip@appsilon.com", role = "a
person("Jakub", "Chojna", email = "jakub.chojna@appsilon.com", role = "aut"),
person("Olga", "Mierzwa-Sulima", email = "olga@appsilon.com", role = "aut"),
person("Jakub", "Nowicki", email = "opensource+kuba@appsilon.com", role = c("aut", "cre")),
person("Tymoteusz", "Makowski", email = "tymoteusz.makowski@appsilon.com", role = "aut"),
person("Ashley", "Baldry", role = "ctb"),
person("Pedro", "Manuel Coutinho da Silva", email = "pedro@appsilon.com", role = "ctb"),
person("Kamil", "Żyła", email = "kamil@appsilon.com", role = "ctb"),
Expand Down Expand Up @@ -39,6 +40,7 @@ Imports:
stats
Suggests:
covr,
chromote,
dplyr,
DT,
gapminder,
Expand Down
24 changes: 0 additions & 24 deletions R/shiny.R
@@ -1,27 +1,3 @@
#' Semantic UI wrapper for Shiny
#'
#'
#' @description With this library it’s easy to wrap Shiny with Semantic UI
#' components. Add a few simple lines of code and some CSS classes to give
#' your UI a fresh, modern and highly interactive look.
#'
#' @section Options:
#' There are a number of global options that affect shiny.semantic as well as
#' Shiny behavior.The options can be set globally with `options()`
#' \describe{
#' \item{shiny.custom.semantic.cdn (defaults to `NULL`)}{This controls from where the css
#' and javascripts will be downloaded.}
#' \item{shiny.custom.semantic (defaults to `NULL`)}{This allows to set custom local path
#' to semantic dependencies.}
#' \item{shiny.minified (defaults to `TRUE`)}{Defines including JavaScript as a minified or
#' un-minified file.}
#' }
#'
#' @docType package
#' @name shiny.semantic
#' @aliases shiny.semantic-package
NULL

#' Internal function that expose javascript bindings to Shiny app.
#'
#' @param libname library name
Expand Down
21 changes: 21 additions & 0 deletions R/shiny.semantic-package.R
@@ -0,0 +1,21 @@
#' Semantic UI wrapper for Shiny
#'
#'
#' @description With this library it’s easy to wrap Shiny with Semantic UI
#' components. Add a few simple lines of code and some CSS classes to give
#' your UI a fresh, modern and highly interactive look.
#'
#' @section Options:
#' There are a number of global options that affect shiny.semantic as well as
#' Shiny behavior.The options can be set globally with `options()`
#' \describe{
#' \item{shiny.custom.semantic.cdn (defaults to `NULL`)}{This controls from where the css
#' and javascripts will be downloaded.}
#' \item{shiny.custom.semantic (defaults to `NULL`)}{This allows to set custom local path
#' to semantic dependencies.}
#' \item{shiny.minified (defaults to `TRUE`)}{Defines including JavaScript as a minified or
#' un-minified file.}
#' }
#'
#' @keywords internal
"_PACKAGE"
6 changes: 4 additions & 2 deletions man/shiny.semantic.Rd → man/shiny.semantic-package.Rd

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

30 changes: 30 additions & 0 deletions tests/testthat/setup-disable-crashpad.R
@@ -0,0 +1,30 @@
# ❯ checking for detritus in the temp directory ... NOTE
# Found the following files/directories:
# ‘Crashpad’
#
# 0 errors ✔ | 0 warnings ✔ | 1 note ✖
# Error: Error: R CMD check found NOTEs
# Flavors: ubuntu-22.04 (devel), ubuntu-22.04 (release), ubuntu-22.04 (oldrel)

# References (shinytest2 github):
# 1. https://github.com/rstudio/shinytest2/blob/main/cran-comments.md
# 2. https://github.com/rstudio/shinytest2/blob/main/tests/testthat/setup-disable-crashpad.R

# Disable crash reporting on CRAN machines. (Can't get the report anyways)
chromote::set_chrome_args(c(
# https://peter.sh/experiments/chromium-command-line-switches/#disable-crash-reporter
#> Disable crash reporter for headless. It is enabled by default in official builds
"--disable-crash-reporter",
chromote::default_chrome_args()
))

# Make sure the temp folder is removed when testing is complete
withr::defer({

# Clean up chromote sessions
gc() # Run R6 finalizer methods
Sys.sleep(2) # Wait for any supervisors to exit

# Delete the Crashpad folder if it exists
unlink(file.path(tempdir(), "Crashpad"), recursive = TRUE)
}, envir = testthat::teardown_env())