rstudio / rstudio/bslib

Cannot set class of navset cards

Open
#1,075 1 comment 1 reaction 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

navset_card_tab() creates a tabbed card, but doesn't include all of the arguments of card(). In particular, you cannot give the card a class without reaching for htmltools::tagAppendAttributes().

library(bslib)

navset_card_tab(
  class = "bg-text-primary",
  nav_panel("One", "First panel")
)
#> Error in buildTabset(..., ulClass = paste0("nav nav-", type), id = id, : Tabs should all be unnamed arguments, but some are named: class

(Not that .text-bg-primary would look great on a navset_card_tab(), adding the class reveals other styling issues. That said, it should at least be possible.)

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 by comparing the argument handling in navset_card_tab() with card(), using the reproducible R example in the issue. Check how the class argument is separated from nav_panel() arguments; done means navset_card_tab() accepts a card class without treating class as a named tab argument.

Written by the indexing model from the issue text.

Assessment

Tech stack
bootstrap, r
Domain
frontend
Issue type
Feature
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.