rstudio / rstudio/bslib

nav_insert not creating fillable tabs

Open
#952 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
569
Forks
72
Avg merge
1d 2h
Merged PRs (30d)
5

Description

nav_panels inserted progmatically using nav_insert() are not fillable.

'Page 1' has class tab-pane html-fill-item html-fill container bslib-gap-spacing, whilst the new 'Page 2' just has class tab-pane.

library(bslib)

ui <- page_navbar(
    id = 'nav',
    nav_panel('Page 1',
              card("Content 1")))

server <- function(input, output, session) {
    nav_insert(id = "nav",
               nav = nav_panel('Page 2',
                               card("Content 2")))
}

shinyApp(ui, server)
Session Info

version R version 4.3.2 (2023-10-31 ucrt)
os Windows 10 x64 (build 19045)
system x86_64, mingw32
ui RStudio
language (EN)
collate English_United Kingdom.utf8
ctype English_United Kingdom.utf8
tz Europe/London
date 2023-12-21
rstudio 2023.09.1+494 Desert Sunflower (desktop)
pandoc NA

─ Packages ───────────────────────────────────────────────────────────────────────
package * version date (UTC) lib source
bslib * 0.6.1 2023-11-28 [1] CRAN (R 4.3.2)
cachem 1.0.8 2023-05-01 [1] CRAN (R 4.3.1)
callr 3.7.3 2022-11-02 [1] CRAN (R 4.3.1)
cli 3.6.1 2023-03-23 [1] CRAN (R 4.2.3)
colorspace 2.1-0 2023-01-23 [1] CRAN (R 4.3.1)
crayon 1.5.2 2022-09-29 [1] CRAN (R 4.2.3)
devtools 2.4.5 2022-10-11 [1] CRAN (R 4.2.2)
digest 0.6.33 2023-07-07 [1] CRAN (R 4.3.1)
dplyr 1.1.3 2023-09-03 [1] CRAN (R 4.3.1)
ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.1.3)
fansi 1.0.5 2023-10-08 [1] CRAN (R 4.3.1)
fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.3.1)
fs 1.6.3 2023-07-20 [1] CRAN (R 4.3.1)
generics 0.1.3 2022-07-05 [1] CRAN (R 4.1.3)
ggplot2 3.4.4 2023-10-12 [1] CRAN (R 4.3.1)
glue 1.6.2 2022-02-24 [1] CRAN (R 4.1.3)
gtable 0.3.4 2023-08-21 [1] CRAN (R 4.3.1)
htmltools 0.5.7 2023-11-03 [1] CRAN (R 4.3.2)
htmlwidgets 1.6.2 2023-03-17 [1] CRAN (R 4.3.1)
httpuv 1.6.11 2023-05-11 [1] CRAN (R 4.3.1)
jquerylib 0.1.4 2021-04-26 [1] CRAN (R 4.1.3)
jsonlite 1.8.7 2023-06-29 [1] CRAN (R 4.2.3)
later 1.3.0 2021-08-18 [1] CRAN (R 4.1.3)
lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.2.3)
magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.1.3)
memoise 2.0.1 2021-11-26 [1] CRAN (R 4.2.3)
mime 0.12 2021-09-28 [1] CRAN (R 4.1.1)
miniUI 0.1.1.1 2018-05-18 [1] CRAN (R 4.1.3)
munsell 0.5.0 2018-06-12 [1] CRAN (R 4.1.3)
pillar 1.9.0 2023-03-22 [1] CRAN (R 4.2.3)
pkgbuild 1.4.2 2023-06-26 [1] CRAN (R 4.3.1)
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.1.3)
pkgload 1.3.3 2023-09-22 [1] CRAN (R 4.3.1)
prettyunits 1.2.0 2023-09-24 [1] CRAN (R 4.3.1)
processx 3.8.2 2023-06-30 [1] CRAN (R 4.3.1)
profvis 0.3.8 2023-05-02 [1] CRAN (R 4.3.1)
promises 1.2.1 2023-08-10 [1] CRAN (R 4.3.1)
ps 1.7.5 2023-04-18 [1] CRAN (R 4.3.1)
purrr 1.0.2 2023-08-10 [1] CRAN (R 4.3.1)
R6 2.5.1 2021-08-19 [1] CRAN (R 4.1.3)
Rcpp 1.0.11 2023-07-06 [1] CRAN (R 4.3.1)
remotes 2.4.2.1 2023-07-18 [1] CRAN (R 4.3.1)
rlang 1.1.1 2023-04-28 [1] CRAN (R 4.2.3)
rstudioapi 0.15.0 2023-07-07 [1] CRAN (R 4.2.3)
sass 0.4.7 2023-07-15 [1] CRAN (R 4.3.1)
scales 1.2.1 2022-08-20 [1] CRAN (R 4.2.3)
sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.1.3)
shiny * 1.7.5.1 2023-10-14 [1] CRAN (R 4.3.1)
stringi 1.7.12 2023-01-11 [1] CRAN (R 4.3.0)
stringr 1.5.0 2022-12-02 [1] CRAN (R 4.2.3)
tibble 3.2.1 2023-03-20 [1] CRAN (R 4.2.3)
tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.2.3)
urlchecker 1.0.1 2021-11-30 [1] CRAN (R 4.1.3)
usethis 2.2.2 2023-07-06 [1] CRAN (R 4.3.1)
utf8 1.2.3 2023-01-31 [1] CRAN (R 4.3.1)
vctrs 0.6.3 2023-06-14 [1] CRAN (R 4.2.3)
withr 2.5.1 2023-09-26 [1] CRAN (R 4.3.1)
xtable 1.8-4 2019-04-21 [1] CRAN (R 4.1.3)

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 with the nav_insert() and nav_panel() entry points shown in the issue, then inspect how the inserted Page 2 markup differs from the initial Page 1 markup. Confirm that dynamically inserted panels receive the same fillable classes as the initial panel and verify the reproduced example afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.