Skip to content

fix(ui5-bar, ui5-button): prevent button badge from being clipped inside ui5-bar#13618

Open
hinzzx wants to merge 1 commit into
mainfrom
bar-with-btn-badge-fix
Open

fix(ui5-bar, ui5-button): prevent button badge from being clipped inside ui5-bar#13618
hinzzx wants to merge 1 commit into
mainfrom
bar-with-btn-badge-fix

Conversation

@hinzzx
Copy link
Copy Markdown
Contributor

@hinzzx hinzzx commented Jun 1, 2026

Overview

Button badges were cut off when the button sat inside a ui5-bar. The bar's overflow rules clipped the badge that intentionally sticks out above the button.

What We Did

  • Loosened the bar's overflow rules so badges and similar protruding visuals stay visible above the bar.
  • Kept slotted titles and labels truncating with ellipsis as before.
  • Tightened the badge offset only for buttons placed inside a bar, so the badge sits closer to the button corner.

What This Fixes

  • Badge visibility, badges on buttons inside a bar render fully.
  • Visual fit, the badge overhang inside a bar is reduced; standalone buttons look unchanged.
  • No regressions, long titles still cannot spill past the bar's sides, and ellipsis still applies to slotted text content.

Before

image

After

image

Fixes: #13541

@hinzzx hinzzx temporarily deployed to netlify-preview June 1, 2026 12:16 — with GitHub Actions Inactive
@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview June 1, 2026 12:23 Inactive
@hinzzx hinzzx requested a review from GDamyanov June 3, 2026 11:17

::slotted([ui5-button]) {
margin: 0 0.25rem;
--_ui5_button_overlay_badge_offset: -0.25rem;
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.

This is redundant

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

On Cozy when a button is in a Bar and has a badge, the badge overflows outside the bar boundaries. It looks correct on compact though, so I will apply it only in Compact.

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.

[ui5-button-badge]: cut off when used inside ui5-bar

3 participants