rstudio / rstudio/bslib

as.tags.bslib_sidebar guard is always FALSE

Open
#1,334 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triage:done Priority: Medium
Dominant language
SCSS
Stars
569
Forks
72
Avg merge
1d 2h
Merged PRs (30d)
5

Description

Describe the problem

R/sidebar.R:177 (as.tags.bslib_sidebar):

as.tags.bslib_sidebar <- function(x, ...) {
  if (is.null(open)) {
    open <- sidebar_open_on()
  }

There is no open in scope; the symbol resolves to base::open (a generic, never NULL), so the guard is always FALSE and sidebar_open_on() is never called. Then the local open is never used again anyway. Either it should be if (is.null(x$open)) x$open <- sidebar_open_on() or the block should be deleted.

You ask for an issue before a PR but the patch for the former option is here: https://github.com/rstudio/bslib/commit/6e76332740af9051d3a798f990216b13679186fb

Found with https://github.com/sims1253/ry :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at R/sidebar.R:177 and inspect as.tags.bslib_sidebar alongside sidebar_open_on(). Compare the referenced commit with the issue's two proposed dispositions, then verify that the selected behavior is reflected in this entry point and the repository's relevant checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.