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

version_tooltip works again in dev mode: auto #2694

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
14 changes: 10 additions & 4 deletions R/render.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@

# Development settings; tooltip needs to be generated at render time
out$development <- pkg$development
out$development$version_tooltip <- version_tooltip(pkg$development$mode)
if (identical(pkg$development$mode, "devel")) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (identical(pkg$development$mode, "devel")) {
if (identical(pkg$development$mode, "devel") && identical(pkg$meta$development$mode, "auto")) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean ||?

out$development$version_tooltip <- pkg$meta$development$version_tooltip %||%
version_tooltip(pkg$development$mode)

Check warning on line 127 in R/render.R

View check run for this annotation

Codecov / codecov/patch

R/render.R#L126-L127

Added lines #L126 - L127 were not covered by tests
} else {
out$development$version_tooltip <- version_tooltip(pkg$development$mode)
}


out$navbar <- data_navbar(pkg, depth = depth)
out$footer <- data_footer(pkg)
Expand Down Expand Up @@ -163,7 +169,7 @@
if (is.null(og)) {
return()
}

is_yaml <- is.null(file_path)
base_path <- if (is_yaml) "template.opengraph" else "opengraph"

Expand Down Expand Up @@ -220,7 +226,7 @@
}
not <- obj_type_friendly(x)
config_abort(
pkg,
pkg,
"{.field {error_path}} must be a list, not {not}.",
path = file_path,
call = error_call
Expand Down Expand Up @@ -259,7 +265,7 @@

cur_contents <- paste0(read_lines(path), collapse = "\n")
cur_hash <- digest::digest(cur_contents, serialize = FALSE)

identical(new_hash, cur_hash)
}

Expand Down
Loading