Skip to content

feat(badges): enhance badge display and styling#1494

Open
dauriamarco wants to merge 1 commit intomainfrom
fix/side-panel-notifications
Open

feat(badges): enhance badge display and styling#1494
dauriamarco wants to merge 1 commit intomainfrom
fix/side-panel-notifications

Conversation

@dauriamarco
Copy link
Member

Closes #1402.


@dauriamarco dauriamarco added this to the 49.x milestone Feb 10, 2026
@dauriamarco dauriamarco self-assigned this Feb 10, 2026
@dauriamarco dauriamarco requested review from a team as code owners February 10, 2026 18:07
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the badge display in collapsible panels by adding a badge on the icon in the collapsed state and formatting badge numbers greater than 99 to display as '+99'. The changes look good overall. I've added a couple of suggestions to improve code readability and consistency in the component's template and TypeScript logic. The snapshot updates are consistent with the implemented changes.

@github-actions
Copy link

@dauriamarco dauriamarco force-pushed the fix/side-panel-notifications branch from e52a9b5 to c2fa98e Compare February 11, 2026 10:12
{{ badge() }}
</span>
}
<span class="position-relative">
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<span class="position-relative">
<span class="d-flex position-relative">

then you can remove the styling overrides of the badge-text

Copy link
Member Author

Choose a reason for hiding this comment

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

are you sure? it seems like I would still need the overrides

Copy link
Member

Choose a reason for hiding this comment

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

with that it would be same as in the application-header.
I guess the problem is, that the icon size is wrong.

In header and navbar-vertical we have 24px (icon-lg).

Copy link
Member Author

@dauriamarco dauriamarco Feb 11, 2026

Choose a reason for hiding this comment

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

should I change the icon size separately to 24px in the side-panel @panch1739? however, a part from that, I think the main issue would be the anchoring, meaning that the badge in this case should grow towards the left when multiple digits are present as the side-panel is aligned to the right of the screen, and that's why I used inset-inline-end instead

Copy link
Member

Choose a reason for hiding this comment

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

I don't like that we would have different behavior of .badge-text. Can we change behavior in general?

Copy link
Member Author

Choose a reason for hiding this comment

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

I would agree, I had a similar thought but I wasn't sure especially because, in addition to the css overrides, I had to change a little bit the template structure as well so it seemed complicated. But, anyway, I can think of a more general/flexible solution for the template structure and introducing something like .badge-text-left .badge-text-right or an additional .badge-left or .left / .badge-right or .right class for the alignment (?)

@dauriamarco dauriamarco force-pushed the fix/side-panel-notifications branch from c2fa98e to 8ddaf8b Compare February 11, 2026 13:53
@github-actions
Copy link

Code Coverage

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.

Side panel with various options: badge behavior

3 participants