From 6807353e73c5346ccdb63203fa37e88a69b212d3 Mon Sep 17 00:00:00 2001 From: Pouria Delfanazari Date: Sat, 16 Dec 2023 14:29:39 -0800 Subject: [PATCH 1/3] Update black texts to text-neutral-700 --- src/components/contentDisplay/feedPost/FeedPost.tsx | 2 +- .../contentDisplay/notification/NotificationItem.tsx | 12 +++++++----- .../contentDisplay/profileCard/ProfileCard.tsx | 2 +- .../contentDisplay/profileHeader/ProfileHeader.tsx | 2 +- .../contentDisplay/searchPost/SearchPost.tsx | 2 +- .../contentDisplay/threadPost/ThreadPost.tsx | 2 +- src/components/dataDisplay/followInfo/FollowInfo.tsx | 4 ++-- .../dataDisplay/postActions/PostActions.tsx | 4 ++-- src/components/dataDisplay/postEmbed/ListEmbed.tsx | 2 +- src/components/dataDisplay/postEmbed/RecordEmbed.tsx | 2 +- src/components/dataDisplay/postText/postText.tsx | 2 +- src/components/dataDisplay/profileBio/ProfileBio.tsx | 2 +- src/components/dataDisplay/reason/Reason.tsx | 2 +- src/components/feedback/endOfFeed/EndOfFeed.tsx | 2 +- src/components/feedback/feedAlert/FeedAlert.tsx | 2 +- src/components/navigational/aside/Aside.tsx | 2 +- src/lib/hooks/bsky/actor/useProfile.tsx | 2 ++ 17 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/components/contentDisplay/feedPost/FeedPost.tsx b/src/components/contentDisplay/feedPost/FeedPost.tsx index 504589af..49bcbea7 100644 --- a/src/components/contentDisplay/feedPost/FeedPost.tsx +++ b/src/components/contentDisplay/feedPost/FeedPost.tsx @@ -91,7 +91,7 @@ export default function FeedPost(props: Props) { }} className="flex gap-1" > - + {author.displayName ?? author.handle}{" "} diff --git a/src/components/contentDisplay/notification/NotificationItem.tsx b/src/components/contentDisplay/notification/NotificationItem.tsx index 397eb811..3b4f66b5 100644 --- a/src/components/contentDisplay/notification/NotificationItem.tsx +++ b/src/components/contentDisplay/notification/NotificationItem.tsx @@ -85,23 +85,25 @@ export default function NotificationItem(props: Props) { {author.displayName ?? author.handle}{" "} - and {allAuthors.length - 1}{" "} - {allAuthors.length - 1 > 1 ? "others" : "other"}{" "} + + and {allAuthors.length - 1}{" "} + {allAuthors.length - 1 > 1 ? "others" : "other"}{" "} + )} {allAuthors?.length === 1 && ( {author.displayName ?? author.handle}{" "} )} - + {getNotificationLabel(reason)} diff --git a/src/components/contentDisplay/profileCard/ProfileCard.tsx b/src/components/contentDisplay/profileCard/ProfileCard.tsx index 8d49d216..0e9d47ce 100644 --- a/src/components/contentDisplay/profileCard/ProfileCard.tsx +++ b/src/components/contentDisplay/profileCard/ProfileCard.tsx @@ -40,7 +40,7 @@ export default function ProfileCard(props: Props) {
-

+

{profile?.description}

diff --git a/src/components/contentDisplay/profileHeader/ProfileHeader.tsx b/src/components/contentDisplay/profileHeader/ProfileHeader.tsx index c697f8b0..71f76915 100644 --- a/src/components/contentDisplay/profileHeader/ProfileHeader.tsx +++ b/src/components/contentDisplay/profileHeader/ProfileHeader.tsx @@ -122,7 +122,7 @@ export default function ProfileHeader(props: Props) { )}
-

+

{profile?.displayName || (profile?.handle && (profile?.displayName ?? profile?.handle))} diff --git a/src/components/contentDisplay/searchPost/SearchPost.tsx b/src/components/contentDisplay/searchPost/SearchPost.tsx index e4a626bc..4e91f1d5 100644 --- a/src/components/contentDisplay/searchPost/SearchPost.tsx +++ b/src/components/contentDisplay/searchPost/SearchPost.tsx @@ -47,7 +47,7 @@ export default function SearchPost(props: Props) { href={`/dashboard/user/${author.handle}`} className="flex gap-1" > - + {author.displayName ?? author.handle}{" "} diff --git a/src/components/contentDisplay/threadPost/ThreadPost.tsx b/src/components/contentDisplay/threadPost/ThreadPost.tsx index 9fae71ad..cd35a3c8 100644 --- a/src/components/contentDisplay/threadPost/ThreadPost.tsx +++ b/src/components/contentDisplay/threadPost/ThreadPost.tsx @@ -66,7 +66,7 @@ export default function ThreadPost(props: Props) { }} className="flex gap-1" > - + {author.displayName ?? author.handle}{" "} diff --git a/src/components/dataDisplay/followInfo/FollowInfo.tsx b/src/components/dataDisplay/followInfo/FollowInfo.tsx index 3ecfdfdc..f9974f94 100644 --- a/src/components/dataDisplay/followInfo/FollowInfo.tsx +++ b/src/components/dataDisplay/followInfo/FollowInfo.tsx @@ -14,7 +14,7 @@ export default function FollowInfo(props: Props) {
{abbreviateNumber(followsCount)} Following @@ -22,7 +22,7 @@ export default function FollowInfo(props: Props) { {abbreviateNumber(followersCount)} Followers diff --git a/src/components/dataDisplay/postActions/PostActions.tsx b/src/components/dataDisplay/postActions/PostActions.tsx index 7211f894..14a422ae 100644 --- a/src/components/dataDisplay/postActions/PostActions.tsx +++ b/src/components/dataDisplay/postActions/PostActions.tsx @@ -57,7 +57,7 @@ export default function PostActions(props: Props) { href={`/dashboard/user/${post.author.handle}/post/${getPostId( post.uri )}/reposted-by`} - className="flex gap-1 font-semibold text-neutral-600 hover:brightness-110" + className="flex gap-1 font-semibold text-neutral-700 hover:brightness-110" > {abbreviateNumber(repostCount)} @@ -68,7 +68,7 @@ export default function PostActions(props: Props) { href={`/dashboard/user/${post.author.handle}/post/${getPostId( post.uri )}/liked-by`} - className="flex gap-1 font-semibold text-neutral-600 hover:brightness-110" + className="flex gap-1 font-semibold text-neutral-700 hover:brightness-110" > {abbreviateNumber(likeCount)} diff --git a/src/components/dataDisplay/postEmbed/ListEmbed.tsx b/src/components/dataDisplay/postEmbed/ListEmbed.tsx index 53fc33ae..5b15b0ca 100644 --- a/src/components/dataDisplay/postEmbed/ListEmbed.tsx +++ b/src/components/dataDisplay/postEmbed/ListEmbed.tsx @@ -21,7 +21,7 @@ export default function ListEmbed(props: Props) {
- + {list.name} diff --git a/src/components/dataDisplay/postEmbed/RecordEmbed.tsx b/src/components/dataDisplay/postEmbed/RecordEmbed.tsx index c23900d9..add6a2e0 100644 --- a/src/components/dataDisplay/postEmbed/RecordEmbed.tsx +++ b/src/components/dataDisplay/postEmbed/RecordEmbed.tsx @@ -42,7 +42,7 @@ export default function RecordEmbed(props: Props) {
- + {record.author.displayName ?? record.author.handle}{" "} diff --git a/src/components/dataDisplay/postText/postText.tsx b/src/components/dataDisplay/postText/postText.tsx index b3cce3f8..dd2d5741 100644 --- a/src/components/dataDisplay/postText/postText.tsx +++ b/src/components/dataDisplay/postText/postText.tsx @@ -72,7 +72,7 @@ export default function PostText(props: Props) { } else { content.push({ text: segment.text, - component: {segment.text}, + component: {segment.text}, }); } } diff --git a/src/components/dataDisplay/profileBio/ProfileBio.tsx b/src/components/dataDisplay/profileBio/ProfileBio.tsx index eea92c2f..834eb848 100644 --- a/src/components/dataDisplay/profileBio/ProfileBio.tsx +++ b/src/components/dataDisplay/profileBio/ProfileBio.tsx @@ -68,7 +68,7 @@ export default function ProfileBio(props: Props) { } else { content.push({ text: segment.text, - component: {segment.text}, + component: {segment.text}, }); } } diff --git a/src/components/dataDisplay/reason/Reason.tsx b/src/components/dataDisplay/reason/Reason.tsx index 415a8ddf..50ae6f36 100644 --- a/src/components/dataDisplay/reason/Reason.tsx +++ b/src/components/dataDisplay/reason/Reason.tsx @@ -23,7 +23,7 @@ export default function Reason(props: Props) { href={`/dashboard/user/${reason.by.handle}`} className="max-w-fit" > -
+
{reason.by.displayName ?? reason.by.handle} reposted
diff --git a/src/components/feedback/endOfFeed/EndOfFeed.tsx b/src/components/feedback/endOfFeed/EndOfFeed.tsx index 2e168d58..e61b3bf3 100644 --- a/src/components/feedback/endOfFeed/EndOfFeed.tsx +++ b/src/components/feedback/endOfFeed/EndOfFeed.tsx @@ -1,7 +1,7 @@ export default function EndOfFeed() { return (
-

~ 🌸 Nothing more to show 🌸 ~

+

~ 🌸 Nothing more to show 🌸 ~

); } diff --git a/src/components/feedback/feedAlert/FeedAlert.tsx b/src/components/feedback/feedAlert/FeedAlert.tsx index fcf61a9c..2f245074 100644 --- a/src/components/feedback/feedAlert/FeedAlert.tsx +++ b/src/components/feedback/feedAlert/FeedAlert.tsx @@ -16,7 +16,7 @@ export default function FeedAlert(props: Props) { return (
{icon} {message} diff --git a/src/components/navigational/aside/Aside.tsx b/src/components/navigational/aside/Aside.tsx index d187807c..fb19bba7 100644 --- a/src/components/navigational/aside/Aside.tsx +++ b/src/components/navigational/aside/Aside.tsx @@ -14,7 +14,7 @@ export default async function Aside() {
{profile?.displayName ?? profile?.handle} diff --git a/src/lib/hooks/bsky/actor/useProfile.tsx b/src/lib/hooks/bsky/actor/useProfile.tsx index 2ff2733c..3055ca50 100644 --- a/src/lib/hooks/bsky/actor/useProfile.tsx +++ b/src/lib/hooks/bsky/actor/useProfile.tsx @@ -13,6 +13,8 @@ export default function useProfile(handle: string) { queryFn: () => getProfile(handle, agent), }); + console.log(data) + const updateFollowCount = (mode: "decrease" | "increase") => { queryClient.setQueryData(profileKey(handle), (oldData: any) => { return { From e678f1c2d649b1d7c60bb4afbdc7993b92cf2dba Mon Sep 17 00:00:00 2001 From: Pouria Delfanazari Date: Sat, 16 Dec 2023 14:45:38 -0800 Subject: [PATCH 2/3] Show all the text from the post you're replying to --- src/components/dataDisplay/postText/postText.tsx | 6 +++++- src/components/inputs/editor/ReplyToPreview.tsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/dataDisplay/postText/postText.tsx b/src/components/dataDisplay/postText/postText.tsx index dd2d5741..e63d418c 100644 --- a/src/components/dataDisplay/postText/postText.tsx +++ b/src/components/dataDisplay/postText/postText.tsx @@ -72,7 +72,11 @@ export default function PostText(props: Props) { } else { content.push({ text: segment.text, - component: {segment.text}, + component: ( + + {segment.text} + + ), }); } } diff --git a/src/components/inputs/editor/ReplyToPreview.tsx b/src/components/inputs/editor/ReplyToPreview.tsx index 94921ff1..da171c56 100644 --- a/src/components/inputs/editor/ReplyToPreview.tsx +++ b/src/components/inputs/editor/ReplyToPreview.tsx @@ -29,7 +29,7 @@ export default function ReplyToPreview(props: Props) { @{author.handle}
-

{post.text}

+

{post.text}

); From b249856b4cc115b0372a306406e90c7ca43ebdda Mon Sep 17 00:00:00 2001 From: Pouria Delfanazari Date: Sat, 16 Dec 2023 14:48:09 -0800 Subject: [PATCH 3/3] Update hover text colour on display name --- src/components/contentDisplay/feedPost/FeedPost.tsx | 2 +- .../contentDisplay/notification/NotificationItem.tsx | 4 ++-- src/components/contentDisplay/searchPost/SearchPost.tsx | 2 +- src/components/contentDisplay/threadPost/ThreadPost.tsx | 2 +- src/components/inputs/editor/QuotePreview.tsx | 2 +- src/components/inputs/editor/ReplyToPreview.tsx | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/contentDisplay/feedPost/FeedPost.tsx b/src/components/contentDisplay/feedPost/FeedPost.tsx index 49bcbea7..0d99994b 100644 --- a/src/components/contentDisplay/feedPost/FeedPost.tsx +++ b/src/components/contentDisplay/feedPost/FeedPost.tsx @@ -91,7 +91,7 @@ export default function FeedPost(props: Props) { }} className="flex gap-1" > - + {author.displayName ?? author.handle}{" "} diff --git a/src/components/contentDisplay/notification/NotificationItem.tsx b/src/components/contentDisplay/notification/NotificationItem.tsx index 3b4f66b5..9af3c600 100644 --- a/src/components/contentDisplay/notification/NotificationItem.tsx +++ b/src/components/contentDisplay/notification/NotificationItem.tsx @@ -85,7 +85,7 @@ export default function NotificationItem(props: Props) { {author.displayName ?? author.handle}{" "} @@ -98,7 +98,7 @@ export default function NotificationItem(props: Props) { {allAuthors?.length === 1 && ( {author.displayName ?? author.handle}{" "} diff --git a/src/components/contentDisplay/searchPost/SearchPost.tsx b/src/components/contentDisplay/searchPost/SearchPost.tsx index 4e91f1d5..bd837ce4 100644 --- a/src/components/contentDisplay/searchPost/SearchPost.tsx +++ b/src/components/contentDisplay/searchPost/SearchPost.tsx @@ -47,7 +47,7 @@ export default function SearchPost(props: Props) { href={`/dashboard/user/${author.handle}`} className="flex gap-1" > - + {author.displayName ?? author.handle}{" "} diff --git a/src/components/contentDisplay/threadPost/ThreadPost.tsx b/src/components/contentDisplay/threadPost/ThreadPost.tsx index cd35a3c8..2b1b5be9 100644 --- a/src/components/contentDisplay/threadPost/ThreadPost.tsx +++ b/src/components/contentDisplay/threadPost/ThreadPost.tsx @@ -66,7 +66,7 @@ export default function ThreadPost(props: Props) { }} className="flex gap-1" > - + {author.displayName ?? author.handle}{" "} diff --git a/src/components/inputs/editor/QuotePreview.tsx b/src/components/inputs/editor/QuotePreview.tsx index 85711553..a8d2ba36 100644 --- a/src/components/inputs/editor/QuotePreview.tsx +++ b/src/components/inputs/editor/QuotePreview.tsx @@ -22,7 +22,7 @@ export default function QuoteToPreview(props: Props) { />
- + {author.displayName ?? author.handle} diff --git a/src/components/inputs/editor/ReplyToPreview.tsx b/src/components/inputs/editor/ReplyToPreview.tsx index da171c56..497afffd 100644 --- a/src/components/inputs/editor/ReplyToPreview.tsx +++ b/src/components/inputs/editor/ReplyToPreview.tsx @@ -22,7 +22,7 @@ export default function ReplyToPreview(props: Props) { />
- + {author.displayName ?? author.handle}