Skip to content

Commit

Permalink
Released 1.0.1 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
cb4ds authored Jan 3, 2022
1 parent 507df43 commit fe2c859
Show file tree
Hide file tree
Showing 30 changed files with 574 additions and 231 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
^cran-comments.md$
^winbuilder_results$
^CRAN-RELEASE$
^\.circleci$
^CRAN-SUBMISSION$
106 changes: 106 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Notes:
# - Docker containers with R, etc. provided by rocker. See <https://hub.docker.com/r/rocker/verse>.
# - Builds attempted for 3.6.3, 4.0.5, and the *latest* R edition supported by rocker.

version: 2.1

workflows:

version: 2
Prepare-All-R-Editions:
jobs:
- Build-for-r4_0_5
- Build-for-rLATEST

jobs:

Build-for-r4_0_5:
docker:
- image: rocker/verse:4.0.5

steps:
- checkout
- run:
name: Review checkout
command: ls -la

- run:
name: Install Linux dependencies
command: |
sudo apt-get update -y
sudo apt-get install -yq texlive-fonts-recommended
sudo apt-get install -yq texlive-fonts-extra
- run:
name: Install R dependencies
command: |
R -e 'install.packages(c("shinydashboard", "shinyBS", "DT", "writexl", "fresh"))'
R -e 'install.packages(c("canvasXpress", "shinydashboardPlus", "colourpicker", "openxlsx"))'
- run:
name: Session information and installed package versions
command: |
Rscript -e 'sessionInfo()'
Rscript -e 'installed.packages()[, c("Package", "Version")]'
Rscript -e 'rmarkdown::pandoc_version()'
- run:
name: Build package
command: R CMD build .

- run:
name: Check package
command: |
# Install suggested packages
R -e 'install.packages("png")'
# Perform package check
R CMD check *tar.gz
Build-for-rLATEST:
docker:
- image: rocker/verse:latest

steps:
- checkout
- run:
name: Review checkout
command: ls -la

- run:
name: Install Linux dependencies
command: |
sudo apt-get update -y
sudo apt-get install -yq texlive-fonts-recommended
sudo apt-get install -yq texlive-fonts-extra
- run:
name: Install R dependencies
command: |
R -e 'install.packages(c("shinydashboard", "shinyBS", "DT", "writexl", "fresh"))'
R -e 'install.packages(c("canvasXpress", "shinydashboardPlus", "colourpicker", "openxlsx"))'
R -e 'install.packages("covr")'
- run:
name: Session information and installed package versions
command: |
Rscript -e 'sessionInfo()'
Rscript -e 'installed.packages()[, c("Package", "Version")]'
Rscript -e 'rmarkdown::pandoc_version()'
- run:
name: Build package
command: R CMD build .

- run:
name: Check coverage
command: Rscript -e 'library(covr); codecov(quiet = FALSE)'

- run:
name: Check package
command: |
# Install suggested packages
R -e 'install.packages("png")'
# Perform package check
R CMD check *tar.gz
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Package: periscope
Type: Package
Title: Enterprise Streamlined 'Shiny' Application Framework
Version: 1.0.0
Version: 1.0.1
Authors@R: c(
person("Constance", "Brett", email="connie@aggregate-genius.com", role = c("aut", "cre")),
person("Isaac", "Neuhaus", role = "aut", comment = "canvasXpress JavaScript Library Maintainer"),
person("Ger", "Inberg", role = c("ctb")),
person("Mohammed", "Ali", role = c("ctb")),
person("Bristol-Meyers Squibb (BMS)", role = c("cph"))
)
Description: An enterprise-targeted scalable and UI-standardized 'shiny' framework
Expand All @@ -32,7 +33,7 @@ Imports:
fresh,
yaml,
grDevices
RoxygenNote: 7.1.1
RoxygenNote: 7.1.2
Suggests:
knitr,
rmarkdown,
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#Revisions and Change Log


### v1.0.1
* Minor bugfixes - updated font awesome icons (to v5 compatible)
* Updated example templated applications

### v1.0.0 **major version release**
* Updated to the latest shiny modules paradigm from the old one
* Support for downloadableTable DT options
Expand Down
2 changes: 1 addition & 1 deletion R/downloadFile.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ downloadFileButton <- function(id,
shinyBS::bsButton(
inputId = ns("downloadFileList"),
label = NULL,
icon = shiny::icon("files-o", lib = "font-awesome"),
icon = shiny::icon("copy", lib = "font-awesome"),
type = "action",
class = "dropdown-toggle periscope-download-btn",
`data-toggle` = "dropdown",
Expand Down
2 changes: 1 addition & 1 deletion R/downloadableTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ download_table <- function(input, output, session,
tryCatch({
dt <- do.call(DT::datatable, dt_args)

if (length(format_options) > 0) {
if ((length(format_options) > 0) && (NROW(dt_args$data) > 0)) {
dt <- format_columns(dt, format_options)
}
dt
Expand Down
2 changes: 1 addition & 1 deletion R/fw_helpers_internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
side_basic_label = "Basic",
side_advanced = .g_sidebar_default_value,
side_advanced_label = "Advanced",
sidebar_right_icon = "gears"
sidebar_right_icon = "cogs"
)

# reset app options
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ output:
<!-- Badge Location -->
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/periscope?color=9bc2cf)](https://cran.r-project.org/package=periscope)
[![CRAN_Downloads_Badge](https://cranlogs.r-pkg.org/badges/grand-total/periscope?color=9bc2cf)](https://cran.r-project.org/package=periscope)
[![Travis-CI Build Status](https://app.travis-ci.com/cb4ds/periscope.svg?branch=master)](https://app.travis-ci.com/cb4ds/periscope)
[![CircleCI](https://circleci.com/gh/cb4ds/periscope/tree/master.svg?style=shield)](https://app.circleci.com/pipelines/github/cb4ds/periscope?branch=master)
[![Coverage Status](https://img.shields.io/codecov/c/github/cb4ds/periscope/master.svg)](https://codecov.io/github/cb4ds/periscope?branch=master)
<!-- End Badges -->

Expand Down
16 changes: 7 additions & 9 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
## Comments from Maintainer

Resubmission comments:
Updated travis link in Readme file
Resubmission Comments:
* permanent redirect for CircleCI was not caught, corrected the URL in the readme

Initial comments:
This is a major functionality update including changing the shiny module paradigm, supporting additional DT options in downloadableTables and updating the styling paradigm to allow more flexibility when customizing periscope applications. This release is compatible with apps created with the 0.x version of the package and
documentation including the sample applications, examples, vignettes, tests, etc. were also updated.
Original Comments:
Minor bugfix release to update icons, templated examples

---

Expand All @@ -18,11 +17,10 @@ RStudio Server Pro (Ubuntu 18.04.2)
* R 4.0.5
* R 4.1.1

Travis-CI (Ubuntu 16.04.6)
CircleCI

* R 3.6.3
* R 4.0.2
* R devel (2021-09-29 r80990)
* R 4.0.5
* R 4.1.2

WinBuilder

Expand Down
46 changes: 34 additions & 12 deletions inst/fw_templ/p_example/server_local.R
Original file line number Diff line number Diff line change
Expand Up @@ -320,31 +320,25 @@ output$body <- renderUI({
init_js_command())
})

observeEvent(input$updateStyles, {
req(input$primary_color)
req(input$sidebar_width)
req(input$sidebar_background_color)
req(input$body_background_color)
req(input$box_color)

apply_themes <- function(primary_color, sidebar_width, sidebar_background_color, body_background_color, box_color) {
lines <- c("### primary_color",
"# Sets the primary status color that affects the color of the header, valueBox, infoBox and box.",
"# Valid values are names of the color or hex-decimal value of the color (i.e,: \"blue\", \"#086A87\").",
"# Blank/empty value will use default value",
paste0("primary_color: '", input$primary_color, "'\n\n"),
paste0("primary_color: '", primary_color, "'\n\n"),


"# Sidebar variables: change the default sidebar width, colors:",
"### sidebar_width",
"# Width is to be specified as a numeric value in pixels. Must be greater than 0 and include numbers only.",
"# Valid possible value are 200, 350, 425, ...",
"# Blank/empty value will use default value",
paste0("sidebar_width: ", input$sidebar_width, "\n"),
paste0("sidebar_width: ", sidebar_width, "\n"),

"### sidebar_background_color",
"# Valid values are names of the color or hex-decimal value of the color (i.e,: \"blue\", \"#086A87\").",
"# Blank/empty value will use default value",
paste0("sidebar_background_color: '", input$sidebar_background_color, "'\n"),
paste0("sidebar_background_color: '", sidebar_background_color, "'\n"),

"### sidebar_hover_color",
"# The color of sidebar menu item upon hovring with mouse.",
Expand All @@ -361,13 +355,13 @@ observeEvent(input$updateStyles, {
"### body_background_color",
"# Valid values are names of the color or hex-decimal value of the color (i.e,: \"blue\", \"#086A87\").",
"# Blank/empty value will use default value",
paste0("body_background_color: '", input$body_background_color, "'\n"),
paste0("body_background_color: '", body_background_color, "'\n"),

"# boxes variables",
"### box_color",
"# Valid values are names of the color or hex-decimal value of the color (i.e,: \"blue\", \"#086A87\").",
"# Blank/empty value will use default value",
paste0("box_color: '", input$box_color, "'\n"),
paste0("box_color: '", box_color, "'\n"),

"### infobox_color",
"# Valid values are names of the color or hex-decimal value of the color (i.e,: \"blue\", \"#086A87\").",
Expand All @@ -376,13 +370,41 @@ observeEvent(input$updateStyles, {

write(lines, "www/periscope_style.yaml", append = F)
load_themes$themes <- read_themes()
}

observeEvent(input$updateStyles, {
req(input$primary_color)
req(input$sidebar_width)
req(input$sidebar_background_color)
req(input$body_background_color)
req(input$box_color)

apply_themes(primary_color = input$primary_color,
sidebar_width = input$sidebar_width,
sidebar_background_color = input$sidebar_background_color,
body_background_color = input$body_background_color,
box_color = input$box_color)

output$body <- renderUI({
list(periscope:::fw_create_body(),
shiny::tags$script("$('#app_styling').closest('.box').find('[data-widget=collapse]').click();"),
init_js_command())
})
})

observeEvent(TRUE, {
apply_themes(primary_color = "#4F718F",
sidebar_width = "300",
sidebar_background_color = "#A0B89E",
body_background_color = "#EDECE8",
box_color = "#DAE0D9")

output$body <- renderUI({
list(periscope:::fw_create_body(),
init_js_command())
})
})

init_js_command <- function() {
list(shiny::tags$script("setTimeout(function() {$('div.navbar-custom-menu').click()}, 1000);"),
shiny::tags$script("$('div.navbar-custom-menu').click();"),
Expand Down
Loading

0 comments on commit fe2c859

Please sign in to comment.