Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui5-shellbar): replace custom badges with ButtonBadge #11284

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

NakataCode
Copy link
Contributor

@NakataCode NakataCode commented Apr 8, 2025

Changes to the Template:

  • Removed data and notification attributes from buttons
  • Added ButtonBadge component to handle:
    • Notification counts (notificationsCount)
    • Data counts (item.count)
    • Overflow notification counts (_overflowNotifications)

Changes to the CSS:

  • Removed pseudo-element styles previously used for badges
  • Added offset to bell button badge to prevent clipping
  • Added offset to last button in overflow container to prevent badge clipping

Changes to the tests:

  • Removed outdated tests that checked for data-count attributes
  • Added three new Cypress tests covering ButtonBadge functionality:
    • Verification of count display
    • Validation of count updates
    • Testing of overflow badge behavior

@NakataCode NakataCode marked this pull request as ready for review April 9, 2025 09:38
@NakataCode NakataCode requested a review from Copilot April 14, 2025 08:40
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • packages/fiori/src/themes/ShellBar.css: Language not supported
  • packages/main/src/themes/base/rtl-parameters.css: Language not supported
Comments suppressed due to low confidence (1)

packages/fiori/src/ShellBar.ts:1133

  • Replacing the isIconHidden() function with a direct class check may not cover all intended cases; please confirm that checking for 'ui5-shellbar-hidden-button' is sufficient for your use case.
if (item.count && item.classes.includes("ui5-shellbar-hidden-button")) {

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.

1 participant