Skip to content

Commit

Permalink
Merge branch 'cb4ds:cran' into cran
Browse files Browse the repository at this point in the history
  • Loading branch information
agenius-mohammed-ali authored Nov 3, 2021
2 parents e9b1c3e + 52acf77 commit 3691b50
Show file tree
Hide file tree
Showing 53 changed files with 1,357 additions and 172 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
.Ruserdata
**/.DS_Store
vignettes/*.html
vignettes/*.R
**/log
.project
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: periscope
Type: Package
Title: Enterprise Streamlined 'Shiny' Application Framework
Version: 1.0.0.9001
Version: 1.0.0
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"),
Expand Down
9 changes: 9 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#Revisions and Change Log

### v1.0.0 **major version release**
* Updated to the latest shiny modules paradigm from the old one
* Support for downloadableTable DT options
* Styling changed to use the fresh package
* Updated example applications, documentation, vignettes, etc.
* Ensured apps created with the older version of this package will work when the package is upgraded

---

### v0.6.3
* Bugfix for the framework to not require shinydashboardPlus unless a right sidebar is in use
* Bugfixes for the sample applications
Expand Down
4 changes: 2 additions & 2 deletions R/generate_template.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
#' \cr
#' \strong{\emph{name}/www/periscope_style.yaml} :\cr
#' This is the application custom styling yaml file. User can update
#' appication different parts style using this file.\cr
#' application different parts style using this file.\cr
#' \cr
#' \cr
#' \strong{Do not modify the following files}: \cr
Expand Down Expand Up @@ -383,6 +383,6 @@ create_default_theme_file <- function(theme_file) {
"### infobox_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",
"infobox_color: ")
"infobox_color: \n")
writeLines(lines, theme_file)
}
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://travis-ci.com/cb4ds/periscope.svg?branch=master)](https://travis-ci.com/cb4ds/periscope)
[![Travis-CI Build Status](https://app.travis-ci.com/cb4ds/periscope.svg?branch=master)](https://app.travis-ci.com/cb4ds/periscope)
[![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
20 changes: 11 additions & 9 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
## Comments from Maintainer

* LazyData removed from Description to fix Note on CRAN check page
Resubmission comments:
Updated travis link in Readme file

* Bugfix for situation where the user wants to generate an app but does not have shinydashboardPlus installed and does not need a right sidebar (which requires sdp)

* There may be a NOTE due to the short time between submissions, this is an important bugfix release and I kindly ask for your exception to allow this release.
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.

---

Expand All @@ -14,13 +15,14 @@
RStudio Server Pro (Ubuntu 18.04.2)

* R 3.6.3
* R 4.0.4
* R 4.0.5
* R 4.1.1

Travis-CI (Ubuntu 16.04.6)

* R 3.6.3
* R 4.0.2
* R devel (2021-03-29 r80130)
* R devel (2021-09-29 r80990)

WinBuilder

Expand All @@ -29,7 +31,7 @@ WinBuilder

RHub

* devtools::check_rhub(interactive = F)
* devtools::check_rhub(interactive = F, env_vars = c("R_CHECK_FORCE_SUGGESTS" = "false"))

---

Expand All @@ -49,9 +51,9 @@ devtools::check()
**NONE**

```
pdb <- available.packages()
tools::package_dependencies(packages = c('periscope'),
db = pdb, reverse = TRUE)
db = available.packages(),
reverse = TRUE)
$periscope
character(0)
Expand Down
3 changes: 3 additions & 0 deletions inst/fw_templ/p_blank/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
# to server, UI and session scopes
# ----------------------------------------

library(shiny)
library(periscope)


# -- Setup your Application --
set_app_parameters(title = "Set title in global.R using set_app_parameters()",
Expand Down
1 change: 1 addition & 0 deletions inst/fw_templ/p_example/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# -- IMPORTS --
library(canvasXpress)


# -- Setup your Application --
set_app_parameters(title = "Sample Title (click for an info pop-up)",
titleinfo = HTML("<h3>Application Information Pop-Up</h3>",
Expand Down
4 changes: 4 additions & 0 deletions inst/fw_templ/p_example/server_global.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
# ----------------------------------------

# -- IMPORTS --
library(colourpicker)
library(DT)
library(htmltools)
library(htmlwidgets)


# -- VARIABLES --
Expand Down
19 changes: 10 additions & 9 deletions inst/fw_templ/p_example/server_local.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ output$hover_info <- renderUI({

output$styles <- renderUI({
load_themes$themes <- read_themes()
list(p("User can control application styles using www/periscope_style.yaml.\n The following parameters explain how to use that file."),
p("Note. Color values can be:",
list(p("User can control primary aspects of the application's styles by modifying the www/periscope_style.yaml file.\n This interactive example can be used to explore those parameters."),
p("Color values can be specified as:",
tags$ul(tags$li("Hex Value:", HTML("&nbsp;"), tags$b(tags$i("i.e. '#31A5CC'"))),
tags$li("RGB Value:", HTML("&nbsp;"), tags$b(tags$i("i.e. 'rgb(49, 165, 204)'"))),
tags$li("Color Name:", HTML("&nbsp;"), tags$b(tags$i("i.e. 'green', 'red', ..."))))),
Expand Down Expand Up @@ -247,20 +247,21 @@ downloadableTable("exampleDT1",
color = DT::styleInterval(0, c("red", "green"))),
formatStyle = list(columns = c("Natural.Increase"),
backgroundColor = DT::styleInterval(c(7614, 15914, 34152),
c("blue", "lightblue", "#FF7F7F", "red"))))
c("lightgray", "gray", "cadetblue", "#808000"))))


output$table_info <- renderUI({
list(
tags$ul(tags$li("User can customize downloadableTable modules through many options. such as:",
tags$ul(tags$li("Table labels options:", HTML("&nbsp;"),
tags$ul(tags$li("User can customize downloadableTable modules using DT options such as:",
tags$ul(tags$li("labels:", HTML("&nbsp;"),
tags$b(tags$i("i.e. 'colnames', 'caption', ..."))),
tags$li("Table layout and columns styles options:", HTML("&nbsp;"),
tags$li("layout and columns styles:", HTML("&nbsp;"),
tags$b(tags$i("i.e. 'container', 'formatStyle', ..."))),
tags$li("Table addons options:", HTML("&nbsp;"),
tags$li("other addons:", HTML("&nbsp;"),
tags$b(tags$i("i.e. 'filter', 'callback', ..."))))),
tags$li("For more information about table options please visit",
tags$a("DT documentation", target = "_blank", href = "https://rstudio.github.io/DT/"))
tags$li("For more information about table options please visit the",
tags$a("DT documentation", target = "_blank", href = "https://rstudio.github.io/DT/"),
"site")
))
})

Expand Down
19 changes: 10 additions & 9 deletions inst/fw_templ/p_example/server_local_no_left.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ output$hover_info <- renderUI({

output$styles <- renderUI({
load_themes$themes <- read_themes()
list(p("User can control application styles using www/periscope_style.yaml.\n The following parameters explain how to use that file."),
p("Note. Color values can be:",
list(p("User can control primary aspects of the application's styles by modifying the www/periscope_style.yaml file.\n This interactive example can be used to explore those parameters."),
p("Color values can be specified as:",
tags$ul(tags$li("Hex Value:", HTML("&nbsp;"), tags$b(tags$i("i.e. '#31A5CC'"))),
tags$li("RGB Value:", HTML("&nbsp;"), tags$b(tags$i("i.e. 'rgb(49, 165, 204)'"))),
tags$li("Color Name:", HTML("&nbsp;"), tags$b(tags$i("i.e. 'green', 'red', ..."))))),
Expand Down Expand Up @@ -241,19 +241,20 @@ downloadableTable("exampleDT1",
color = DT::styleInterval(0, c("red", "green"))),
formatStyle = list(columns = c("Natural.Increase"),
backgroundColor = DT::styleInterval(c(7614, 15914, 34152),
c("blue", "lightblue", "#FF7F7F", "red"))))
c("lightgray", "gray", "cadetblue", "#808000"))))

output$table_info <- renderUI({
list(
tags$ul(tags$li("User can customize downloadableTable modules through many options. such as:",
tags$ul(tags$li("Table labels options:", HTML("&nbsp;"),
tags$ul(tags$li("User can customize downloadableTable modules using DT options such as:",
tags$ul(tags$li("labels:", HTML("&nbsp;"),
tags$b(tags$i("i.e. 'colnames', 'caption', ..."))),
tags$li("Table layout and columns styles options:", HTML("&nbsp;"),
tags$li("layout and columns styles:", HTML("&nbsp;"),
tags$b(tags$i("i.e. 'container', 'formatStyle', ..."))),
tags$li("Table addons options:", HTML("&nbsp;"),
tags$li("other addons:", HTML("&nbsp;"),
tags$b(tags$i("i.e. 'filter', 'callback', ..."))))),
tags$li("For more information about table options please visit",
tags$a("DT documentation", target = "_blank", href = "https://rstudio.github.io/DT/"))
tags$li("For more information about table options please visit the",
tags$a("DT documentation", target = "_blank", href = "https://rstudio.github.io/DT/"),
"site")
))
})

Expand Down
19 changes: 10 additions & 9 deletions inst/fw_templ/p_example/server_local_plus.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ output$hover_info <- renderUI({

output$styles <- renderUI({
load_themes$themes <- read_themes()
list(p("User can control application styles using www/periscope_style.yaml.\n The following parameters explain how to use that file."),
p("Note. Color values can be:",
list(p("User can control primary aspects of the application's styles by modifying the www/periscope_style.yaml file.\n This interactive example can be used to explore those parameters."),
p("Color values can be specified as:",
tags$ul(tags$li("Hex Value:", HTML("&nbsp;"), tags$b(tags$i("i.e. '#31A5CC'"))),
tags$li("RGB Value:", HTML("&nbsp;"), tags$b(tags$i("i.e. 'rgb(49, 165, 204)'"))),
tags$li("Color Name:", HTML("&nbsp;"), tags$b(tags$i("i.e. 'green', 'red', ..."))))),
Expand Down Expand Up @@ -286,20 +286,21 @@ downloadableTable("exampleDT1",
color = DT::styleInterval(0, c("red", "green"))),
formatStyle = list(columns = c("Natural.Increase"),
backgroundColor = DT::styleInterval(c(7614, 15914, 34152),
c("blue", "lightblue", "#FF7F7F", "red"))))
c("lightgray", "gray", "cadetblue", "#808000"))))


output$table_info <- renderUI({
list(
tags$ul(tags$li("User can customize downloadableTable modules through many options. such as:",
tags$ul(tags$li("Table labels options:", HTML("&nbsp;"),
tags$ul(tags$li("User can customize downloadableTable modules using DT options such as:",
tags$ul(tags$li("labels:", HTML("&nbsp;"),
tags$b(tags$i("i.e. 'colnames', 'caption', ..."))),
tags$li("Table layout and columns styles options:", HTML("&nbsp;"),
tags$li("layout and columns styles:", HTML("&nbsp;"),
tags$b(tags$i("i.e. 'container', 'formatStyle', ..."))),
tags$li("Table addons options:", HTML("&nbsp;"),
tags$li("other addons:", HTML("&nbsp;"),
tags$b(tags$i("i.e. 'filter', 'callback', ..."))))),
tags$li("For more information about table options please visit",
tags$a("DT documentation", target = "_blank", href = "https://rstudio.github.io/DT/"))
tags$li("For more information about table options please visit the",
tags$a("DT documentation", target = "_blank", href = "https://rstudio.github.io/DT/"),
"site")
))
})

Expand Down
19 changes: 10 additions & 9 deletions inst/fw_templ/p_example/server_local_plus_no_left.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ output$hover_info <- renderUI({

output$styles <- renderUI({
load_themes$themes <- read_themes()
list(p("User can control application styles using www/periscope_style.yaml.\n The following parameters explain how to use that file."),
p("Note. Color values can be:",
list(p("User can control primary aspects of the application's styles by modifying the www/periscope_style.yaml file.\n This interactive example can be used to explore those parameters."),
p("Color values can be specified as:",
tags$ul(tags$li("Hex Value:", HTML("&nbsp;"), tags$b(tags$i("i.e. '#31A5CC'"))),
tags$li("RGB Value:", HTML("&nbsp;"), tags$b(tags$i("i.e. 'rgb(49, 165, 204)'"))),
tags$li("Color Name:", HTML("&nbsp;"), tags$b(tags$i("i.e. 'green', 'red', ..."))))),
Expand Down Expand Up @@ -277,19 +277,20 @@ downloadableTable("exampleDT1",
color = DT::styleInterval(0, c("red", "green"))),
formatStyle = list(columns = c("Natural.Increase"),
backgroundColor = DT::styleInterval(c(7614, 15914, 34152),
c("blue", "lightblue", "#FF7F7F", "red"))))
c("lightgray", "gray", "cadetblue", "#808000"))))

output$table_info <- renderUI({
list(
tags$ul(tags$li("User can customize downloadableTable modules through many options. such as:",
tags$ul(tags$li("Table labels options:", HTML("&nbsp;"),
tags$ul(tags$li("User can customize downloadableTable modules using DT options such as:",
tags$ul(tags$li("labels:", HTML("&nbsp;"),
tags$b(tags$i("i.e. 'colnames', 'caption', ..."))),
tags$li("Table layout and columns styles options:", HTML("&nbsp;"),
tags$li("layout and columns styles:", HTML("&nbsp;"),
tags$b(tags$i("i.e. 'container', 'formatStyle', ..."))),
tags$li("Table addons options:", HTML("&nbsp;"),
tags$li("other addons:", HTML("&nbsp;"),
tags$b(tags$i("i.e. 'filter', 'callback', ..."))))),
tags$li("For more information about table options please visit",
tags$a("DT documentation", target = "_blank", href = "https://rstudio.github.io/DT/"))
tags$li("For more information about table options please visit the",
tags$a("DT documentation", target = "_blank", href = "https://rstudio.github.io/DT/"),
"site")
))
})

Expand Down
8 changes: 4 additions & 4 deletions inst/fw_templ/www/periscope_style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 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
primary_color: "#31A5CC"
primary_color: "#4F718F"


# Sidebar variables: change the default sidebar width, colors:
Expand All @@ -15,7 +15,7 @@ sidebar_width: 300
### 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
sidebar_background_color: "#00FF00"
sidebar_background_color: "#A0B89E"

### sidebar_hover_color
# The color of sidebar menu item upon hovring with mouse.
Expand All @@ -33,13 +33,13 @@ sidebar_text_color:
### 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
body_background_color: "#C7DFE8"
body_background_color: "#EDECE8"

# 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
box_color: "#FDFFF5"
box_color: "#DAE0D9"

### infobox_color
# Valid values are names of the color or hex-decimal value of the color (i.e,: "blue", "#086A87").
Expand Down
2 changes: 1 addition & 1 deletion man/create_new_application.Rd

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

1 change: 0 additions & 1 deletion tests/testthat/sample_app/program/data/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*
*/
!.gitignore
!example.csv
10 changes: 8 additions & 2 deletions tests/testthat/sample_app/program/fxn/program_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ load_data2 <- function() {

load_data3 <- function() {
ldf <- df %>%
select(1:3)

select(1:3) %>%
mutate(Total.Population.Change = as.numeric(gsub(",", "", Total.Population.Change)),
Natural.Increase = as.numeric(gsub(",", "", Natural.Increase)))

as.data.frame(ldf)
}

read_themes <- function() {
yaml::read_yaml("www/periscope_style.yaml")
}
Loading

0 comments on commit 3691b50

Please sign in to comment.