Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitabbd88b

Browse files
feat: update notification badge to support 99+ (#17007)
After dogfooding the notifications we noticed that admins will probablyhave a larger number of unread notifications everyday so with that inmind we decided to increase the "truncate" rate from 9+ to 99+.
1 parent6a7c43d commitabbd88b

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

‎site/src/modules/notifications/NotificationsInbox/UnreadBadge.stories.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@ const meta: Meta<typeof UnreadBadge> = {
99
exportdefaultmeta;
1010
typeStory=StoryObj<typeofUnreadBadge>;
1111

12-
exportconstDefault:Story={
12+
exportconstUntil10:Story={
1313
args:{
1414
count:3,
1515
},
1616
};
1717

18-
exportconstMoreThanNine:Story={
18+
exportconstMoreThan10:Story={
1919
args:{
2020
count:12,
2121
},
2222
};
23+
24+
exportconstMoreThan99:Story={
25+
args:{
26+
count:1000,
27+
},
28+
};

‎site/src/modules/notifications/NotificationsInbox/UnreadBadge.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export const UnreadBadge: FC<UnreadBadgeProps> = ({
1313
return(
1414
<span
1515
className={cn([
16-
"flexsize-[18px] rounded text-2xs items-center justify-center",
16+
"flexmin-w-[18px] h-[18px] w-fit px-1 rounded text-2xs items-center justify-center",
1717
"bg-surface-sky text-highlight-sky",
1818
className,
1919
])}
2020
{...props}
2121
>
22-
{count>9 ?"9+" :count}
22+
{count>99 ?"99+" :count}
2323
</span>
2424
);
2525
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp