From 318af14f3e9bc8b45fed1db5d6b784ba78063ee7 Mon Sep 17 00:00:00 2001 From: Pouria Delfanazari Date: Thu, 6 Nov 2025 10:11:23 -0800 Subject: [PATCH 01/18] fix: feed activity theme colour --- .../FeedActivityStatus.module.css | 9 +++++ .../feedActivityStatus/FeedActivityStatus.tsx | 40 ++++++++----------- .../components/feedItem/Skeleton.FeedItem.tsx | 14 ++----- .../components/profileMenu/ProfileMenu.tsx | 4 +- 4 files changed, 31 insertions(+), 36 deletions(-) create mode 100644 src/webapp/features/feeds/components/feedActivityStatus/FeedActivityStatus.module.css diff --git a/src/webapp/features/feeds/components/feedActivityStatus/FeedActivityStatus.module.css b/src/webapp/features/feeds/components/feedActivityStatus/FeedActivityStatus.module.css new file mode 100644 index 00000000..103eaa02 --- /dev/null +++ b/src/webapp/features/feeds/components/feedActivityStatus/FeedActivityStatus.module.css @@ -0,0 +1,9 @@ +.root { + @mixin light { + background-color: var(--mantine-color-gray-1); + } + + @mixin dark { + background-color: var(--mantine-color-dark-4); + } +} diff --git a/src/webapp/features/feeds/components/feedActivityStatus/FeedActivityStatus.tsx b/src/webapp/features/feeds/components/feedActivityStatus/FeedActivityStatus.tsx index 35193298..90c13d7b 100644 --- a/src/webapp/features/feeds/components/feedActivityStatus/FeedActivityStatus.tsx +++ b/src/webapp/features/feeds/components/feedActivityStatus/FeedActivityStatus.tsx @@ -1,11 +1,12 @@ -'use client'; - import { Anchor, Avatar, Card, Group, Menu, + MenuDropdown, + MenuItem, + MenuTarget, ScrollArea, Stack, Text, @@ -13,11 +14,10 @@ import { import { FeedItem, Collection } from '@/api-client'; import { Fragment } from 'react'; import Link from 'next/link'; +import styles from './FeedActivityStatus.module.css'; import { getRelativeTime } from '@/lib/utils/time'; import { getRecordKey } from '@/lib/utils/atproto'; import { sanitizeText } from '@/lib/utils/text'; -import { useColorScheme } from '@mantine/hooks'; -import { BiCollection } from 'react-icons/bi'; interface Props { user: FeedItem['user']; @@ -26,7 +26,6 @@ interface Props { } export default function FeedActivityStatus(props: Props) { - const colorScheme = useColorScheme(); const MAX_DISPLAYED = 2; const time = getRelativeTime(props.createdAt.toString()); const relativeCreatedDate = time === 'just now' ? `Now` : `${time} ago`; @@ -41,20 +40,15 @@ export default function FeedActivityStatus(props: Props) { const remainingCount = collections.length - MAX_DISPLAYED; return ( - - + + {sanitizeText(props.user.name)} - {' '} + {' '} {collections.length === 0 ? ( - 'added to library' + added to library ) : ( - added to{' '} + added to {displayedCollections.map( (collection: Collection, index: number) => ( @@ -70,10 +64,10 @@ export default function FeedActivityStatus(props: Props) { ), )} - {remainingCount > 0 && ' and '} + {remainingCount > 0 && {' and '}} {remainingCount > 0 && ( - + 1 ? 's' : ''} - - + + {remainingCollections.map((c) => ( - {c.name} - + ))} - + )} @@ -112,7 +106,7 @@ export default function FeedActivityStatus(props: Props) { }; return ( - + {/* Feed activity status*/} - + diff --git a/src/webapp/features/profile/components/profileMenu/ProfileMenu.tsx b/src/webapp/features/profile/components/profileMenu/ProfileMenu.tsx index ff6b98a9..3dd00316 100644 --- a/src/webapp/features/profile/components/profileMenu/ProfileMenu.tsx +++ b/src/webapp/features/profile/components/profileMenu/ProfileMenu.tsx @@ -114,7 +114,7 @@ export default function ProfileMenu() { - {/* Theme: {colorScheme} - */} + Date: Thu, 6 Nov 2025 10:13:13 -0800 Subject: [PATCH 02/18] chore: remove unused import --- .../components/navigation/bottomBarItem/BottomBarItem.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/webapp/components/navigation/bottomBarItem/BottomBarItem.tsx b/src/webapp/components/navigation/bottomBarItem/BottomBarItem.tsx index 0870938c..4bcef9d7 100644 --- a/src/webapp/components/navigation/bottomBarItem/BottomBarItem.tsx +++ b/src/webapp/components/navigation/bottomBarItem/BottomBarItem.tsx @@ -1,9 +1,8 @@ import { IconType } from 'react-icons/lib'; import { ActionIcon } from '@mantine/core'; -import { usePathname } from 'next/navigation'; import Link from 'next/link'; import { ReactElement, isValidElement } from 'react'; -import { useColorScheme } from '@mantine/hooks'; +import { usePathname } from 'next/navigation'; interface Props { href: string; @@ -11,7 +10,6 @@ interface Props { } export default function BottomBarItem(props: Props) { - const colorScheme = useColorScheme(); const pathname = usePathname(); const isActive = pathname === props.href; -- 2.51.2 From 09921a298e6a761e26254d35f1c93dd13412569c Mon Sep 17 00:00:00 2001 From: Pouria Delfanazari Date: Thu, 6 Nov 2025 10:23:22 -0800 Subject: [PATCH 03/18] fix: collection nav item theme colour --- .../CollectionNavItem.module.css | 39 +++++++++++++++++++ .../collectionNavItem/CollectionNavItem.tsx | 12 +++--- 2 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 src/webapp/features/collections/components/collectionNavItem/CollectionNavItem.module.css diff --git a/src/webapp/features/collections/components/collectionNavItem/CollectionNavItem.module.css b/src/webapp/features/collections/components/collectionNavItem/CollectionNavItem.module.css new file mode 100644 index 00000000..7398848b --- /dev/null +++ b/src/webapp/features/collections/components/collectionNavItem/CollectionNavItem.module.css @@ -0,0 +1,39 @@ +/* navlink inactive */ +.navLink { + color: var(--mantine-color-gray-6); + + @mixin dark { + color: var(--mantine-color-gray-4); + } +} + +/* navlink active */ +.navLinkActive { + color: var(--mantine-color-dark-filled); + + @mixin dark { + color: var(--mantine-color-white); + } +} + +/* badge inactive */ +.badge { + background-color: var(--mantine-color-gray-light); + color: var(--mantine-color-gray-light-color); + + @mixin dark { + color: var(--mantine-color-gray-4); + background-color: var(--mantine-color-gray-light); + } +} + +/* badge active */ +.badgeActive { + background-color: var(--mantine-color-dark-filled); + color: var(--mantine-color-white); + + @mixin dark { + background-color: var(--mantine-color-gray-6); + color: var(--mantine-color-white); + } +} diff --git a/src/webapp/features/collections/components/collectionNavItem/CollectionNavItem.tsx b/src/webapp/features/collections/components/collectionNavItem/CollectionNavItem.tsx index 76a83536..b8ec8e20 100644 --- a/src/webapp/features/collections/components/collectionNavItem/CollectionNavItem.tsx +++ b/src/webapp/features/collections/components/collectionNavItem/CollectionNavItem.tsx @@ -1,8 +1,8 @@ import { useNavbarContext } from '@/providers/navbar'; import { Badge, NavLink } from '@mantine/core'; -import { useColorScheme } from '@mantine/hooks'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; +import styles from './CollectionNavItem.module.css'; interface Props { name: string; @@ -12,7 +12,6 @@ interface Props { export default function CollectionNavItem(props: Props) { const { toggleMobile } = useNavbarContext(); - const colorScheme = useColorScheme(); const pathname = usePathname(); const isActive = pathname === props.url; @@ -22,15 +21,14 @@ export default function CollectionNavItem(props: Props) { href={props.url} label={props.name} variant="subtle" - c={isActive ? `${colorScheme === 'dark' ? 'white' : 'dark'}` : 'gray'} + className={ + isActive ? `${styles.navLink} ${styles.navLinkActive}` : styles.navLink + } onClick={toggleMobile} rightSection={ props.cardCount > 0 ? ( {props.cardCount} -- 2.51.2 From f03815772461cdd627319932cedf57488378f955 Mon Sep 17 00:00:00 2001 From: Pouria Delfanazari Date: Thu, 6 Nov 2025 10:33:18 -0800 Subject: [PATCH 04/18] fix: dashboard error theme colour --- src/webapp/app/(dashboard)/error.tsx | 129 +++++++++++++++------------ src/webapp/providers/mantine.tsx | 2 +- 2 files changed, 75 insertions(+), 56 deletions(-) diff --git a/src/webapp/app/(dashboard)/error.tsx b/src/webapp/app/(dashboard)/error.tsx index 0b0f8e15..fe8db7b0 100644 --- a/src/webapp/app/(dashboard)/error.tsx +++ b/src/webapp/app/(dashboard)/error.tsx @@ -16,67 +16,86 @@ import BG from '@/assets/semble-bg.webp'; import DarkBG from '@/assets/semble-bg-dark.png'; import Link from 'next/link'; import { BiRightArrowAlt } from 'react-icons/bi'; -import { useColorScheme } from '@mantine/hooks'; export default function Error() { - const colorScheme = useColorScheme(); - return ( - -
- - - - Semble logo - Alpha - + <> + {/* light mode background */} + + + - - - A social knowledge network for researchers - - - Follow your peers’ research trails. Surface and discover new - connections. Built on ATProto so you own your data. - - + {/* dark mode background */} + + + + + ); +} - - +function Content() { + return ( +
+ + + + Semble logo + Alpha + - - + + + A social knowledge network for researchers + + + Follow your peers’ research trails. Surface and discover new + connections. Built on ATProto so you own your data. + + + Follow your peers’ research trails. Surface and discover new + connections. Built on ATProto so you own your data. + - -
- + + + + + + +
+
+
); } diff --git a/src/webapp/providers/mantine.tsx b/src/webapp/providers/mantine.tsx index 7dd967b0..92185508 100644 --- a/src/webapp/providers/mantine.tsx +++ b/src/webapp/providers/mantine.tsx @@ -12,7 +12,7 @@ interface Props { export default function MantineProvider(props: Props) { return ( - + {props.children} -- 2.51.2 From 7f5c339b8c82b70e57d172bcff9da340bdd9000d Mon Sep 17 00:00:00 2001 From: Pouria Delfanazari Date: Thu, 6 Nov 2025 10:33:27 -0800 Subject: [PATCH 05/18] fix: landing page theme colour --- src/webapp/app/page.tsx | 332 ++++++++++++++++++++++------------------ 1 file changed, 181 insertions(+), 151 deletions(-) diff --git a/src/webapp/app/page.tsx b/src/webapp/app/page.tsx index 47f740e7..5d01945a 100644 --- a/src/webapp/app/page.tsx +++ b/src/webapp/app/page.tsx @@ -30,21 +30,31 @@ import BigPictureIcon from '@/assets/icons/big-picture-icon.svg'; import TangledIcon from '@/assets/icons/tangled-icon.svg'; import SembleLogo from '@/assets/semble-logo.svg'; import Link from 'next/link'; -import { useColorScheme } from '@mantine/hooks'; export default function Home() { - const colorScheme = useColorScheme(); + return ( + <> + {/* light mode background */} + + + + {/* dark mode background */} + + + + + ); +} + +function Content() { return ( - + <>