Skip to content

Commit b0de689

Browse files
authored
tagify() dynamic UI before attempting to write the tags (#3392)
* Close #3391: properly tagify() dynamic UI before attempting to write the tags * Document (GitHub Actions) Co-authored-by: cpsievert <[email protected]>
1 parent d65ad5e commit b0de689

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

R/html-deps.R

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,18 @@ createWebDependency <- function(dependency, scrubFile = TRUE) {
4040

4141
# Given a Shiny tag object, process singletons and dependencies. Returns a list
4242
# with rendered HTML and dependency objects.
43+
# This implementation is very similar to renderTags(), but ignores
44+
# <head> handling (it should only be used after the user session has started)
4345
processDeps <- function(tags, session) {
44-
ui <- takeSingletons(tags, session$singletons, desingleton=FALSE)$ui
46+
tags <- getFromNamespace("tagify", "htmltools")(tags)
47+
ui <- takeSingletons(tags, session$singletons, desingleton = FALSE)$ui
4548
ui <- surroundSingletons(ui)
4649
dependencies <- lapply(
47-
resolveDependencies(findDependencies(ui)),
50+
resolveDependencies(findDependencies(ui, tagify = FALSE)),
4851
createWebDependency
4952
)
5053
names(dependencies) <- NULL
5154

52-
# If ui is a tagFunction() (e.g., insertTab() et al),
53-
# then doRenderTags() won't work...
54-
if (inherits(ui, "shiny.tag.function")) {
55-
ui <- renderTags(ui)$html
56-
}
57-
5855
list(
5956
html = doRenderTags(ui),
6057
deps = dependencies

man/reexports.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)