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

Two quick fixes for sidebar mobile/desktop options #950

Merged
merged 2 commits into from
Dec 20, 2023
Merged
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
4 changes: 2 additions & 2 deletions R/sidebar.R
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ as_sidebar_open_on <- function(open) {
if (length(open) == 1) {
open <- sidebar_open_as_string(open, extra = "desktop", rlang::caller_env())
if (identical(open, "desktop")) {
return(sidebar_open_on("open", "always"))
return(sidebar_open_on("open", "closed"))
}
return(sidebar_open_on(open, open))
}
Expand Down Expand Up @@ -396,7 +396,7 @@ layout_sidebar <- function(
#' used).
#' @export
toggle_sidebar <- function(id, open = NULL, session = get_current_session()) {
method <- sidebar_open_as_string(open %||% "toggle")
method <- sidebar_open_as_string(open %||% "toggle", "toggle")

if (identical(method, "always")) {
abort('`open = "always"` is not supported by `sidebar_toggle()`.')
Expand Down
Loading