shiny.fluent
shiny.fluent copied to clipboard
Prepare shiny.fluent for CRAN submission
Ensure that R CMD check --as-cran
passes without any errors, warnings or notes. Update CI to fail on notes (currently it only fails on errors).
R CMD check --as-cran
reports:
- 1 warning, mostly
Undocumented arguments in documentation object {Component}
andDocumented arguments not in \usage in documentation object {Component}
- 3 notes:
- package size exceeds allowed 5Mb
sub-directories of 1Mb or more: doc 4.9Mb www 4.7Mb
-
Unexported object imported by a ':::' call: ‘shiny:::resolve’
- Multiple:
\examples lines wider than 100 characters
- package size exceeds allowed 5Mb
When components are generated using shiny.fluent:::component
factory the ...
argument is not documented which results in e.g. Undocumented arguments in documentation object 'Toggle' ‘...’
. It can be resolved using e.g.
# components.R
component <- function(name) {
function(...) shiny.react::reactElement(
module = "@fluentui/react", name = name,
props = shiny.react::asProps(...),
deps = shinyFluentDependency()
)
}
#' Ellipsis documentation template
#' @name doc
#' @param ... Props to pass to \code{shiny.react::reactElement}. See allowed props listed below
NULL
#' @rdname Toggle
#' @inheritParams doc
#' @export
Toggle <- component("Toggle")
But then it prepends ellipsis to the list of arguments of every component
This is in line with actual usage of components as every prop needs to be passed as a named argument using ellipsis, but on the other hand documentation is actually "duplicated" as each prop is contained in ellipsis and it may be confusing.
This "See allowed props listed below" comment may do the job IMO, but do you know any other way how to combine those arguments together in docs? @kamilzyla
Similar thing could be applied to create documentation for {Component}.shinyInput
and update{Component}.shinyInput
(session
, value
, inputId
) arguments. It would get rid of a huge portion of R CMD check
notes.
Is it any update about the CRAN submission? I tried to install the package for testing purposes from CRAN and it is yet not available (shiny.react it is).
Many thanks,
Corina
Hi @corinabioinformatic,
submitting the package to CRAN is still in progress, but you can always install the package from GitHub using:
remotes::install_github("Appsilon/shiny.react")
remotes::install_github("Appsilon/shiny.fluent")
To close this issue those must be closed first:
- [x] #122
- [x] #128
- [x] #99