Skip to content

Keep dashboard HTML output mistaken for bslib output in its card - #15024

Merged
cderv merged 1 commit into
quarto-dev:mainfrom
jooyoungseo:bugfix/15023-dashboard-bslib-pattern
Oct 12, 2026
Merged

cderv merged 1 commit into
quarto-dev:mainfrom
jooyoungseo:bugfix/15023-dashboard-bslib-pattern

Conversation

@jooyoungseo

@jooyoungseo jooyoungseo commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Closes #15023.

The dashboard filter lifts a cell's raw HTML output out of its card when it takes the output for bslib components. It tested for them with text:match('bslib-'). In a Lua pattern - is a quantifier (zero or more of the preceding character, as few as possible), so the pattern matched any text containing bsli, for example:

  • the word "subslide";
  • bslib with no hyphen.

Such output left its card, and a card with nothing else in it was dropped, title included.

The pattern is now 'bslib%-'. It matches only the literal bslib-, the prefix bslib uses in its classes, ids, attributes and custom elements such as <bslib-tooltip>.

One real component changes. py-shiny's ui.accordion() without an id names its elements bslib_accordion_* and contains no bslib-, so it was lifted only through the loose match. It now stays in its cell's card, with the card's title, like any other output. Two related outputs are still lifted:

  • R's bslib::accordion(), whose ids are bslib-accordion-*;
  • a py-shiny accordion given an id, which adds the class bslib-accordion-input.

Not changed here:

Tests

New tests/docs/smoke-all/2026/10/11/issue-15023.qmd, a dashboard with three Python cells:

  • the outputs "A subslide of the deck" and "Cards are built by bslib" must stay in the card built from their cell;
  • an output with a bslib- class must still be lifted out of its cell's card.

The selectors are scoped to .card.cell, the card built from a cell. Without the fix all three outputs are lifted, so no cell card is left. The dashboard then wraps the page's loose content, those outputs included, in a card of its own without .cell. A selector on .card alone, such as .card .test-subslide, would match inside that card and pass.

Locally:

  • Without the fix, the new test fails on .card.cell .test-subslide.
  • With the lift disabled (its condition forced to false), it fails on .card.cell .test-lifted, so the test also catches real bslib output left in its card.
  • With the fix, it passes, and so do all 49 smoke-all tests under docs/smoke-all/dashboard/.
  • A dashboard whose cell outputs bslib::value_box() renders byte-identical HTML with and without the fix.

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes: the smoke-all tests under docs/smoke-all/dashboard/, run locally
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR: not applicable, as no option or documented behavior changes
AI-assisted PR
  • AI tool used: Claude Code
  • Codebase grounding: local clone of quarto-cli, including its .claude/rules and llm-docs
  • Human review: I have reviewed, tested, and verified the AI-generated content before submitting.

The dashboard filter lifts a cell's raw HTML output out of its card when
it takes the output for bslib components, and it tested for them with the
Lua pattern `bslib-`. In a Lua pattern `-` is a quantifier, so the pattern
matched any text containing `bsli`, such as the word "subslide" or the
name `bslib` without a hyphen. That output left its card, and a card with
nothing else in it was dropped, title included. The hyphen is now
escaped, so the pattern matches only the literal `bslib-`, the prefix
bslib uses in its classes, ids, attributes and custom elements.

Closes quarto-dev#15023
Copilot AI balanced review requested due to automatic review settings October 11, 2026 13:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@posit-snyk-bot

posit-snyk-bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@jooyoungseo
jooyoungseo requested a review from cderv October 11, 2026 14:11

@cderv cderv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you !

@cderv
cderv merged commit 7d04eeb into quarto-dev:main Oct 12, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard: HTML output containing "bsli" is mistaken for bslib output and pulled out of its card

4 participants