fix: Update toolbar snapshots (broken after latest shiny changes)#1289
Closed
elnelson575 wants to merge 14 commits intomainfrom
Closed
fix: Update toolbar snapshots (broken after latest shiny changes)#1289elnelson575 wants to merge 14 commits intomainfrom
elnelson575 wants to merge 14 commits intomainfrom
Conversation
The toolbar_input_button() HTML output has changed from multi-line formatted HTML to single-line (minified) format. This is a cosmetic change - the actual HTML structure and functionality remain identical. All 11 snapshot tests in test-toolbar.R are updated to reflect the new single-line format where whitespace and newlines have been removed from the HTML output. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Overrides shiny's new .action-button .action-icon+.action-label margin-left rule for toolbar icon-only buttons. This prevents the hidden label element from affecting the button's vertical alignment. The shiny PR #4350 added margin-left to .action-label elements to fix underline rendering issues. However, for bslib's icon-only toolbar buttons, the label is hidden but still present in the DOM, causing the margin to create unexpected vertical alignment issues when combined with the minified HTML output. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
31ba0b2 to
d93145d
Compare
This reverts commit d93145d.
This reverts commit 891b51a.
This reverts commit bfd9517.
- Add display: flex to all toolbar buttons to prevent inline baseline issues - Override shiny's margin-left on .action-icon + .action-label for toolbar buttons
Moved display: flex from separate rule block into the main .bslib-toolbar-input-button selector for better organization and to ensure proper flex layout for toolbar buttons with the minified HTML from shiny 1.12.1.9000.
- Updated toolbar.scss to use margin: 0 on both .action-icon and .action-label - Applied snapshot updates for bs-theme-preset files
224527f to
4d203bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates toolbar test snapshots to match the minified HTML output format introduced in shiny 1.12.1.9000.
Background
Shiny PR #4350 ("Update to remove whitespace and add padding when necessary") added
.noWSparameters toactionButton()andactionLink()to fix an underline rendering bug. This change removes whitespace from the HTML output, producing single-line (minified) HTML instead of pretty-printed multi-line format.Since
toolbar_input_button()callsshiny::actionButton()internally, it inherits this minified HTML behavior. While this doesn't make much of a difference inshiny::actionButton()'s appearance, toolbar buttons include the tooltip wrapper, which has a larger surrounding html wrapper, so the block of html that is compacted is larger.Changes
tests/testthat/_snaps/toolbar.mdwith de-WS'd HTML formatTesting
Fixes the test failures from https://github.com/rstudio/bslib/actions/runs/22360039053