Skip to content

Commit

Permalink
Merge pull request #83 from react-R/develop
Browse files Browse the repository at this point in the history
`list` class #82, hydrate tags in attribs #67, switch to `vite`/`vitest`
  • Loading branch information
timelyportfolio authored Jun 28, 2024
2 parents fb3ba30 + a037a58 commit 4029c3e
Show file tree
Hide file tree
Showing 48 changed files with 3,706 additions and 7,727 deletions.
7 changes: 3 additions & 4 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
^CONDUCT\.md$
^README\.Rmd$
^\.Rproj\.user$
^\.travis\.yml$
^buildupdate$
^docs$
^cran-comments\.md$
^karma\.conf\.js$
^logo.svg$
^package\.json$
^webpack\.config\.js$
^yarn\.lock$
^vite\.config\.js$
^package-lock\.json$
^logo\.svg$
^\.github$
^CRAN-SUBMISSION$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ reactR.Rcheck
reactR_*.tar.gz
*.swp
.DS_Store
inst/www/react-tools/react-tools.js
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: reactR
Type: Package
Title: React Helpers
Version: 0.5.0
Date: 2023-10-01
Version: 0.6.0
Date: 2024-06-26
Authors@R: c(
person(
"Facebook", "Inc"
Expand Down Expand Up @@ -46,5 +46,5 @@ Suggests:
knitr,
usethis,
jsonlite
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
VignetteBuilder: knitr
12 changes: 12 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# reactR 0.6.0

* retain `list` in `reactR::component` classes [#82](https://github.com/react-R/reactR/issues/82)
* hydrate props/attribs that are tags assuming tag-like props/attribs should be slots[#67](https://github.com/react-R/reactR/issues/67) [#61](https://github.com/react-R/reactR/issues/61)
* update build tools to `vite` from `webpack`
* update js testing library from `karma` to `vitest`


# reactR 0.5.0

* Update react to `18.2.0`

# reactR 0.4.4

* Update react to `16.12.0`
Expand Down
4 changes: 2 additions & 2 deletions R/dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ html_dependency_reacttools <- function(){
htmltools::htmlDependency(
name = "reactwidget",
src = "www/react-tools",
version = "1.0.0",
version = "2.0.0",
package = "reactR",
script = c("react-tools.js")
script = c("react-tools.umd.cjs")
)
}

Expand Down
6 changes: 3 additions & 3 deletions R/reacttools.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ component <- function(name, varArgs = list()) {
stop("Component name must be specified and start with an upper case character")
}
component <- htmltools::tag(name, varArgs)
structure(component, class = c("reactR_component", oldClass(component)))
structure(component, class = c("reactR_component", oldClass(component), "list"))
}

#' React component builder.
Expand Down Expand Up @@ -145,10 +145,10 @@ createReactShinyInput <- function(inputId,
container(id = inputId, class = class),
htmltools::tags$script(id = sprintf("%s_value", inputId),
type = "application/json",
jsonlite::toJSON(value, auto_unbox = TRUE, null = "null")),
jsonlite::toJSON(value, auto_unbox = TRUE, null = "null", force = TRUE)),
htmltools::tags$script(id = sprintf("%s_configuration", inputId),
type = "application/json",
jsonlite::toJSON(configuration, auto_unbox = TRUE, null = "null")),
jsonlite::toJSON(configuration, auto_unbox = TRUE, null = "null", force = TRUE)),
dependencies
)
}
2 changes: 1 addition & 1 deletion docs/404.html

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

2 changes: 1 addition & 1 deletion docs/CONDUCT.html

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

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

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

129 changes: 26 additions & 103 deletions docs/articles/index.html

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

Loading

0 comments on commit 4029c3e

Please sign in to comment.