fix(ui5-shellbar-item): render overflow badge as inline span after item text#13849
Draft
plamenivanov91 wants to merge 3 commits into
Draft
fix(ui5-shellbar-item): render overflow badge as inline span after item text#13849plamenivanov91 wants to merge 3 commits into
plamenivanov91 wants to merge 3 commits into
Conversation
…ead of CSS ::after Replace the fragile CSS pseudo-element approach for the count badge on ShellBarItem overflow list items with a proper semantic implementation: - ShellBarItemTemplate: pass `count` as `additionalText` on ListItemStandard instead of `data-count`; the component renders it inline after the title text, exactly matching the Figma spec placement (before the trailing arrow) - ShellBarItem.css: drop `[ui5-li]:after` / `[ui5-li][data-count]:after` rules; add `[ui5-li]::part(additional-text)` to style the badge pill using SAP design tokens (sapContent_BadgeBackground, sapFontBoldFamily, _ui5_shellbar_button_badge_border) - ShellBarPopover.css: remove duplicate `[ui5-li]:after` block ? it was dead code because ShellBar's shadow root cannot pierce two shadow levels into ListItemStandard's internals through ShellBarItem - ShellBar.html: add three Figma badge scenario samples ? badge visible in bar, one badged item overflowed (counter on overflow button), multiple badged items overflowed (attention dot on overflow button)
plamenivanov91
temporarily deployed
to
netlify-preview
July 21, 2026 11:48 — with
GitHub Actions
Inactive
|
🚀 Deployed on https://pr-13849--ui5-webcomponents-preview.netlify.app |
…em text Replace the CSS ::after pseudo-element approach for the count badge on ShellBarItem overflow list items with a dedicated shadow DOM span that sits immediately after the item text ? matching the Figma spec placement. - ShellBarItemTemplate: render <span class="ui5-shellbar-item-text"> and <span class="ui5-shellbar-item-badge"> as slotted children of ListItemStandard instead of using additionalText; the badge span lives in ShellBarItem's shadow DOM so ListItem.css active-state color overrides cannot reach it ? no !important needed - ShellBarItem.css: replace [ui5-li]:after / [ui5-li][data-count]:after rules with ::part(title) flex layout and .ui5-shellbar-item-badge pill styles using SAP badge design tokens - ShellBar.html: add three Figma badge scenario samples ? badges visible in bar, one badged item overflowed (counter on overflow button), multiple badged items overflowed (attention dot on overflow button) - ShellBar.cy.tsx: add two tests covering overflow badge span rendering and count update propagation; mount ShellBarItem standalone to prevent ShellBar overflow logic from resetting inOverflow mid-test
plamenivanov91
temporarily deployed
to
netlify-preview
July 21, 2026 15:00 — with
GitHub Actions
Inactive
plamenivanov91
temporarily deployed
to
netlify-preview
July 21, 2026 15:01 — with
GitHub Actions
Inactive
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.
Replace the CSS ::after pseudo-element approach for the count badge on
ShellBarItem overflow list items with a dedicated shadow DOM span placed
immediately after the item text — matching the Figma spec placement.
<span class="ui5-shellbar-item-text">and<span class="ui5-shellbar-item-badge">as slotted children ofListItemStandard; the badge span lives in ShellBarItem's own shadow DOM
so ListItem.css active-state color overrides cannot reach it — no
!important needed, no cross-package changes required
[ui5-li]:after/[ui5-li][data-count]:afterrules with
::part(title)flex layout and.ui5-shellbar-item-badgepillstyles using SAP badge design tokens
[ui5-li]:afterblock — dead codesince ShellBar's shadow root cannot pierce two shadow levels into
ListItemStandard's internals through ShellBarItem
bar, one badged item overflowed (counter on overflow button), multiple
badged items overflowed (attention dot on overflow button)
count update propagation
Fixes: #12490
JIRA: BGSOFUIPIRIN-7082