From bbd5634e01ac4b9e8612464e5bedcce89a428818 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Tue, 16 Jul 2024 13:14:37 -0400 Subject: [PATCH 1/5] feat: animate all rows --- src/components/NotificationRow.tsx | 7 ++++--- src/components/RepositoryNotifications.tsx | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/NotificationRow.tsx b/src/components/NotificationRow.tsx index e5d211c0c..f7d22f2e7 100644 --- a/src/components/NotificationRow.tsx +++ b/src/components/NotificationRow.tsx @@ -24,11 +24,13 @@ import { NotificationHeader } from './notification/NotificationHeader'; interface INotificationRow { notification: Notification; isRead?: boolean; + isAnimated?: boolean; } export const NotificationRow: FC = ({ notification, isRead = false, + isAnimated = false, }: INotificationRow) => { const { settings, @@ -88,10 +90,9 @@ export const NotificationRow: FC = ({ id={notification.id} className={cn( 'group flex border-b border-gray-100 bg-white px-3 py-2 hover:bg-gray-100 dark:border-gray-darker dark:bg-gray-dark dark:text-white dark:hover:bg-gray-darker', - animateExit && + (isAnimated || animateExit) && 'translate-x-full opacity-0 transition duration-[350ms] ease-in-out', - showAsRead && Opacity.READ, - isRead && Opacity.READ, + (isRead || showAsRead) && Opacity.READ, )} >
= ({ key={notification.id} notification={notification} isRead={showAsRead} + isAnimated={animateExit} /> ))} From 6b6a5a1bbbebf9a0f51fb8de6614355a9ac40c4e Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Wed, 17 Jul 2024 05:46:13 -0400 Subject: [PATCH 2/5] Update NotificationRow.tsx --- src/components/NotificationRow.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/NotificationRow.tsx b/src/components/NotificationRow.tsx index f7d22f2e7..2cd68004b 100644 --- a/src/components/NotificationRow.tsx +++ b/src/components/NotificationRow.tsx @@ -23,14 +23,14 @@ import { NotificationHeader } from './notification/NotificationHeader'; interface INotificationRow { notification: Notification; + is animated?: Boolean; isRead?: boolean; - isAnimated?: boolean; } export const NotificationRow: FC = ({ notification, + is animated = false, isRead = false, - isAnimated = false, }: INotificationRow) => { const { settings, From cdabb8342a1daeed067f6499977440f9edf99cb2 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Wed, 17 Jul 2024 05:46:40 -0400 Subject: [PATCH 3/5] Update NotificationRow.tsx --- src/components/NotificationRow.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/NotificationRow.tsx b/src/components/NotificationRow.tsx index 2cd68004b..e0a05c6c1 100644 --- a/src/components/NotificationRow.tsx +++ b/src/components/NotificationRow.tsx @@ -23,13 +23,13 @@ import { NotificationHeader } from './notification/NotificationHeader'; interface INotificationRow { notification: Notification; - is animated?: Boolean; + isAnimated?: Boolean; isRead?: boolean; } export const NotificationRow: FC = ({ notification, - is animated = false, + isAnimated = false, isRead = false, }: INotificationRow) => { const { From 4ad5e51c8ae3fb35bef89404ae8093e8c9578ed5 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Wed, 17 Jul 2024 05:47:01 -0400 Subject: [PATCH 4/5] Update NotificationRow.tsx --- src/components/NotificationRow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NotificationRow.tsx b/src/components/NotificationRow.tsx index e0a05c6c1..215ac0634 100644 --- a/src/components/NotificationRow.tsx +++ b/src/components/NotificationRow.tsx @@ -23,7 +23,7 @@ import { NotificationHeader } from './notification/NotificationHeader'; interface INotificationRow { notification: Notification; - isAnimated?: Boolean; + isAnimated?: boolean; isRead?: boolean; } From bf566aea755cc1880289675b8d6ae77c64400c23 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Wed, 17 Jul 2024 05:47:59 -0400 Subject: [PATCH 5/5] Update RepositoryNotifications.tsx --- src/components/RepositoryNotifications.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/RepositoryNotifications.tsx b/src/components/RepositoryNotifications.tsx index 22e0e871f..65a229397 100644 --- a/src/components/RepositoryNotifications.tsx +++ b/src/components/RepositoryNotifications.tsx @@ -117,8 +117,8 @@ export const RepositoryNotifications: FC = ({ ))}