Skip to content

Commit

Permalink
Merge pull request #1 from pedrocoutinhosilva/pedro.0.4.0-improvements
Browse files Browse the repository at this point in the history
0.4.0 release
  • Loading branch information
pedrocoutinhosilva authored Apr 10, 2022
2 parents b76bccb + 73ece90 commit 952ebc8
Show file tree
Hide file tree
Showing 536 changed files with 31,970 additions and 443 deletions.
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ tests
^_pkgdown\.yml$
^docs$
^pkgdown$
^doc$
^Meta$
^codecov\.yml$
.covrignore
^\.github$
1 change: 1 addition & 0 deletions .covrignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
R/zzz.R
4 changes: 2 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
- uses: r-lib/actions/setup-r@v1
- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
install.packages(c("remotes", "rcmdcheck", "knitr", "rmarkdown"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Check
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
rcmdcheck::rcmdcheck(args = c("--no-manual", "--ignore-vignettes", "--no-build-vignettes", "--as-cran"), build_args = c("--no-manual", "--no-build-vignettes"), error_on = "error")
shell: Rscript {0}
32 changes: 32 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Upload and invalidate docs Website

on:
push:
branches:
- main
- master
paths:
- docs/**

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1'
SOURCE_DIR: 'docs'
DEST_DIR: 'imola'
- uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
PATHS: "/imola/*"
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
29 changes: 29 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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: [main, master]
pull_request:
branches: [main, master]

name: test-coverage

jobs:
test-coverage:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
covr
rvest
rstudio/webshot2
- name: Test coverage
run: |
covr::codecov()
shell: Rscript {0}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
.Rhistory
.RData
.Ruserdata
docs
**/rsconnect
/doc/
/Meta/
11 changes: 9 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: imola
Type: Package
Title: CSS Layouts (Grid and Flexbox) Implementation for R/Shiny
Version: 0.3.2
Version: 0.4.0
Authors@R: person("Pedro", "Silva", email = "pedrocoutinhosilva@gmail.com",
role = c("aut", "cre"))
Description: Allows easy creation of CSS layouts (grid and flexbox)
Expand All @@ -10,6 +10,8 @@ License: MIT + file LICENSE
URL: https://github.com/pedrocoutinhosilva/imola
Encoding: UTF-8
LazyData: true
VignetteBuilder:
knitr
Imports:
shiny,
htmltools,
Expand All @@ -18,5 +20,10 @@ Imports:
glue,
yaml
Suggests:
testthat
testthat (>= 3.0.0),
rvest,
devtools,
covr
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
Config/testthat/edition: 3
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export(flexPanel)
export(gridPage)
export(gridPanel)
export(listTemplates)
export(makeTemplate)
export(registerBreakpoint)
export(registerTemplate)
export(setBreakpointSystem)
Expand Down
6 changes: 5 additions & 1 deletion R/breakpoints.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#' systems can be found under getOption("imola.breakpoints")
#'
#' @return A named list of media breakpoints options.
#' @keywords breakpoints
#' @export
setBreakpointSystem <- function(system) {
options(imola.mediarules = getOption("imola.breakpoints")[[system]])
Expand All @@ -16,18 +17,20 @@ setBreakpointSystem <- function(system) {
#' registerBreakpoint() and unregisterBreakpoint() functions.
#'
#' @return A named list of media breakpoints options.
#' @keywords breakpoints
#' @export
activeBreakpoints <- function() {
getOption("imola.mediarules")
}

#' Adds a new breakpoint entry to the currelty active media breakpoints.
#' Adds a new breakpoint entry to the current active media breakpoints.
#'
#' @param name The name of the entry to remove
#' @param min The minimum screen width (in pixels) when the rule is active
#' @param max The maximum screen width (in pixels) when the rule is active
#'
#' @return No return value, called for side effects
#' @keywords breakpoints
#' @export
registerBreakpoint <- function(name, min = NULL, max = NULL) {
rules <- getOption("imola.mediarules")
Expand All @@ -41,6 +44,7 @@ registerBreakpoint <- function(name, min = NULL, max = NULL) {
#' @param name The name of the entry to remove
#'
#' @return No return value, called for side effects
#' @keywords breakpoints
#' @export
unregisterBreakpoint <- function(name) {
rules <- getOption("imola.mediarules")
Expand Down
Loading

0 comments on commit 952ebc8

Please sign in to comment.