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

change: [M3-7873] - Use Chip for notification badge #10333

Conversation

hana-linode
Copy link
Contributor

Description πŸ“

When the Notification count is past 100, the numbers become difficult to read because their edges appear outside the colored dot. I decided to use the chip component to better display the Notification count.

Preview πŸ“·

Before After
image image

How to test πŸ§ͺ

Verification steps

(How to verify changes)

  • Update the label to a 3 digit number on line 141 of NotificationMenu.tsx
  • Confirm the notification badge display in the top right corner

As an Author I have considered πŸ€”

Check all that apply

  • πŸ‘€ Doing a self review
  • ❔ Our contribution guidelines
  • 🀏 Splitting feature into small PRs
  • βž• Adding a changeset
  • πŸ§ͺ Providing/Improving test coverage
  • πŸ” Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • πŸ‘£ Providing comprehensive reproduction steps
  • πŸ“‘ Providing or updating our documentation
  • πŸ•› Scheduling a pair reviewing session
  • πŸ“± Providing mobile support
  • β™Ώ Providing accessibility support

@hana-linode hana-linode self-assigned this Mar 29, 2024
@hana-linode hana-linode requested a review from a team as a code owner March 29, 2024 16:09
@hana-linode hana-linode requested review from carrillo-erik and hkhalil-akamai and removed request for a team March 29, 2024 16:09
Copy link
Contributor

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Looks much better!

@@ -135,7 +135,12 @@ export const NotificationMenu = () => {
<NotificationIconWrapper isMenuOpen={notificationContext.menuOpen}>
<Bell />
{numNotifications > 0 ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

&&

Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

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

Nice change! Confirmed things look good at desktop/tablet/mobile viewports for various #s of notifications.

We do see the chip display next, instead of overlapping, to the notification icon at screens < 370 wide, but that's the case in prod now even with the circular badge icon, so I don't think we generally support screens that small.

Single digits 3 or more digits
Screenshot 2024-03-29 at 9 15 27β€―AM Screenshot 2024-03-29 at 9 20 16β€―AM

@mjac0bs mjac0bs added the Approved Multiple approvals and ready to merge! label Mar 29, 2024
Copy link

github-actions bot commented Mar 29, 2024

Coverage Report: βœ…
Base Coverage: 81.72%
Current Coverage: 81.72%

@jdamore-linode
Copy link
Contributor

Such a little thing but this has bugged me forever! Thanks @HanaXu

Copy link
Contributor

@hkhalil-akamai hkhalil-akamai left a comment

Choose a reason for hiding this comment

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

There is something so satisfying about the rounded rectangle 🀩

@hana-linode hana-linode merged commit f08356f into linode:develop Mar 29, 2024
17 of 18 checks passed
@hana-linode hana-linode deleted the M3-7873-improve-notification-count-display branch March 29, 2024 19:44
bnussman-akamai pushed a commit to bnussman-akamai/manager that referenced this pull request Apr 4, 2024
## Description πŸ“
When the Notification count is past 100, the numbers become difficult to read because their edges appear outside the colored dot. I decided to use the chip component to better display the Notification count.

## How to test πŸ§ͺ

### Verification steps
(How to verify changes)
- Update the label to a 3 digit number on line 141 of `NotificationMenu.tsx`
- Confirm the notification badge display in the top right corner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants