Skip to content

Commit 99d6fb3

Browse files
authored
fix: notification number wrap / truncation (#2575)
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent 87d4b57 commit 99d6fb3

File tree

3 files changed

+32
-26
lines changed

3 files changed

+32
-26
lines changed

src/renderer/components/notifications/NotificationRow.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ export const NotificationRow: FC<NotificationRowProps> = ({
9292
</Tooltip>
9393

9494
<Stack
95-
className="cursor-pointer text-sm w-full"
95+
className={cn(
96+
'cursor-pointer text-sm w-full',
97+
!settings.wrapNotificationTitle && 'truncate',
98+
)}
9699
direction="vertical"
97100
gap="none"
98101
onClick={actionNotificationInteraction}
@@ -101,7 +104,10 @@ export const NotificationRow: FC<NotificationRowProps> = ({
101104

102105
<Stack
103106
align="start"
104-
className="mb-0.5"
107+
className={cn(
108+
'mb-0.5',
109+
!settings.wrapNotificationTitle && 'truncate',
110+
)}
105111
data-testid="notification-row"
106112
direction="horizontal"
107113
gap="condensed"

src/renderer/components/notifications/__snapshots__/AccountNotifications.test.tsx.snap

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/renderer/components/notifications/__snapshots__/NotificationRow.test.tsx.snap

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)