Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redocument with roxygen2 7.3.1 + add missing @export #811

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ Config/Needs/coverage: covr
Config/Needs/website: pkgdown, tidyverse/tidytemplate
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
SystemRequirements: pandoc (>= 1.14) - http://pandoc.org
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,20 @@

S3method(format,learnr_available_tutorials)
S3method(format,mock_exercise)
S3method(format,shiny_selector)
S3method(format,shiny_selector_list)
S3method(format,tutorial_exercise)
S3method(format,tutorial_question)
S3method(format,tutorial_question_answer)
S3method(format,tutorial_quiz)
S3method(knit_print,tutorial_question)
S3method(knit_print,tutorial_quiz)
S3method(mutate_tags,default)
S3method(mutate_tags,list)
S3method(mutate_tags,shiny.tag)
S3method(print,learnr_available_tutorials)
S3method(print,shiny_selector)
S3method(print,shiny_selector_list)
S3method(print,tutorial_exercise)
S3method(print,tutorial_question)
S3method(print,tutorial_question_answer)
Expand Down
6 changes: 6 additions & 0 deletions R/html_selector.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,27 @@ as_selector_list <- function(selector) {
selector
}

#' @export
format.shiny_selector <- function(x, ...) {
if (x$match_everything) {
paste0("* // match everything")
} else {
paste0(x$element, if (!is.null(x$id)) paste0("#", x$id), paste0(".", x$classes, collapse = ""))
}
}

#' @export
format.shiny_selector_list <- function(x, ...) {
paste0(unlist(lapply(x, format, ...)), collapse = " ")
}

#' @export
print.shiny_selector <- function(x, ...) {
cat("// css selector\n")
cat(format(x, ...), "\n")
}

#' @export
print.shiny_selector_list <- function(x, ...) {
cat("// css selector list\n")
cat(format(x, ...), "\n")
Expand Down
3 changes: 3 additions & 0 deletions R/mutate_tags.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ mutate_tags <- function(ele, selector, fn, ...) {
UseMethod("mutate_tags", ele)
}

#' @export
mutate_tags.default <- function(ele, selector, fn, ...) {
if (any(
c(
Expand All @@ -31,6 +32,7 @@ mutate_tags.default <- function(ele, selector, fn, ...) {
)
}

#' @export
mutate_tags.list <- function(ele, selector, fn, ...) {
# set values to maintain attrs and class values
ele[] <- lapply(
Expand All @@ -42,6 +44,7 @@ mutate_tags.list <- function(ele, selector, fn, ...) {
ele
}

#' @export
mutate_tags.shiny.tag <- function(ele, selector, fn, ...) {
# # vectorize selector. (Currently not used, so removed)
# if (inherits(selector, "character")) {
Expand Down
Loading