From 6ab3751b5c005cf868d1114d3b20aedf12723533 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Tue, 25 Nov 2025 10:35:50 -0800 Subject: [PATCH 1/8] update golang to v1.25 (and some containers do debian bookworm) (#9442) * bskyweb: bump go to v1.25 * update docker images to go v1.25 and debian bookworm * bump CI to go v1.25 --- .github/workflows/golang-test-lint.yml | 4 ++-- Dockerfile | 4 ++-- Dockerfile.embedr | 4 ++-- bskyweb/go.mod | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/golang-test-lint.yml b/.github/workflows/golang-test-lint.yml index 82be6c9cd..cd3e27cb7 100644 --- a/.github/workflows/golang-test-lint.yml +++ b/.github/workflows/golang-test-lint.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go tooling uses: actions/setup-go@v3 with: - go-version: "1.23" + go-version: "1.25" - name: Dummy Static Files run: touch bskyweb/static/js/blah.js && touch bskyweb/static/css/blah.txt && touch bskyweb/static/media/blah.txt - name: Check @@ -36,7 +36,7 @@ jobs: - name: Set up Go tooling uses: actions/setup-go@v3 with: - go-version: "1.23" + go-version: "1.25" - name: Dummy Static Files run: touch bskyweb/static/js/blah.js && touch bskyweb/static/css/blah.txt && touch bskyweb/static/media/blah.txt - name: Lint diff --git a/Dockerfile b/Dockerfile index 93b17a86b..371e8402c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.24.5-bullseye AS build-env +FROM golang:1.25-bookworm AS build-env WORKDIR /usr/src/social-app @@ -89,7 +89,7 @@ RUN cd bskyweb/ && \ -o /bskyweb \ ./cmd/bskyweb -FROM debian:bullseye-slim +FROM debian:bookworm-slim ENV GODEBUG=netdns=go ENV TZ=Etc/UTC diff --git a/Dockerfile.embedr b/Dockerfile.embedr index 7fa8b9ae5..29b042ddd 100644 --- a/Dockerfile.embedr +++ b/Dockerfile.embedr @@ -1,4 +1,4 @@ -FROM golang:1.24.5-bullseye AS build-env +FROM golang:1.25-bookworm AS build-env WORKDIR /usr/src/social-app @@ -58,7 +58,7 @@ RUN cd bskyweb/ && \ -o /embedr \ ./cmd/embedr -FROM debian:bullseye-slim +FROM debian:bookworm-slim ENV GODEBUG=netdns=go ENV TZ=Etc/UTC diff --git a/bskyweb/go.mod b/bskyweb/go.mod index 407ba7d55..654c40a13 100644 --- a/bskyweb/go.mod +++ b/bskyweb/go.mod @@ -1,6 +1,6 @@ module github.com/bluesky-social/social-app/bskyweb -go 1.24.5 +go 1.25 require ( github.com/bluesky-social/indigo v0.0.0-20250729223159-573ae927246a -- 2.51.2 From 7f2d46b73147e51a08a07160c46ab2c0f28e46fa Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 26 Nov 2025 19:06:12 +0200 Subject: [PATCH 2/8] use contentFit prop (#9452) --- src/view/com/composer/photos/Gallery.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/com/composer/photos/Gallery.tsx b/src/view/com/composer/photos/Gallery.tsx index ae31a9b07..a1c6660d4 100644 --- a/src/view/com/composer/photos/Gallery.tsx +++ b/src/view/com/composer/photos/Gallery.tsx @@ -230,6 +230,7 @@ const GalleryItem = ({ accessibilityIgnoresInvertColors cachePolicy="none" autoplay={false} + contentFit="cover" /> @@ -274,7 +275,6 @@ const styles = StyleSheet.create({ marginTop: 16, }, image: { - resizeMode: 'cover', borderRadius: tokens.borderRadius.md, }, imageControl: { -- 2.51.2 From 2d056e5be6b7709fc1e678a17c45204f9276576c Mon Sep 17 00:00:00 2001 From: pfrazee <1270099+pfrazee@users.noreply.github.com> Date: Thu, 27 Nov 2025 02:40:10 +0000 Subject: [PATCH 3/8] Nightly source-language update --- src/locale/locales/en/messages.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locale/locales/en/messages.po b/src/locale/locales/en/messages.po index 3770f0380..8122fc565 100644 --- a/src/locale/locales/en/messages.po +++ b/src/locale/locales/en/messages.po @@ -996,7 +996,7 @@ msgstr "" msgid "Alt Text" msgstr "" -#: src/view/com/composer/photos/Gallery.tsx:260 +#: src/view/com/composer/photos/Gallery.tsx:261 msgid "Alt text describes images for blind and low-vision users, and helps give context to everyone." msgstr "" -- 2.51.2 From d0649e9a9e4145c7682e77e1dd6cd6adffbe89c4 Mon Sep 17 00:00:00 2001 From: Anastasiya Uraleva Date: Thu, 27 Nov 2025 03:22:03 -0800 Subject: [PATCH 4/8] [APP-1403] Profile empty states (#8969) * update: Empty state component * update type error fixes * add empty state icon * update translations on labels * update: lint error for empty state * remove unused prompt * update type errors * fix lint errors and update profile followers and profile follows * updated starterpack * fix lint errors * address feedback * update icons to be a react element * update icons * update viewbox for icons * optimize: icons and update profile lists * optimize: icons and update profile lists * lint error fix * update iconSize from the rebase --- __tests__/lib/link-meta.test.ts | 2 +- .../bulletlist_stroke1_corner0_rounded.svg | 1 + ..._square_stroke1_corner0_rounded_filled.svg | 1 + .../icons/editbig_stroke1_corner0_rounded.svg | 1 + .../hashtagwide_stroke1_corner0_rounded.svg | 1 + .../icons/heart2_stroke1_corner0_rounded.svg | 1 + .../icons/image_stroke1_corner0_rounded.svg | 1 + ...message_stroke1_corner0_rounded_filled.svg | 1 + .../peopleremove2_stroke1_corner0_rounded.svg | 1 + .../videoclip_stroke1_corner0_rounded.svg | 1 + src/components/Button.tsx | 3 +- src/components/Lists.tsx | 27 ++++ src/components/StarterPack/Main/PostsList.tsx | 9 +- .../StarterPack/ProfileStarterPacks.tsx | 34 ++++- src/components/icons/BulletList.tsx | 8 ++ src/components/icons/CircleAndSquare.tsx | 7 + src/components/icons/EditBig.tsx | 5 + src/components/icons/Hashtag.tsx | 8 ++ src/components/icons/Heart2.tsx | 7 + src/components/icons/Image.tsx | 7 + src/components/icons/Message.tsx | 8 ++ src/components/icons/PeopleRemove2.tsx | 8 ++ src/components/icons/TEMPLATE.tsx | 45 +++++- src/components/icons/VideoClip.tsx | 8 ++ src/components/icons/common.tsx | 1 + src/locale/locales/en/messages.po | 2 +- src/screens/Bookmarks/index.tsx | 34 ++++- src/screens/Notifications/ActivityList.tsx | 7 +- src/screens/Profile/ProfileFeed/index.tsx | 9 +- src/screens/Profile/Sections/Feed.tsx | 34 ++++- src/screens/ProfileList/AboutSection.tsx | 5 +- src/screens/ProfileList/FeedSection.tsx | 13 +- src/screens/Settings/AppPasswords.tsx | 3 +- .../Settings/components/SettingsList.tsx | 1 + src/view/com/feeds/ProfileFeedgens.tsx | 19 ++- src/view/com/lists/MyLists.tsx | 13 +- src/view/com/lists/ProfileLists.tsx | 83 ++++++----- .../com/notifications/NotificationFeed.tsx | 3 +- src/view/com/posts/PostFeedErrorMessage.tsx | 5 +- src/view/com/profile/ProfileFollowers.tsx | 14 +- src/view/com/profile/ProfileFollows.tsx | 25 +++- src/view/com/util/EmptyState.tsx | 133 +++++++++++------- src/view/screens/Debug.tsx | 11 +- src/view/screens/Profile.tsx | 65 ++++++++- 44 files changed, 551 insertions(+), 124 deletions(-) create mode 100644 assets/icons/bulletlist_stroke1_corner0_rounded.svg create mode 100644 assets/icons/circle_and_square_stroke1_corner0_rounded_filled.svg create mode 100644 assets/icons/editbig_stroke1_corner0_rounded.svg create mode 100644 assets/icons/hashtagwide_stroke1_corner0_rounded.svg create mode 100644 assets/icons/heart2_stroke1_corner0_rounded.svg create mode 100644 assets/icons/image_stroke1_corner0_rounded.svg create mode 100644 assets/icons/message_stroke1_corner0_rounded_filled.svg create mode 100644 assets/icons/peopleremove2_stroke1_corner0_rounded.svg create mode 100644 assets/icons/videoclip_stroke1_corner0_rounded.svg create mode 100644 src/components/icons/CircleAndSquare.tsx diff --git a/__tests__/lib/link-meta.test.ts b/__tests__/lib/link-meta.test.ts index 504b11c22..bcd3acff4 100644 --- a/__tests__/lib/link-meta.test.ts +++ b/__tests__/lib/link-meta.test.ts @@ -1,4 +1,4 @@ -import {LikelyType, getLikelyType} from '../../src/lib/link-meta/link-meta' +import {getLikelyType, LikelyType} from '../../src/lib/link-meta/link-meta' describe('getLikelyType', () => { it('correctly handles non-parsed url', async () => { diff --git a/assets/icons/bulletlist_stroke1_corner0_rounded.svg b/assets/icons/bulletlist_stroke1_corner0_rounded.svg new file mode 100644 index 000000000..a62623860 --- /dev/null +++ b/assets/icons/bulletlist_stroke1_corner0_rounded.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/circle_and_square_stroke1_corner0_rounded_filled.svg b/assets/icons/circle_and_square_stroke1_corner0_rounded_filled.svg new file mode 100644 index 000000000..cd1465c9b --- /dev/null +++ b/assets/icons/circle_and_square_stroke1_corner0_rounded_filled.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/editbig_stroke1_corner0_rounded.svg b/assets/icons/editbig_stroke1_corner0_rounded.svg new file mode 100644 index 000000000..3c978b04d --- /dev/null +++ b/assets/icons/editbig_stroke1_corner0_rounded.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/hashtagwide_stroke1_corner0_rounded.svg b/assets/icons/hashtagwide_stroke1_corner0_rounded.svg new file mode 100644 index 000000000..97cc78d8d --- /dev/null +++ b/assets/icons/hashtagwide_stroke1_corner0_rounded.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/heart2_stroke1_corner0_rounded.svg b/assets/icons/heart2_stroke1_corner0_rounded.svg new file mode 100644 index 000000000..788c97168 --- /dev/null +++ b/assets/icons/heart2_stroke1_corner0_rounded.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/image_stroke1_corner0_rounded.svg b/assets/icons/image_stroke1_corner0_rounded.svg new file mode 100644 index 000000000..68c3215de --- /dev/null +++ b/assets/icons/image_stroke1_corner0_rounded.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/message_stroke1_corner0_rounded_filled.svg b/assets/icons/message_stroke1_corner0_rounded_filled.svg new file mode 100644 index 000000000..e45f2b244 --- /dev/null +++ b/assets/icons/message_stroke1_corner0_rounded_filled.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/peopleremove2_stroke1_corner0_rounded.svg b/assets/icons/peopleremove2_stroke1_corner0_rounded.svg new file mode 100644 index 000000000..a94ed7305 --- /dev/null +++ b/assets/icons/peopleremove2_stroke1_corner0_rounded.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/videoclip_stroke1_corner0_rounded.svg b/assets/icons/videoclip_stroke1_corner0_rounded.svg new file mode 100644 index 000000000..44679a173 --- /dev/null +++ b/assets/icons/videoclip_stroke1_corner0_rounded.svg @@ -0,0 +1 @@ + diff --git a/src/components/Button.tsx b/src/components/Button.tsx index efac8468d..810442fea 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -798,13 +798,14 @@ export function ButtonIcon({ * also so that we can calculate transforms. */ const iconSize = { - '2xs': 8, xs: 12, sm: 16, md: 18, lg: 24, xl: 28, + '2xs': 8, '2xl': 32, + '3xl': 40, }[iconSizeShorthand] /* diff --git a/src/components/Lists.tsx b/src/components/Lists.tsx index fdfaec64d..24dc0017a 100644 --- a/src/components/Lists.tsx +++ b/src/components/Lists.tsx @@ -4,6 +4,10 @@ import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {cleanError} from '#/lib/strings/errors' +import { + EmptyState, + type EmptyStateButtonProps, +} from '#/view/com/util/EmptyState' import {CenteredView} from '#/view/com/util/Views' import {atoms as a, useBreakpoints, useTheme} from '#/alf' import {Button, ButtonText} from '#/components/Button' @@ -129,6 +133,9 @@ let ListMaybePlaceholder = ({ hideBackButton, sideBorders, topBorder = false, + emptyStateIcon, + emptyStateButton, + useEmptyState = false, }: { isLoading: boolean noEmpty?: boolean @@ -143,6 +150,9 @@ let ListMaybePlaceholder = ({ hideBackButton?: boolean sideBorders?: boolean topBorder?: boolean + emptyStateIcon?: React.ComponentType | React.ReactElement + emptyStateButton?: EmptyStateButtonProps + useEmptyState?: boolean }): React.ReactNode => { const t = useTheme() const {_} = useLingui() @@ -180,6 +190,23 @@ let ListMaybePlaceholder = ({ ) } + if (useEmptyState) { + return ( + + + + ) + } + if (!noEmpty) { return ( ( })) const renderPostsEmpty = useCallback(() => { - return + return ( + + ) }, [_]) return ( diff --git a/src/components/StarterPack/ProfileStarterPacks.tsx b/src/components/StarterPack/ProfileStarterPacks.tsx index ecb5357e0..b2a0f0298 100644 --- a/src/components/StarterPack/ProfileStarterPacks.tsx +++ b/src/components/StarterPack/ProfileStarterPacks.tsx @@ -21,6 +21,10 @@ import {parseStarterPackUri} from '#/lib/strings/starter-pack' import {logger} from '#/logger' import {isIOS} from '#/platform/detection' import {useActorStarterPacksQuery} from '#/state/queries/actor-starter-packs' +import { + EmptyState, + type EmptyStateButtonProps, +} from '#/view/com/util/EmptyState' import {List, type ListRef} from '#/view/com/util/List' import {FeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder' import {atoms as a, ios, useTheme} from '#/alf' @@ -47,6 +51,9 @@ interface ProfileFeedgensProps { testID?: string setScrollViewTag: (tag: number | null) => void isMe: boolean + emptyStateMessage?: string + emptyStateButton?: EmptyStateButtonProps + emptyStateIcon?: React.ComponentType | React.ReactElement } function keyExtractor(item: AppBskyGraphDefs.StarterPackView) { @@ -63,6 +70,9 @@ export function ProfileStarterPacks({ testID, setScrollViewTag, isMe, + emptyStateMessage, + emptyStateButton, + emptyStateIcon, }: ProfileFeedgensProps) { const t = useTheme() const bottomBarOffset = useBottomBarOffset(100) @@ -79,6 +89,28 @@ export function ProfileStarterPacks({ const {isTabletOrDesktop} = useWebMediaQueries() const items = data?.pages.flatMap(page => page.starterPacks) + const {_} = useLingui() + + const EmptyComponent = useCallback(() => { + if (emptyStateMessage || emptyStateButton || emptyStateIcon) { + return ( + + + + ) + } + return + }, [_, emptyStateMessage, emptyStateButton, emptyStateIcon]) useImperativeHandle(ref, () => ({ scrollToTop: () => {}, @@ -146,7 +178,7 @@ export function ProfileStarterPacks({ onEndReached={onEndReached} onRefresh={onRefresh} ListEmptyComponent={ - data ? (isMe ? Empty : undefined) : FeedLoadingPlaceholder + data ? (isMe ? EmptyComponent : undefined) : FeedLoadingPlaceholder } ListFooterComponent={ !!data && items?.length !== 0 && isMe ? CreateAnother : undefined diff --git a/src/components/icons/BulletList.tsx b/src/components/icons/BulletList.tsx index 58847d9d9..120b3a6cb 100644 --- a/src/components/icons/BulletList.tsx +++ b/src/components/icons/BulletList.tsx @@ -1,5 +1,13 @@ import {createSinglePathSVG} from './TEMPLATE' +export const BulletList_Stroke1_Corner0_Rounded = createSinglePathSVG({ + viewBox: '0 0 47 38', + strokeLinecap: 'round', + strokeLinejoin: 'round', + strokeWidth: 2, + path: 'M22.333 31.667H45M22.333 6.333H45m-33.333 0A5.333 5.333 0 1 1 1 6.333a5.333 5.333 0 0 1 10.667 0Zm0 25.334a5.333 5.333 0 1 1-10.667 0 5.333 5.333 0 0 1 10.667 0Z', +}) + export const BulletList_Stroke2_Corner0_Rounded = createSinglePathSVG({ path: 'M6 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM3 7a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm9 0a1 1 0 0 1 1-1h7a1 1 0 1 1 0 2h-7a1 1 0 0 1-1-1Zm-6 9a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm-3 1a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm9 0a1 1 0 0 1 1-1h7a1 1 0 1 1 0 2h-7a1 1 0 0 1-1-1Z', }) diff --git a/src/components/icons/CircleAndSquare.tsx b/src/components/icons/CircleAndSquare.tsx new file mode 100644 index 000000000..a15a5390e --- /dev/null +++ b/src/components/icons/CircleAndSquare.tsx @@ -0,0 +1,7 @@ +import {createSinglePathSVG} from './TEMPLATE' + +export const Circle_And_Square_Stroke1_Corner0_Rounded_Filled = + createSinglePathSVG({ + viewBox: '0 0 62 53', + path: 'M28.173.231a5.653 5.653 0 0 1 7.018 3.83l2.66 9.046a20 20 0 0 1 3.986-.397c11.026 0 19.964 8.937 19.964 19.962l-.006.516c-.274 10.787-9.104 19.448-19.958 19.448l-.514-.007c-8.332-.21-15.394-5.528-18.178-12.938l-8.805 2.59a5.654 5.654 0 0 1-7.02-3.83L.232 14.34a5.654 5.654 0 0 1 3.83-7.018L28.172.23ZM41.838 14.71c-1.17 0-2.313.111-3.42.325l3.863 13.137a5.653 5.653 0 0 1-3.83 7.019L25.07 39.126c2.593 6.732 9.122 11.51 16.768 11.51 9.92 0 17.963-8.043 17.963-17.964S51.758 14.71 41.837 14.71ZM33.271 4.624a3.653 3.653 0 0 0-4.535-2.474L4.624 9.24a3.653 3.653 0 0 0-2.475 4.535l7.09 24.113a3.654 3.654 0 0 0 4.536 2.475l8.762-2.577a20 20 0 0 1-.662-5.114c0-8.961 5.905-16.544 14.037-19.069l-2.64-8.98Zm3.204 10.899c-7.302 2.28-12.601 9.096-12.601 17.15 0 1.571.203 3.095.582 4.548l13.431-3.948a3.654 3.654 0 0 0 2.474-4.536l-3.886-13.214Z', + }) diff --git a/src/components/icons/EditBig.tsx b/src/components/icons/EditBig.tsx index 571f38b3e..3065f99a7 100644 --- a/src/components/icons/EditBig.tsx +++ b/src/components/icons/EditBig.tsx @@ -1,5 +1,10 @@ import {createSinglePathSVG} from './TEMPLATE' +export const EditBig_Stroke1_Corner0_Rounded = createSinglePathSVG({ + viewBox: '0 0 48 48', + path: 'M19.667 4.458a1 1 0 1 0 0-2v2Zm25 23a1 1 0 0 0-2 0h2ZM3.912 45.543l.454-.891-.454.89Zm-2.33-2.33.89-.455h0l-.89.454Zm39.173 2.33-.454-.891h0l.454.89Zm2.33-2.33-.89-.455.89.454ZM1.581 6.37l-.89-.454h0l.89.454Zm2.331-2.331-.454-.891.454.89ZM14.333 32.79h-1a1 1 0 0 0 1 1v-1Zm.781-8.781.707.707-.707-.707ZM36.562 2.562l-.707-.707v0l.707.707Zm7.543 0-.707.707v0l.707-.707Zm.457.458.707-.707v0l-.707.707Zm0 7.542.707.707-.707-.707ZM23.114 32.01l.707.707-.707-.707Zm12.02 14.114v-1h-25.6v2h25.6v-1ZM1 37.591h1v-25.6H0v25.6h1ZM9.533 3.458v1h10.134v-2H9.533v1Zm34.134 24h-1V37.59h2V27.457h-1ZM9.533 46.124v-1c-1.51 0-2.582 0-3.421-.07-.828-.067-1.34-.195-1.746-.402l-.454.89-.454.892c.735.374 1.54.537 2.491.614.94.077 2.107.076 3.584.076v-1ZM1 37.591H0c0 1.477 0 2.645.076 3.584.078.951.24 1.756.614 2.491l.891-.454.891-.454c-.207-.406-.335-.918-.403-1.746C2.001 40.173 2 39.101 2 37.591H1Zm2.912 7.952.454-.891a4.33 4.33 0 0 1-1.894-1.894l-.89.454-.892.454a6.33 6.33 0 0 0 2.768 2.768l.454-.891Zm31.221.581v1c1.477 0 2.645.001 3.585-.076.95-.078 1.756-.24 2.49-.614l-.453-.891-.454-.891c-.406.207-.919.335-1.746.403-.84.068-1.912.07-3.422.07v1Zm8.534-8.533h-1c0 1.51-.001 2.582-.07 3.421-.067.828-.196 1.34-.403 1.746l.891.454.891.454c.375-.735.537-1.54.615-2.49.076-.94.076-2.108.076-3.585h-1Zm-2.912 7.952.454.89a6.33 6.33 0 0 0 2.767-2.767l-.89-.454-.892-.454a4.33 4.33 0 0 1-1.893 1.894l.454.89ZM1 11.99h1c0-1.51 0-2.582.07-3.422.067-.827.195-1.34.402-1.745l-.89-.454-.892-.454c-.374.734-.536 1.54-.614 2.49C-.001 9.345 0 10.513 0 11.99h1Zm8.533-8.533v-1c-1.477 0-2.645-.001-3.584.076-.951.077-1.756.24-2.49.614l.453.89.454.892c.406-.207.918-.336 1.746-.403.839-.069 1.911-.07 3.421-.07v-1ZM1.581 6.37l.891.454A4.33 4.33 0 0 1 4.366 4.93l-.454-.891-.454-.891A6.33 6.33 0 0 0 .69 5.916l.891.454Zm12.752 19.525h-1v6.896h2v-6.896h-1Zm0 6.896v1h6.896v-2h-6.896v1Zm.781-8.781.707.707L37.27 3.269l-.707-.707-.707-.707-21.448 21.448.707.707Zm28.99-21.448-.706.707.457.458.707-.707.707-.707-.457-.458-.707.707Zm.458 8-.707-.707-21.448 21.448.707.707.707.707L45.27 11.269l-.707-.707Zm0-7.542-.707.707a4.333 4.333 0 0 1 0 6.128l.707.707.707.707a6.333 6.333 0 0 0 0-8.956l-.707.707Zm-8-.458.707.707a4.333 4.333 0 0 1 6.129 0l.707-.707.707-.707a6.333 6.333 0 0 0-8.957 0l.707.707ZM21.23 32.791v1c.972 0 1.905-.386 2.593-1.074l-.708-.707-.707-.707a1.67 1.67 0 0 1-1.178.488v1Zm-6.896-6.896h1c0-.442.176-.866.489-1.178l-.708-.707-.707-.707a3.67 3.67 0 0 0-1.074 2.592h1Z', +}) + export const EditBig_Stroke2_Corner0_Rounded = createSinglePathSVG({ path: 'M17.293 2.293a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-9 9A1 1 0 0 1 12 16H9a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707l9-9ZM10 12.414V14h1.586l8-8L18 4.414l-8 8ZM3 4a1 1 0 0 1 1-1h7a1 1 0 1 1 0 2H5v14h14v-6a1 1 0 1 1 2 0v7a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4Z', }) diff --git a/src/components/icons/Hashtag.tsx b/src/components/icons/Hashtag.tsx index 930484fb2..763266210 100644 --- a/src/components/icons/Hashtag.tsx +++ b/src/components/icons/Hashtag.tsx @@ -1,5 +1,13 @@ import {createSinglePathSVG} from './TEMPLATE' +export const HashtagWide_Stroke1_Corner0_Rounded = createSinglePathSVG({ + viewBox: '0 0 46 46', + strokeLinecap: 'round', + strokeLinejoin: 'round', + strokeWidth: 2, + path: 'M14.333 1 9 45M37 1l-5.333 44M1 11.667h44m0 22.666H1', +}) + export const Hashtag_Stroke2_Corner0_Rounded = createSinglePathSVG({ path: 'M9.124 3.008a1 1 0 0 1 .868 1.116L9.632 7h5.985l.39-3.124a1 1 0 0 1 1.985.248L17.632 7H20a1 1 0 1 1 0 2h-2.617l-.75 6H20a1 1 0 1 1 0 2h-3.617l-.39 3.124a1 1 0 1 1-1.985-.248l.36-2.876H8.382l-.39 3.124a1 1 0 1 1-1.985-.248L6.368 17H4a1 1 0 1 1 0-2h2.617l.75-6H4a1 1 0 1 1 0-2h3.617l.39-3.124a1 1 0 0 1 1.117-.868ZM9.383 9l-.75 6h5.984l.75-6H9.383Z', }) diff --git a/src/components/icons/Heart2.tsx b/src/components/icons/Heart2.tsx index 9c9b0be5b..09b81102d 100644 --- a/src/components/icons/Heart2.tsx +++ b/src/components/icons/Heart2.tsx @@ -1,5 +1,12 @@ import {createSinglePathSVG} from './TEMPLATE' +export const Heart2_Stroke1_Corner0_Rounded = createSinglePathSVG({ + viewBox: '0 0 51 46', + strokeLinejoin: 'round', + strokeWidth: 2, + path: 'M49 17c0 15.333-22 26.667-24 26.667S1 32.333 1 17C1 6.333 7.667 1 14.333 1S25 5 25 5s4-4 10.667-4S49 6.333 49 17Z', +}) + export const Heart2_Stroke2_Corner0_Rounded = createSinglePathSVG({ path: 'M16.734 5.091c-1.238-.276-2.708.047-4.022 1.38a1 1 0 0 1-1.424 0C9.974 5.137 8.504 4.814 7.266 5.09c-1.263.282-2.379 1.206-2.92 2.556C3.33 10.18 4.252 14.84 12 19.348c7.747-4.508 8.67-9.168 7.654-11.7-.541-1.351-1.657-2.275-2.92-2.557Zm4.777 1.812c1.604 4-.494 9.69-9.022 14.47a1 1 0 0 1-.978 0C2.983 16.592.885 10.902 2.49 6.902c.779-1.942 2.414-3.334 4.342-3.764 1.697-.378 3.552.003 5.169 1.286 1.617-1.283 3.472-1.664 5.17-1.286 1.927.43 3.562 1.822 4.34 3.764Z', }) diff --git a/src/components/icons/Image.tsx b/src/components/icons/Image.tsx index eac296ad4..7fc9311a2 100644 --- a/src/components/icons/Image.tsx +++ b/src/components/icons/Image.tsx @@ -1,5 +1,12 @@ import {createSinglePathSVG} from './TEMPLATE' +export const Image_Stroke1_Corner0_Rounded = createSinglePathSVG({ + viewBox: '0 0 46 46', + strokeLinecap: 'round', + strokeWidth: 1.5, + path: 'm1.417 28.645 7.586-5.676a5.33 5.33 0 0 1 6.867.809c3.98 4.286 8.594 8.182 14.88 8.182 5.794 0 9.633-2.147 13.333-5.847m-38 18.637h33.334a5.333 5.333 0 0 0 5.333-5.333V6.083A5.333 5.333 0 0 0 39.417.75H6.083A5.333 5.333 0 0 0 .75 6.083v33.334a5.333 5.333 0 0 0 5.333 5.333ZM36.75 14.083a5.333 5.333 0 1 1-10.667 0 5.333 5.333 0 0 1 10.667 0Z', +}) + export const Image_Stroke2_Corner0_Rounded = createSinglePathSVG({ path: 'M3 4a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4Zm2 1v7.213l1.246-.932.044-.03a3 3 0 0 1 3.863.454c1.468 1.58 2.941 2.749 4.847 2.749 1.703 0 2.855-.555 4-1.618V5H5Zm14 10.357c-1.112.697-2.386 1.097-4 1.097-2.81 0-4.796-1.755-6.313-3.388a1 1 0 0 0-1.269-.164L5 14.712V19h14v-3.643ZM15 8a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm-3 1a3 3 0 1 1 6 0 3 3 0 0 1-6 0Z', }) diff --git a/src/components/icons/Message.tsx b/src/components/icons/Message.tsx index 6d0dd01e7..e3ca70f01 100644 --- a/src/components/icons/Message.tsx +++ b/src/components/icons/Message.tsx @@ -1,5 +1,13 @@ import {createSinglePathSVG} from './TEMPLATE' +export const Message_Stroke1_Corner0_Rounded_Filled = createSinglePathSVG({ + viewBox: '0 0 51 51', + strokeWidth: 2, + strokeLinecap: 'square', + strokeLinejoin: 'round', + path: 'M9 1h32a8 8 0 0 1 8 8v21.333a8 8 0 0 1-8 8H27.667L14.333 49V38.333H9a8 8 0 0 1-8-8V9a8 8 0 0 1 8-8Z', +}) + export const Message_Stroke2_Corner0_Rounded_Filled = createSinglePathSVG({ path: 'M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10a9.968 9.968 0 0 1-4.136-.893l-4.68.876a1 1 0 0 1-1.164-1.184l.931-4.537A9.965 9.965 0 0 1 2 12Zm4.25 0a1.25 1.25 0 1 0 2.5 0 1.25 1.25 0 0 0-2.5 0Zm4.5 0a1.25 1.25 0 1 0 2.5 0 1.25 1.25 0 0 0-2.5 0Zm5.75 1.25a1.25 1.25 0 1 1 0-2.5 1.25 1.25 0 0 1 0 2.5Z', }) diff --git a/src/components/icons/PeopleRemove2.tsx b/src/components/icons/PeopleRemove2.tsx index 3d16ed968..39b538667 100644 --- a/src/components/icons/PeopleRemove2.tsx +++ b/src/components/icons/PeopleRemove2.tsx @@ -1,5 +1,13 @@ import {createSinglePathSVG} from './TEMPLATE' +export const PeopleRemove2_Stroke1_Corner0_Rounded = createSinglePathSVG({ + viewBox: '-15 0 65 64', + strokeWidth: 2, + strokeLinecap: 'round', + strokeLinejoin: 'round', + path: 'M20.603 46.333H3.532c-1.572 0-2.816-1.358-2.472-2.891 2.033-9.046 9.421-15.775 19.543-15.775q1.367 0 2.666.16m18.667 7.84L36.603 41m0 0-5.334 5.333M36.603 41l-5.334-5.333M36.603 41l5.333 5.333m-12-36A9.333 9.333 0 1 1 20.603 1a9.333 9.333 0 0 1 9.333 9.333Z', +}) + export const PeopleRemove2_Stroke2_Corner0_Rounded = createSinglePathSVG({ path: 'M10 4a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5ZM5.5 6.5a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM16 11a1 1 0 0 1 1-1h5a1 1 0 1 1 0 2h-5a1 1 0 0 1-1-1ZM3.678 19h12.644c-.71-2.909-3.092-5-6.322-5s-5.613 2.091-6.322 5Zm-2.174.906C1.917 15.521 5.242 12 10 12c4.758 0 8.083 3.521 8.496 7.906A1 1 0 0 1 17.5 21h-15a1 1 0 0 1-.996-1.094Z', }) diff --git a/src/components/icons/TEMPLATE.tsx b/src/components/icons/TEMPLATE.tsx index 7fa9b6810..6bde25d76 100644 --- a/src/components/icons/TEMPLATE.tsx +++ b/src/components/icons/TEMPLATE.tsx @@ -28,7 +28,50 @@ export const IconTemplate_Stroke2_Corner0_Rounded = React.forwardRef( }, ) -export function createSinglePathSVG({path}: {path: string}) { +export function createSinglePathSVG({ + path, + viewBox, + strokeWidth = 0, + strokeLinecap = 'butt', + strokeLinejoin = 'miter', +}: { + path: string + viewBox?: string + strokeWidth?: number + strokeLinecap?: 'butt' | 'round' | 'square' + strokeLinejoin?: 'miter' | 'round' | 'bevel' +}) { + return React.forwardRef(function LogoImpl(props, ref) { + const {fill, size, style, gradient, ...rest} = useCommonSVGProps(props) + + const hasStroke = strokeWidth > 0 + + return ( + + {gradient} + + + ) + }) +} + +export function createSinglePathSVG2({path}: {path: string}) { return React.forwardRef(function LogoImpl(props, ref) { const {fill, size, style, gradient, ...rest} = useCommonSVGProps(props) diff --git a/src/components/icons/VideoClip.tsx b/src/components/icons/VideoClip.tsx index 0a541a418..0b7d7e1bd 100644 --- a/src/components/icons/VideoClip.tsx +++ b/src/components/icons/VideoClip.tsx @@ -1,5 +1,13 @@ import {createSinglePathSVG} from './TEMPLATE' +export const VideoClip_Stroke1_Corner0_Rounded = createSinglePathSVG({ + viewBox: '0 0 46 46', + strokeLinecap: 'square', + strokeLinejoin: 'round', + strokeWidth: 2, + path: 'M1 23h10.667M1 23V12m0 11v11m10.667-11h22.666m-22.666 0v11m0-11V12m22.666 11H45m-10.667 0v12.222m0-12.222V12M45 23V12m0 11v12.222M34.333 45h5.334A5.333 5.333 0 0 0 45 39.667v-4.445M34.333 45v-9.778m0 9.778H11.667M34.333 1h5.334A5.333 5.333 0 0 1 45 6.333V12M34.333 1v11m0-11H11.667m22.666 11H45M34.333 35.222H45M11.667 45H6.333A5.333 5.333 0 0 1 1 39.667V34m10.667 11V34m0-33H6.333A5.333 5.333 0 0 0 1 6.333V12M11.667 1v11M1 12h10.667M1 34h10.667', +}) + export const VideoClip_Stroke2_Corner0_Rounded = createSinglePathSVG({ path: 'M3 4a1 1 0 011-1h16a1 1 0 011 1v16a1 1 0 01-1 1H4a1 1 0 01-1-1V4Zm2 1v2h2V5H5Zm4 0v6h6V5H9Zm8 0v2h2V5h-2Zm2 4h-2v2h2V9Zm0 4h-2v2h2V13Zm0 4h-2V19h2ZM15 19v-6H9v6h6Zm-8 0v-2H5v2h2Zm-2-4h2v-2H5v2Zm0-4h2V9H5v2Z', }) diff --git a/src/components/icons/common.tsx b/src/components/icons/common.tsx index 0f208240f..46df59207 100644 --- a/src/components/icons/common.tsx +++ b/src/components/icons/common.tsx @@ -20,6 +20,7 @@ export const sizes = { lg: 24, xl: 28, '2xl': 32, + '3xl': 48, } as const export function useCommonSVGProps(props: Props) { diff --git a/src/locale/locales/en/messages.po b/src/locale/locales/en/messages.po index 8122fc565..10bbf2c54 100644 --- a/src/locale/locales/en/messages.po +++ b/src/locale/locales/en/messages.po @@ -11013,4 +11013,4 @@ msgstr "" #: src/components/verification/VerificationsDialog.tsx:65 msgid "Your verifications" -msgstr "" +msgstr "" \ No newline at end of file diff --git a/src/screens/Bookmarks/index.tsx b/src/screens/Bookmarks/index.tsx index 72ad1f167..a98756a39 100644 --- a/src/screens/Bookmarks/index.tsx +++ b/src/screens/Bookmarks/index.tsx @@ -7,7 +7,11 @@ import { } from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {useFocusEffect} from '@react-navigation/native' +import { + type NavigationProp, + useFocusEffect, + useNavigation, +} from '@react-navigation/native' import {useCleanError} from '#/lib/hooks/useCleanError' import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender' @@ -21,12 +25,12 @@ import {useBookmarkMutation} from '#/state/queries/bookmarks/useBookmarkMutation import {useBookmarksQuery} from '#/state/queries/bookmarks/useBookmarksQuery' import {useSetMinimalShellMode} from '#/state/shell' import {Post} from '#/view/com/post/Post' +import {EmptyState} from '#/view/com/util/EmptyState' import {List} from '#/view/com/util/List' import {PostFeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder' -import {EmptyState} from '#/screens/Bookmarks/components/EmptyState' import {atoms as a, useTheme} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' -import {BookmarkFilled} from '#/components/icons/Bookmark' +import {BookmarkDeleteLarge, BookmarkFilled} from '#/components/icons/Bookmark' import {CircleQuestion_Stroke2_Corner2_Rounded as QuestionIcon} from '#/components/icons/CircleQuestion' import * as Layout from '#/components/Layout' import {ListFooter} from '#/components/Lists' @@ -259,13 +263,35 @@ function BookmarkNotFound({ ) } +function BookmarksEmpty() { + const t = useTheme() + const {_} = useLingui() + const navigation = useNavigation>() + + return ( + navigation.navigate('Home' as never), + size: 'small', + color: 'secondary', + }} + style={[a.pt_3xl]} + /> + ) +} + function renderItem({item, index}: {item: ListItem; index: number}) { switch (item.type) { case 'loading': { return } case 'empty': { - return + return } case 'bookmark': { return ( diff --git a/src/screens/Notifications/ActivityList.tsx b/src/screens/Notifications/ActivityList.tsx index f87e34008..0b57ccde7 100644 --- a/src/screens/Notifications/ActivityList.tsx +++ b/src/screens/Notifications/ActivityList.tsx @@ -5,6 +5,7 @@ import {type NativeStackScreenProps} from '@react-navigation/native-stack' import {type AllNavigatorParams} from '#/lib/routes/types' import {PostFeed} from '#/view/com/posts/PostFeed' import {EmptyState} from '#/view/com/util/EmptyState' +import {EditBig_Stroke1_Corner0_Rounded as EditIcon} from '#/components/icons/EditBig' import * as Layout from '#/components/Layout' import {ListFooter} from '#/components/Lists' @@ -35,7 +36,11 @@ export function NotificationsActivityListScreen({ feed={`posts|${uris}`} disablePoll renderEmptyState={() => ( - + )} renderEndOfFeed={() => } /> diff --git a/src/screens/Profile/ProfileFeed/index.tsx b/src/screens/Profile/ProfileFeed/index.tsx index b97fc4ed5..14f7709c0 100644 --- a/src/screens/Profile/ProfileFeed/index.tsx +++ b/src/screens/Profile/ProfileFeed/index.tsx @@ -45,6 +45,7 @@ import { ProfileFeedHeader, ProfileFeedHeaderSkeleton, } from '#/screens/Profile/components/ProfileFeedHeader' +import {HashtagWide_Stroke1_Corner0_Rounded as HashtagWideIcon} from '#/components/icons/Hashtag' import * as Layout from '#/components/Layout' type Props = NativeStackScreenProps @@ -189,7 +190,13 @@ export function ProfileFeedScreenInner({ }, [onScrollToTop, isScreenFocused]) const renderPostsEmpty = useCallback(() => { - return + return ( + + ) }, [_]) const isVideoFeed = React.useMemo(() => { diff --git a/src/screens/Profile/Sections/Feed.tsx b/src/screens/Profile/Sections/Feed.tsx index 2f54eda7b..1591218b7 100644 --- a/src/screens/Profile/Sections/Feed.tsx +++ b/src/screens/Profile/Sections/Feed.tsx @@ -6,14 +6,20 @@ import {useQueryClient} from '@tanstack/react-query' import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender' import {isIOS, isNative} from '#/platform/detection' -import {type FeedDescriptor} from '#/state/queries/post-feed' -import {RQKEY as FEED_RQKEY} from '#/state/queries/post-feed' +import { + type FeedDescriptor, + RQKEY as FEED_RQKEY, +} from '#/state/queries/post-feed' import {truncateAndInvalidate} from '#/state/queries/util' import {PostFeed} from '#/view/com/posts/PostFeed' -import {EmptyState} from '#/view/com/util/EmptyState' +import { + EmptyState, + type EmptyStateButtonProps, +} from '#/view/com/util/EmptyState' import {type ListRef} from '#/view/com/util/List' import {LoadLatestBtn} from '#/view/com/util/load-latest/LoadLatestBtn' import {atoms as a, ios, useTheme} from '#/alf' +import {EditBig_Stroke1_Corner0_Rounded as EditIcon} from '#/components/icons/EditBig' import {Text} from '#/components/Typography' import {type SectionRef} from './types' @@ -25,7 +31,11 @@ interface FeedSectionProps { scrollElRef: ListRef ignoreFilterFor?: string setScrollViewTag: (tag: number | null) => void + emptyStateMessage?: string + emptyStateButton?: EmptyStateButtonProps + emptyStateIcon?: React.ComponentType | React.ReactElement } + export function ProfileFeedSection({ ref, feed, @@ -34,6 +44,9 @@ export function ProfileFeedSection({ scrollElRef, ignoreFilterFor, setScrollViewTag, + emptyStateMessage, + emptyStateButton, + emptyStateIcon, }: FeedSectionProps) { const {_} = useLingui() const queryClient = useQueryClient() @@ -44,7 +57,6 @@ export function ProfileFeedSection({ const adjustedInitialNumToRender = useInitialNumToRender({ screenHeightOffset: headerHeight, }) - const onScrollToTop = useCallback(() => { scrollElRef.current?.scrollToOffset({ animated: isNative, @@ -59,8 +71,18 @@ export function ProfileFeedSection({ })) const renderPostsEmpty = useCallback(() => { - return - }, [_]) + return ( + + + + ) + }, [_, emptyStateButton, emptyStateIcon, emptyStateMessage]) useEffect(() => { if (isIOS && isFocused && scrollElRef.current) { diff --git a/src/screens/ProfileList/AboutSection.tsx b/src/screens/ProfileList/AboutSection.tsx index 47f29b838..24de3011a 100644 --- a/src/screens/ProfileList/AboutSection.tsx +++ b/src/screens/ProfileList/AboutSection.tsx @@ -12,6 +12,7 @@ import {type ListRef} from '#/view/com/util/List' import {LoadLatestBtn} from '#/view/com/util/load-latest/LoadLatestBtn' import {atoms as a, useBreakpoints} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' +import {BulletList_Stroke1_Corner0_Rounded as ListIcon} from '#/components/icons/BulletList' import {PersonPlus_Stroke2_Corner0_Rounded as PersonPlusIcon} from '#/components/icons/Person' interface SectionRef { @@ -95,7 +96,7 @@ export function AboutSection({ const renderEmptyState = useCallback(() => { return ( - + {isOwner && ( + + )} ) } - -const styles = StyleSheet.create({ - iconContainer: { - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'center', - height: 80, - width: 80, - marginLeft: 'auto', - marginRight: 'auto', - borderRadius: 80, - marginTop: 30, - }, - iconContainerBig: { - width: 100, - height: 100, - marginTop: 50, - }, - text: { - textAlign: 'center', - paddingTop: 20, - }, -}) diff --git a/src/view/screens/Debug.tsx b/src/view/screens/Debug.tsx index 8b81cee10..127bdddd7 100644 --- a/src/view/screens/Debug.tsx +++ b/src/view/screens/Debug.tsx @@ -20,6 +20,7 @@ import {Text} from '#/view/com/util/text/Text' import * as Toast from '#/view/com/util/Toast' import {ViewHeader} from '#/view/com/util/ViewHeader' import {ViewSelector} from '#/view/com/util/ViewSelector' +import {HashtagWide_Stroke1_Corner0_Rounded as HashtagWideIcon} from '#/components/icons/Hashtag' import * as Layout from '#/components/Layout' const MAIN_VIEWS = ['Base', 'Controls', 'Error', 'Notifs'] @@ -333,7 +334,15 @@ function TypographyView() { } function EmptyStateView() { - return + const {_} = useLingui() + + return ( + + ) } function LoadingPlaceholderView() { diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index cc339bb03..fddde55e1 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -7,17 +7,19 @@ import { type ModerationOpts, RichText as RichTextAPI, } from '@atproto/api' -import {msg} from '@lingui/macro' +import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {useFocusEffect} from '@react-navigation/native' +import {useFocusEffect, useNavigation} from '@react-navigation/native' import {useQueryClient} from '@tanstack/react-query' import {useOpenComposer} from '#/lib/hooks/useOpenComposer' +import {useRequireEmailVerification} from '#/lib/hooks/useRequireEmailVerification' import {useSetTitle} from '#/lib/hooks/useSetTitle' import {ComposeIcon2} from '#/lib/icons' import { type CommonNavigatorParams, type NativeStackScreenProps, + type NavigationProp, } from '#/lib/routes/types' import {combinedDisplayName} from '#/lib/strings/display-names' import {cleanError} from '#/lib/strings/errors' @@ -42,6 +44,11 @@ import {ProfileHeader, ProfileHeaderLoading} from '#/screens/Profile/Header' import {ProfileFeedSection} from '#/screens/Profile/Sections/Feed' import {ProfileLabelsSection} from '#/screens/Profile/Sections/Labels' import {atoms as a} from '#/alf' +import {Circle_And_Square_Stroke1_Corner0_Rounded_Filled as CircleAndSquareIcon} from '#/components/icons/CircleAndSquare' +import {Heart2_Stroke1_Corner0_Rounded as HeartIcon} from '#/components/icons/Heart2' +import {Image_Stroke1_Corner0_Rounded as ImageIcon} from '#/components/icons/Image' +import {Message_Stroke1_Corner0_Rounded_Filled as MessageIcon} from '#/components/icons/Message' +import {VideoClip_Stroke1_Corner0_Rounded as VideoIcon} from '#/components/icons/VideoClip' import * as Layout from '#/components/Layout' import {ScreenHider} from '#/components/moderation/ScreenHider' import {ProfileStarterPacks} from '#/components/StarterPack/ProfileStarterPacks' @@ -169,6 +176,8 @@ function ProfileScreenLoaded({ const {hasSession, currentAccount} = useSession() const setMinimalShellMode = useSetMinimalShellMode() const {openComposer} = useOpenComposer() + const navigation = useNavigation() + const requireEmailVerification = useRequireEmailVerification() const { data: labelerInfo, error: labelerError, @@ -334,6 +343,17 @@ function ProfileScreenLoaded({ scrollSectionToTop(index) } + const navToWizard = useCallback(() => { + navigation.navigate('StarterPackWizard', {}) + }, [navigation]) + const wrappedNavToWizard = requireEmailVerification(navToWizard, { + instructions: [ + + Before creating a starter pack, you must first verify your email. + , + ], + }) + // rendering // = @@ -408,6 +428,14 @@ function ProfileScreenLoaded({ scrollElRef={scrollElRef as ListRef} ignoreFilterFor={profile.did} setScrollViewTag={setScrollViewTag} + emptyStateMessage={_(msg`No posts yet`)} + emptyStateButton={{ + label: _(msg`Write a post`), + text: _(msg`Write a post`), + onPress: () => openComposer({}), + size: 'small', + color: 'primary', + }} /> ) : null} @@ -421,6 +449,8 @@ function ProfileScreenLoaded({ scrollElRef={scrollElRef as ListRef} ignoreFilterFor={profile.did} setScrollViewTag={setScrollViewTag} + emptyStateMessage={_(msg`No replies yet`)} + emptyStateIcon={MessageIcon} /> ) : null} @@ -434,6 +464,15 @@ function ProfileScreenLoaded({ scrollElRef={scrollElRef as ListRef} ignoreFilterFor={profile.did} setScrollViewTag={setScrollViewTag} + emptyStateMessage={_(msg`No media yet`)} + emptyStateButton={{ + label: _(msg`Post a photo`), + text: _(msg`Post a photo`), + onPress: () => openComposer({}), + size: 'small', + color: 'primary', + }} + emptyStateIcon={ImageIcon} /> ) : null} @@ -447,6 +486,15 @@ function ProfileScreenLoaded({ scrollElRef={scrollElRef as ListRef} ignoreFilterFor={profile.did} setScrollViewTag={setScrollViewTag} + emptyStateMessage={_(msg`No video posts yet`)} + emptyStateButton={{ + label: _(msg`Post a video`), + text: _(msg`Post a video`), + onPress: () => openComposer({}), + size: 'small', + color: 'primary', + }} + emptyStateIcon={VideoIcon} /> ) : null} @@ -460,6 +508,8 @@ function ProfileScreenLoaded({ scrollElRef={scrollElRef as ListRef} ignoreFilterFor={profile.did} setScrollViewTag={setScrollViewTag} + emptyStateMessage={_(msg`No likes yet`)} + emptyStateIcon={HeartIcon} /> ) : null} @@ -485,6 +535,17 @@ function ProfileScreenLoaded({ headerOffset={headerHeight} enabled={isFocused} setScrollViewTag={setScrollViewTag} + emptyStateMessage={_( + msg`Starter packs let you share your favorite feeds and people with your friends.`, + )} + emptyStateButton={{ + label: _(msg`Create a Starter Pack`), + text: _(msg`Create a Starter Pack`), + onPress: wrappedNavToWizard, + color: 'primary', + size: 'small', + }} + emptyStateIcon={CircleAndSquareIcon} /> ) : null} -- 2.51.2 From 1eacf427b58fda05ae69d6672c5731f5659388c4 Mon Sep 17 00:00:00 2001 From: pfrazee <1270099+pfrazee@users.noreply.github.com> Date: Fri, 28 Nov 2025 02:39:29 +0000 Subject: [PATCH 5/8] Nightly source-language update --- src/locale/locales/en/messages.po | 320 ++++++++++++++++++------------ 1 file changed, 194 insertions(+), 126 deletions(-) diff --git a/src/locale/locales/en/messages.po b/src/locale/locales/en/messages.po index 10bbf2c54..da9887be6 100644 --- a/src/locale/locales/en/messages.po +++ b/src/locale/locales/en/messages.po @@ -695,8 +695,8 @@ msgstr "" msgid "Add a temporary live status to your profile. When someone clicks on your avatar, they’ll see information about your live event." msgstr "" -#: src/screens/ProfileList/AboutSection.tsx:62 -#: src/screens/ProfileList/AboutSection.tsx:80 +#: src/screens/ProfileList/AboutSection.tsx:63 +#: src/screens/ProfileList/AboutSection.tsx:81 msgid "Add a user to this list" msgstr "" @@ -738,8 +738,8 @@ msgstr "" msgid "Add app password" msgstr "" -#: src/screens/Settings/AppPasswords.tsx:73 -#: src/screens/Settings/AppPasswords.tsx:81 +#: src/screens/Settings/AppPasswords.tsx:74 +#: src/screens/Settings/AppPasswords.tsx:82 #: src/screens/Settings/components/AddAppPasswordDialog.tsx:111 msgid "Add App Password" msgstr "" @@ -766,8 +766,8 @@ msgstr "" msgid "Add muted words and tags" msgstr "" -#: src/screens/ProfileList/AboutSection.tsx:70 -#: src/screens/ProfileList/AboutSection.tsx:88 +#: src/screens/ProfileList/AboutSection.tsx:71 +#: src/screens/ProfileList/AboutSection.tsx:89 msgid "Add people" msgstr "" @@ -958,7 +958,7 @@ msgstr "" msgid "Allow your followers to reply" msgstr "" -#: src/screens/Settings/AppPasswords.tsx:199 +#: src/screens/Settings/AppPasswords.tsx:200 msgid "Allows access to direct messages" msgstr "" @@ -1031,7 +1031,7 @@ msgstr "" msgid "An error occurred while fetching the feed." msgstr "" -#: src/components/StarterPack/ProfileStarterPacks.tsx:339 +#: src/components/StarterPack/ProfileStarterPacks.tsx:371 msgid "An error occurred while generating your starter pack. Want to try again?" msgstr "" @@ -1160,7 +1160,7 @@ msgstr "" msgid "App Password" msgstr "" -#: src/screens/Settings/AppPasswords.tsx:145 +#: src/screens/Settings/AppPasswords.tsx:146 msgctxt "toast" msgid "App password deleted" msgstr "" @@ -1183,7 +1183,7 @@ msgid "App passwords" msgstr "" #: src/Navigation.tsx:351 -#: src/screens/Settings/AppPasswords.tsx:49 +#: src/screens/Settings/AppPasswords.tsx:50 msgid "App Passwords" msgstr "" @@ -1244,7 +1244,7 @@ msgstr "" msgid "Archived post" msgstr "" -#: src/screens/Settings/AppPasswords.tsx:208 +#: src/screens/Settings/AppPasswords.tsx:209 msgid "Are you sure you want to delete the app password \"{0}\"?" msgstr "" @@ -1368,8 +1368,9 @@ msgid "Before creating a post or replying, you must first verify your email." msgstr "" #: src/components/dialogs/StarterPackDialog.tsx:71 -#: src/components/StarterPack/ProfileStarterPacks.tsx:231 -#: src/components/StarterPack/ProfileStarterPacks.tsx:241 +#: src/components/StarterPack/ProfileStarterPacks.tsx:263 +#: src/components/StarterPack/ProfileStarterPacks.tsx:273 +#: src/view/screens/Profile.tsx:351 msgid "Before creating a starter pack, you must first verify your email." msgstr "" @@ -1530,7 +1531,7 @@ msgstr "" msgid "Bluesky Social Terms of Service" msgstr "" -#: src/components/StarterPack/ProfileStarterPacks.tsx:306 +#: src/components/StarterPack/ProfileStarterPacks.tsx:338 msgid "Bluesky will choose a set of recommended accounts from people in your network." msgstr "" @@ -1567,6 +1568,11 @@ msgstr "" msgid "Breaking site rules" msgstr "" +#: src/view/com/feeds/ProfileFeedgens.tsx:158 +#: src/view/com/feeds/ProfileFeedgens.tsx:159 +msgid "Browse custom feeds" +msgstr "" + #: src/components/FeedInterstitials.tsx:436 msgid "Browse more accounts on the Explore page" msgstr "" @@ -1613,6 +1619,10 @@ msgstr "" msgid "Business" msgstr "" +#: src/screens/Bookmarks/index.tsx:277 +msgid "Button to go back to the home timeline" +msgstr "" + #: src/components/LabelingServiceCard/index.tsx:62 #: src/components/moderation/ReportDialog/index.tsx:834 #: src/screens/Search/components/StarterPackCard.tsx:106 @@ -1880,7 +1890,7 @@ msgstr "" msgid "Choose Feeds" msgstr "" -#: src/components/StarterPack/ProfileStarterPacks.tsx:314 +#: src/components/StarterPack/ProfileStarterPacks.tsx:346 msgid "Choose for me" msgstr "" @@ -2447,7 +2457,7 @@ msgstr "" msgid "Could not leave chat" msgstr "" -#: src/screens/Profile/ProfileFeed/index.tsx:83 +#: src/screens/Profile/ProfileFeed/index.tsx:84 msgid "Could not load feed" msgstr "" @@ -2477,21 +2487,31 @@ msgstr "" #. Text on button to create a new starter pack #: src/components/dialogs/StarterPackDialog.tsx:112 #: src/components/dialogs/StarterPackDialog.tsx:201 -#: src/components/StarterPack/ProfileStarterPacks.tsx:296 +#: src/components/StarterPack/ProfileStarterPacks.tsx:328 msgid "Create" msgstr "" +#: src/view/com/lists/ProfileLists.tsx:159 +#: src/view/com/lists/ProfileLists.tsx:160 +msgid "Create a list" +msgstr "" + #: src/components/StarterPack/QrCodeDialog.tsx:163 msgid "Create a QR code for a starter pack" msgstr "" -#: src/components/StarterPack/ProfileStarterPacks.tsx:174 -#: src/components/StarterPack/ProfileStarterPacks.tsx:283 +#: src/components/StarterPack/ProfileStarterPacks.tsx:206 +#: src/components/StarterPack/ProfileStarterPacks.tsx:315 #: src/Navigation.tsx:589 msgid "Create a starter pack" msgstr "" -#: src/components/StarterPack/ProfileStarterPacks.tsx:270 +#: src/view/screens/Profile.tsx:542 +#: src/view/screens/Profile.tsx:543 +msgid "Create a Starter Pack" +msgstr "" + +#: src/components/StarterPack/ProfileStarterPacks.tsx:302 msgid "Create a starter pack for me" msgstr "" @@ -2528,7 +2548,7 @@ msgstr "" msgid "Create an avatar instead" msgstr "" -#: src/components/StarterPack/ProfileStarterPacks.tsx:181 +#: src/components/StarterPack/ProfileStarterPacks.tsx:213 msgid "Create another" msgstr "" @@ -2556,7 +2576,7 @@ msgstr "" msgid "Create user list" msgstr "" -#: src/screens/Settings/AppPasswords.tsx:172 +#: src/screens/Settings/AppPasswords.tsx:173 msgid "Created {0}" msgstr "" @@ -2602,7 +2622,7 @@ msgctxt "Name of app icon variant" msgid "Dark" msgstr "" -#: src/view/screens/Debug.tsx:68 +#: src/view/screens/Debug.tsx:69 msgid "Dark mode" msgstr "" @@ -2624,7 +2644,7 @@ msgstr "" msgid "Debug Moderation" msgstr "" -#: src/view/screens/Debug.tsx:88 +#: src/view/screens/Debug.tsx:89 msgid "Debug panel" msgstr "" @@ -2644,7 +2664,7 @@ msgstr "" #: src/components/PostControls/PostMenu/PostMenuItems.tsx:736 #: src/screens/Messages/components/ChatStatusInfo.tsx:55 #: src/screens/ProfileList/components/MoreOptionsMenu.tsx:280 -#: src/screens/Settings/AppPasswords.tsx:211 +#: src/screens/Settings/AppPasswords.tsx:212 #: src/screens/StarterPack/StarterPackScreen.tsx:601 #: src/screens/StarterPack/StarterPackScreen.tsx:690 #: src/screens/StarterPack/StarterPackScreen.tsx:762 @@ -2660,11 +2680,11 @@ msgstr "" msgid "Delete Account <0>\"<1>{0}<2>\"" msgstr "" -#: src/screens/Settings/AppPasswords.tsx:185 +#: src/screens/Settings/AppPasswords.tsx:186 msgid "Delete app password" msgstr "" -#: src/screens/Settings/AppPasswords.tsx:206 +#: src/screens/Settings/AppPasswords.tsx:207 msgid "Delete app password?" msgstr "" @@ -3260,7 +3280,7 @@ msgstr "" msgid "Enabled" msgstr "" -#: src/screens/Profile/Sections/Feed.tsx:109 +#: src/screens/Profile/Sections/Feed.tsx:131 msgid "End of feed" msgstr "" @@ -3746,7 +3766,7 @@ msgstr "" #: src/screens/Search/SearchResults.tsx:77 #: src/screens/StarterPack/StarterPackScreen.tsx:190 #: src/view/screens/Feeds.tsx:511 -#: src/view/screens/Profile.tsx:230 +#: src/view/screens/Profile.tsx:239 #: src/view/shell/desktop/LeftNav.tsx:728 #: src/view/shell/Drawer.tsx:530 msgid "Feeds" @@ -4056,7 +4076,7 @@ msgctxt "from-feed" msgid "From <0/>" msgstr "" -#: src/components/StarterPack/ProfileStarterPacks.tsx:303 +#: src/components/StarterPack/ProfileStarterPacks.tsx:335 msgid "Generate a starter pack" msgstr "" @@ -4147,13 +4167,15 @@ msgstr "" #: src/components/moderation/ScreenHider.tsx:160 #: src/components/moderation/ScreenHider.tsx:169 #: src/screens/Messages/Inbox.tsx:251 -#: src/screens/Profile/ProfileFeed/index.tsx:92 +#: src/screens/Profile/ProfileFeed/index.tsx:93 #: src/screens/ProfileList/components/ErrorScreen.tsx:34 #: src/screens/ProfileList/components/ErrorScreen.tsx:40 #: src/screens/VideoFeed/components/Header.tsx:163 #: src/screens/VideoFeed/index.tsx:1162 #: src/screens/VideoFeed/index.tsx:1166 #: src/view/com/auth/LoggedOut.tsx:72 +#: src/view/com/profile/ProfileFollowers.tsx:144 +#: src/view/com/profile/ProfileFollowers.tsx:145 #: src/view/screens/NotFound.tsx:57 msgid "Go back" msgstr "" @@ -4162,7 +4184,7 @@ msgstr "" #: src/screens/List/ListHiddenScreen.tsx:224 #: src/screens/Profile/ErrorState.tsx:62 #: src/screens/Profile/ErrorState.tsx:66 -#: src/screens/Profile/ProfileFeed/index.tsx:97 +#: src/screens/Profile/ProfileFeed/index.tsx:98 #: src/screens/StarterPack/StarterPackScreen.tsx:775 #: src/view/screens/NotFound.tsx:56 msgid "Go Back" @@ -4180,6 +4202,7 @@ msgctxt "Button to go back to the home timeline" msgid "Go home" msgstr "" +#: src/screens/Bookmarks/index.tsx:278 #: src/view/screens/NotFound.tsx:57 msgid "Go home" msgstr "" @@ -4433,23 +4456,23 @@ msgstr "" msgid "Hides the content" msgstr "" -#: src/view/com/posts/PostFeedErrorMessage.tsx:121 +#: src/view/com/posts/PostFeedErrorMessage.tsx:124 msgid "Hmm, some kind of issue occurred when contacting the feed server. Please let the feed owner know about this issue." msgstr "" -#: src/view/com/posts/PostFeedErrorMessage.tsx:109 +#: src/view/com/posts/PostFeedErrorMessage.tsx:112 msgid "Hmm, the feed server appears to be misconfigured. Please let the feed owner know about this issue." msgstr "" -#: src/view/com/posts/PostFeedErrorMessage.tsx:115 +#: src/view/com/posts/PostFeedErrorMessage.tsx:118 msgid "Hmm, the feed server appears to be offline. Please let the feed owner know about this issue." msgstr "" -#: src/view/com/posts/PostFeedErrorMessage.tsx:112 +#: src/view/com/posts/PostFeedErrorMessage.tsx:115 msgid "Hmm, the feed server gave a bad response. Please let the feed owner know about this issue." msgstr "" -#: src/view/com/posts/PostFeedErrorMessage.tsx:106 +#: src/view/com/posts/PostFeedErrorMessage.tsx:109 msgid "Hmm, we're having trouble finding this feed. It may have been deleted." msgstr "" @@ -4763,7 +4786,7 @@ msgid "Labeled by the author." msgstr "" #: src/view/com/composer/labels/LabelsBtn.tsx:69 -#: src/view/screens/Profile.tsx:223 +#: src/view/screens/Profile.tsx:232 msgid "Labels" msgstr "" @@ -4905,7 +4928,7 @@ msgstr "" msgid "left to go." msgstr "" -#: src/components/StarterPack/ProfileStarterPacks.tsx:319 +#: src/components/StarterPack/ProfileStarterPacks.tsx:351 msgid "Let me choose" msgstr "" @@ -4986,7 +5009,7 @@ msgstr "" #: src/lib/hooks/useNotificationHandler.ts:126 #: src/screens/Settings/NotificationSettings/index.tsx:126 #: src/screens/Settings/NotificationSettings/LikeNotificationSettings.tsx:41 -#: src/view/screens/Profile.tsx:229 +#: src/view/screens/Profile.tsx:238 msgid "Likes" msgstr "" @@ -5091,13 +5114,18 @@ msgstr "" #: src/Navigation.tsx:172 #: src/view/screens/Lists.tsx:67 -#: src/view/screens/Profile.tsx:224 -#: src/view/screens/Profile.tsx:232 +#: src/view/screens/Profile.tsx:233 +#: src/view/screens/Profile.tsx:241 #: src/view/shell/desktop/LeftNav.tsx:746 #: src/view/shell/Drawer.tsx:545 msgid "Lists" msgstr "" +#: src/view/com/lists/MyLists.tsx:72 +#: src/view/com/lists/ProfileLists.tsx:155 +msgid "Lists allow you to see content from your favorite people." +msgstr "" + #: src/components/dms/BlockedByListDialog.tsx:39 msgid "Lists blocking this user:" msgstr "" @@ -5131,9 +5159,9 @@ msgstr "" msgid "Load new notifications" msgstr "" -#: src/screens/Profile/ProfileFeed/index.tsx:224 -#: src/screens/Profile/Sections/Feed.tsx:94 -#: src/screens/ProfileList/FeedSection.tsx:105 +#: src/screens/Profile/ProfileFeed/index.tsx:231 +#: src/screens/Profile/Sections/Feed.tsx:116 +#: src/screens/ProfileList/FeedSection.tsx:112 #: src/view/com/feeds/FeedPage.tsx:169 msgid "Load new posts" msgstr "" @@ -5195,7 +5223,7 @@ msgstr "" msgid "Make adjustments to email settings for your account" msgstr "" -#: src/components/StarterPack/ProfileStarterPacks.tsx:278 +#: src/components/StarterPack/ProfileStarterPacks.tsx:310 msgid "Make one for me" msgstr "" @@ -5237,7 +5265,7 @@ msgstr "" msgid "Maybe later" msgstr "" -#: src/view/screens/Profile.tsx:227 +#: src/view/screens/Profile.tsx:236 msgid "Media" msgstr "" @@ -5281,7 +5309,7 @@ msgstr "" msgid "Message from @{0}: {1}" msgstr "" -#: src/view/com/posts/PostFeedErrorMessage.tsx:205 +#: src/view/com/posts/PostFeedErrorMessage.tsx:208 msgid "Message from server: {0}" msgstr "" @@ -5625,12 +5653,12 @@ msgstr "" msgid "New password" msgstr "" -#: src/screens/Profile/ProfileFeed/index.tsx:241 +#: src/screens/Profile/ProfileFeed/index.tsx:248 #: src/screens/ProfileList/index.tsx:246 #: src/screens/ProfileList/index.tsx:284 #: src/view/screens/Feeds.tsx:552 #: src/view/screens/Notifications.tsx:167 -#: src/view/screens/Profile.tsx:510 +#: src/view/screens/Profile.tsx:571 msgid "New post" msgstr "" @@ -5699,7 +5727,7 @@ msgstr "" msgid "No ads, no invasive tracking, no engagement traps. Bluesky respects your time and attention." msgstr "" -#: src/screens/Settings/AppPasswords.tsx:106 +#: src/screens/Settings/AppPasswords.tsx:107 msgid "No app passwords yet" msgstr "" @@ -5720,12 +5748,17 @@ msgstr "" msgid "No feeds found. Try searching for something else." msgstr "" +#: src/view/com/profile/ProfileFollowers.tsx:135 +msgid "No followers yet" +msgstr "" + #: src/components/live/LinkPreview.tsx:63 msgid "No image" msgstr "" #: src/components/LikedByList.tsx:84 #: src/view/com/post-thread/PostLikedBy.tsx:84 +#: src/view/screens/Profile.tsx:511 msgid "No likes yet" msgstr "" @@ -5735,6 +5768,10 @@ msgstr "" msgid "No longer following {0}" msgstr "" +#: src/view/screens/Profile.tsx:467 +msgid "No media yet" +msgstr "" + #: src/screens/Messages/components/ChatListItem.tsx:142 msgid "No messages yet" msgstr "" @@ -5743,7 +5780,7 @@ msgstr "" msgid "No more doomscrolling junk-filled algorithms. Find feeds that work for you, not against you." msgstr "" -#: src/view/com/notifications/NotificationFeed.tsx:122 +#: src/view/com/notifications/NotificationFeed.tsx:123 msgid "No notifications yet!" msgstr "" @@ -5759,18 +5796,23 @@ msgstr "" msgid "No one but the author can quote this post." msgstr "" -#: src/screens/Notifications/ActivityList.tsx:38 +#: src/screens/Notifications/ActivityList.tsx:42 msgid "No posts here" msgstr "" -#: src/screens/Profile/Sections/Feed.tsx:62 -msgid "No posts yet." +#: src/screens/Profile/Sections/Feed.tsx:80 +#: src/view/screens/Profile.tsx:431 +msgid "No posts yet" msgstr "" #: src/view/com/post-thread/PostQuotes.tsx:105 msgid "No quotes yet" msgstr "" +#: src/view/screens/Profile.tsx:452 +msgid "No replies yet" +msgstr "" + #: src/view/com/post-thread/PostRepostedBy.tsx:90 msgid "No reposts yet" msgstr "" @@ -5789,7 +5831,8 @@ msgstr "" msgid "No results for \"{0}\"." msgstr "" -#: src/components/Lists.tsx:189 +#: src/components/Lists.tsx:201 +#: src/components/Lists.tsx:216 msgid "No results found" msgstr "" @@ -5814,6 +5857,10 @@ msgstr "" msgid "No thanks" msgstr "" +#: src/view/screens/Profile.tsx:489 +msgid "No video posts yet" +msgstr "" + #: src/components/dialogs/PostInteractionSettingsDialog.tsx:465 msgid "Nobody" msgstr "" @@ -5852,7 +5899,7 @@ msgid "Not followed by anyone you're following" msgstr "" #: src/Navigation.tsx:167 -#: src/view/screens/Profile.tsx:125 +#: src/view/screens/Profile.tsx:132 msgid "Not Found" msgstr "" @@ -5877,6 +5924,7 @@ msgid "Nothing here" msgstr "" #: src/screens/Bookmarks/components/EmptyState.tsx:35 +#: src/screens/Bookmarks/index.tsx:274 msgid "Nothing saved yet" msgstr "" @@ -5896,7 +5944,7 @@ msgstr "" #: src/Navigation.tsx:564 #: src/Navigation.tsx:764 -#: src/screens/Notifications/ActivityList.tsx:29 +#: src/screens/Notifications/ActivityList.tsx:30 #: src/screens/Settings/NotificationSettings/ActivityNotificationSettings.tsx:90 #: src/screens/Settings/NotificationSettings/index.tsx:92 #: src/screens/Settings/NotificationSettings/LikeNotificationSettings.tsx:30 @@ -6015,16 +6063,16 @@ msgstr "" msgid "Only WebVTT (.vtt) files are supported" msgstr "" -#: src/components/Lists.tsx:94 +#: src/components/Lists.tsx:98 msgid "Oops, something went wrong!" msgstr "" -#: src/components/Lists.tsx:173 -#: src/components/StarterPack/ProfileStarterPacks.tsx:328 -#: src/components/StarterPack/ProfileStarterPacks.tsx:337 -#: src/screens/Settings/AppPasswords.tsx:57 +#: src/components/Lists.tsx:183 +#: src/components/StarterPack/ProfileStarterPacks.tsx:360 +#: src/components/StarterPack/ProfileStarterPacks.tsx:369 +#: src/screens/Settings/AppPasswords.tsx:58 #: src/screens/Settings/components/ChangeHandleDialog.tsx:106 -#: src/view/screens/Profile.tsx:125 +#: src/view/screens/Profile.tsx:132 msgid "Oops!" msgstr "" @@ -6268,7 +6316,8 @@ msgstr "" msgid "Our moderators have reviewed reports and decided to disable your access to chats on Bluesky." msgstr "" -#: src/components/Lists.tsx:190 +#: src/components/Lists.tsx:202 +#: src/components/Lists.tsx:217 #: src/view/screens/NotFound.tsx:47 msgid "Page not found" msgstr "" @@ -6596,6 +6645,16 @@ msgctxt "action" msgid "Post" msgstr "" +#: src/view/screens/Profile.tsx:469 +#: src/view/screens/Profile.tsx:470 +msgid "Post a photo" +msgstr "" + +#: src/view/screens/Profile.tsx:491 +#: src/view/screens/Profile.tsx:492 +msgid "Post a video" +msgstr "" + #: src/view/com/composer/Composer.tsx:1117 msgctxt "action" msgid "Post All" @@ -6676,7 +6735,7 @@ msgstr "" #: src/screens/ProfileList/index.tsx:166 #: src/screens/Settings/NotificationSettings/ActivityNotificationSettings.tsx:216 #: src/screens/StarterPack/StarterPackScreen.tsx:191 -#: src/view/screens/Profile.tsx:225 +#: src/view/screens/Profile.tsx:234 msgid "Posts" msgstr "" @@ -6684,7 +6743,7 @@ msgstr "" msgid "Posts can be muted based on their text, their tags, or both. We recommend avoiding common words that appear in many posts, since it can result in no posts being shown." msgstr "" -#: src/view/com/posts/PostFeedErrorMessage.tsx:72 +#: src/view/com/posts/PostFeedErrorMessage.tsx:75 msgid "Posts hidden" msgstr "" @@ -6705,7 +6764,7 @@ msgid "Press to attempt reconnection" msgstr "" #: src/components/Error.tsx:60 -#: src/components/Lists.tsx:99 +#: src/components/Lists.tsx:103 #: src/screens/Messages/components/MessageListError.tsx:24 #: src/screens/Signup/BackNextButtons.tsx:47 msgid "Press to retry" @@ -6770,7 +6829,7 @@ msgid "Processing..." msgstr "" #: src/view/screens/DebugMod.tsx:936 -#: src/view/screens/Profile.tsx:364 +#: src/view/screens/Profile.tsx:384 msgid "profile" msgstr "" @@ -6802,10 +6861,6 @@ msgstr "" msgid "Public, sharable lists of users to mute or block in bulk." msgstr "" -#: src/view/com/lists/MyLists.tsx:72 -msgid "Public, sharable lists which can be used to drive feeds." -msgstr "" - #. Accessibility label for button to publish a single post #: src/view/com/composer/Composer.tsx:1099 msgid "Publish post" @@ -7011,10 +7066,10 @@ msgstr "" #: src/components/FeedCard.tsx:343 #: src/components/StarterPack/Wizard/WizardListCard.tsx:105 #: src/components/StarterPack/Wizard/WizardListCard.tsx:112 -#: src/screens/Bookmarks/index.tsx:255 +#: src/screens/Bookmarks/index.tsx:259 #: src/screens/Settings/Settings.tsx:664 #: src/view/com/modals/UserAddRemoveLists.tsx:235 -#: src/view/com/posts/PostFeedErrorMessage.tsx:217 +#: src/view/com/posts/PostFeedErrorMessage.tsx:220 msgid "Remove" msgstr "" @@ -7051,11 +7106,11 @@ msgstr "" #: src/view/com/posts/FeedShutdownMsg.tsx:116 #: src/view/com/posts/FeedShutdownMsg.tsx:120 -#: src/view/com/posts/PostFeedErrorMessage.tsx:173 +#: src/view/com/posts/PostFeedErrorMessage.tsx:176 msgid "Remove feed" msgstr "" -#: src/view/com/posts/PostFeedErrorMessage.tsx:214 +#: src/view/com/posts/PostFeedErrorMessage.tsx:217 msgid "Remove feed?" msgstr "" @@ -7077,7 +7132,7 @@ msgid "Remove from saved feeds" msgstr "" #: src/components/PostControls/BookmarkButton.tsx:128 -#: src/screens/Bookmarks/index.tsx:249 +#: src/screens/Bookmarks/index.tsx:253 msgid "Remove from saved posts" msgstr "" @@ -7111,7 +7166,7 @@ msgstr "" msgid "Remove subtitle file" msgstr "" -#: src/view/com/posts/PostFeedErrorMessage.tsx:215 +#: src/view/com/posts/PostFeedErrorMessage.tsx:218 msgid "Remove this feed from your saved feeds" msgstr "" @@ -7148,7 +7203,7 @@ msgid "Removed from saved feeds" msgstr "" #: src/components/PostControls/BookmarkButton.tsx:94 -#: src/screens/Bookmarks/index.tsx:207 +#: src/screens/Bookmarks/index.tsx:211 msgid "Removed from saved posts" msgstr "" @@ -7197,7 +7252,7 @@ msgstr "" #: src/screens/Settings/NotificationSettings/ActivityNotificationSettings.tsx:218 #: src/screens/Settings/NotificationSettings/index.tsx:148 #: src/screens/Settings/NotificationSettings/ReplyNotificationSettings.tsx:41 -#: src/view/screens/Profile.tsx:226 +#: src/view/screens/Profile.tsx:235 msgid "Replies" msgstr "" @@ -7460,11 +7515,11 @@ msgstr "" #: src/components/dms/MessageItem.tsx:322 #: src/components/Error.tsx:65 -#: src/components/Lists.tsx:110 +#: src/components/Lists.tsx:114 #: src/components/moderation/ReportDialog/index.tsx:274 #: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx:55 #: src/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoFallback.tsx:58 -#: src/components/StarterPack/ProfileStarterPacks.tsx:342 +#: src/components/StarterPack/ProfileStarterPacks.tsx:374 #: src/screens/Login/LoginForm.tsx:326 #: src/screens/Login/LoginForm.tsx:333 #: src/screens/Messages/ChatList.tsx:292 @@ -7498,7 +7553,7 @@ msgstr "" msgid "Returns to home page" msgstr "" -#: src/screens/Profile/ProfileFeed/index.tsx:93 +#: src/screens/Profile/ProfileFeed/index.tsx:94 #: src/screens/ProfileList/components/ErrorScreen.tsx:35 #: src/screens/Settings/components/ChangeHandleDialog.tsx:575 #: src/screens/VideoFeed/index.tsx:1163 @@ -7582,7 +7637,7 @@ msgstr "" #: src/components/dialogs/nuxs/BookmarksAnnouncement.tsx:143 #: src/Navigation.tsx:608 -#: src/screens/Bookmarks/index.tsx:55 +#: src/screens/Bookmarks/index.tsx:59 msgid "Saved Posts" msgstr "" @@ -7615,7 +7670,7 @@ msgstr "" msgid "Scroll right" msgstr "" -#: src/screens/ProfileList/AboutSection.tsx:130 +#: src/screens/ProfileList/AboutSection.tsx:131 msgid "Scroll to top" msgstr "" @@ -7749,6 +7804,11 @@ msgstr "" msgid "See more suggested profiles on the Explore page" msgstr "" +#: src/view/com/profile/ProfileFollows.tsx:155 +#: src/view/com/profile/ProfileFollows.tsx:156 +msgid "See suggested accounts" +msgstr "" + #: src/screens/SavedFeeds.tsx:220 msgid "See this guide" msgstr "" @@ -8416,7 +8476,7 @@ msgstr "" msgid "Something went wrong, please try again." msgstr "" -#: src/components/Lists.tsx:174 +#: src/components/Lists.tsx:184 msgid "Something went wrong!" msgstr "" @@ -8480,13 +8540,13 @@ msgstr "" msgid "Start a new chat" msgstr "" -#: src/screens/ProfileList/AboutSection.tsx:102 -#: src/screens/ProfileList/FeedSection.tsx:74 +#: src/screens/ProfileList/AboutSection.tsx:103 +#: src/screens/ProfileList/FeedSection.tsx:81 msgid "Start adding people" msgstr "" -#: src/screens/ProfileList/AboutSection.tsx:108 -#: src/screens/ProfileList/FeedSection.tsx:80 +#: src/screens/ProfileList/AboutSection.tsx:109 +#: src/screens/ProfileList/FeedSection.tsx:87 msgid "Start adding people!" msgstr "" @@ -8518,14 +8578,18 @@ msgid "Starter pack is invalid" msgstr "" #: src/screens/Search/Explore.tsx:625 -#: src/view/screens/Profile.tsx:231 +#: src/view/screens/Profile.tsx:240 msgid "Starter Packs" msgstr "" -#: src/components/StarterPack/ProfileStarterPacks.tsx:262 +#: src/components/StarterPack/ProfileStarterPacks.tsx:294 msgid "Starter packs let you easily share your favorite feeds and people with your friends." msgstr "" +#: src/view/screens/Profile.tsx:539 +msgid "Starter packs let you share your favorite feeds and people with your friends." +msgstr "" + #: src/screens/Settings/AboutSettings.tsx:100 #: src/screens/Settings/AboutSettings.tsx:103 msgid "Status Page" @@ -8928,7 +8992,7 @@ msgstr "" msgid "There was an issue contacting the server, please check your internet connection and try again." msgstr "" -#: src/view/com/notifications/NotificationFeed.tsx:130 +#: src/view/com/notifications/NotificationFeed.tsx:131 msgid "There was an issue fetching notifications. Tap here to try again." msgstr "" @@ -8941,12 +9005,12 @@ msgstr "" msgid "There was an issue fetching the list. Tap here to try again." msgstr "" -#: src/screens/Settings/AppPasswords.tsx:58 +#: src/screens/Settings/AppPasswords.tsx:59 msgid "There was an issue fetching your app passwords" msgstr "" -#: src/view/com/feeds/ProfileFeedgens.tsx:163 -#: src/view/com/lists/ProfileLists.tsx:161 +#: src/view/com/feeds/ProfileFeedgens.tsx:174 +#: src/view/com/lists/ProfileLists.tsx:175 msgid "There was an issue fetching your lists. Tap here to try again." msgstr "" @@ -8954,7 +9018,7 @@ msgstr "" msgid "There was an issue fetching your service info" msgstr "" -#: src/view/com/posts/PostFeedErrorMessage.tsx:149 +#: src/view/com/posts/PostFeedErrorMessage.tsx:152 msgid "There was an issue removing this feed. Please check your internet connection and try again." msgstr "" @@ -9070,7 +9134,7 @@ msgstr "" msgid "This content is not available because one of the users involved has blocked the other." msgstr "" -#: src/view/com/posts/PostFeedErrorMessage.tsx:118 +#: src/view/com/posts/PostFeedErrorMessage.tsx:121 msgid "This content is not viewable without a Bluesky account." msgstr "" @@ -9098,7 +9162,7 @@ msgstr "" msgid "This feature is not available while using an App Password. Please sign in with your main password." msgstr "" -#: src/view/com/posts/PostFeedErrorMessage.tsx:124 +#: src/view/com/posts/PostFeedErrorMessage.tsx:127 msgid "This feed is currently receiving high traffic and is temporarily unavailable. Please try again later." msgstr "" @@ -9106,9 +9170,9 @@ msgstr "" msgid "This feed is empty! You may need to follow more users or tune your language settings." msgstr "" -#: src/components/StarterPack/Main/PostsList.tsx:36 -#: src/screens/Profile/ProfileFeed/index.tsx:192 -#: src/screens/ProfileList/FeedSection.tsx:71 +#: src/components/StarterPack/Main/PostsList.tsx:41 +#: src/screens/Profile/ProfileFeed/index.tsx:197 +#: src/screens/ProfileList/FeedSection.tsx:77 msgid "This feed is empty." msgstr "" @@ -9124,6 +9188,10 @@ msgstr "" msgid "This information is private and not shared with other users." msgstr "" +#: src/view/screens/Debug.tsx:343 +msgid "This is an empty state" +msgstr "" + #: src/components/live/EditLiveDialog.tsx:189 #: src/components/live/GoLiveDialog.tsx:157 msgid "This is not a valid link" @@ -9153,7 +9221,7 @@ msgstr "" msgid "This list – created by you – contains possible violations of Bluesky's community guidelines in its name or description." msgstr "" -#: src/screens/ProfileList/AboutSection.tsx:98 +#: src/screens/ProfileList/AboutSection.tsx:99 msgid "This list is empty." msgstr "" @@ -9173,7 +9241,7 @@ msgstr "" msgid "This post is only visible to logged-in users." msgstr "" -#: src/screens/Bookmarks/index.tsx:245 +#: src/screens/Bookmarks/index.tsx:249 msgid "This post was deleted by its author" msgstr "" @@ -9209,7 +9277,7 @@ msgstr "" msgid "This user does not have a display name, and therefore cannot be verified." msgstr "" -#: src/view/com/profile/ProfileFollowers.tsx:133 +#: src/view/com/profile/ProfileFollowers.tsx:136 msgid "This user doesn't have any followers." msgstr "" @@ -9238,7 +9306,7 @@ msgstr "" msgid "This user is new here. Press for more info about when they joined." msgstr "" -#: src/view/com/profile/ProfileFollows.tsx:133 +#: src/view/com/profile/ProfileFollows.tsx:147 msgid "This user isn't following anyone." msgstr "" @@ -9706,7 +9774,7 @@ msgstr "" msgid "Uploading video..." msgstr "" -#: src/screens/Settings/AppPasswords.tsx:65 +#: src/screens/Settings/AppPasswords.tsx:66 msgid "Use app passwords to sign in to other Bluesky clients without giving full access to your account or password." msgstr "" @@ -9960,7 +10028,7 @@ msgstr "" msgid "Video: {0}" msgstr "" -#: src/view/screens/Profile.tsx:228 +#: src/view/screens/Profile.tsx:237 msgid "Videos" msgstr "" @@ -10032,7 +10100,7 @@ msgstr "" #: src/components/ProfileHoverCard/index.web.tsx:466 #: src/components/ProfileHoverCard/index.web.tsx:486 #: src/components/ProfileHoverCard/index.web.tsx:513 -#: src/view/com/posts/PostFeedErrorMessage.tsx:179 +#: src/view/com/posts/PostFeedErrorMessage.tsx:182 #: src/view/com/util/PostMeta.tsx:90 #: src/view/com/util/PostMeta.tsx:127 msgid "View profile" @@ -10262,7 +10330,7 @@ msgstr "" msgid "We're sorry! The post you are replying to has been deleted." msgstr "" -#: src/components/Lists.tsx:194 +#: src/components/Lists.tsx:221 #: src/view/screens/NotFound.tsx:50 msgid "We're sorry! We can't find the page you were looking for." msgstr "" @@ -10386,6 +10454,11 @@ msgstr "" msgid "Write a message" msgstr "" +#: src/view/screens/Profile.tsx:433 +#: src/view/screens/Profile.tsx:434 +msgid "Write a post" +msgstr "" + #: src/view/com/composer/Composer.tsx:955 msgid "Write post" msgstr "" @@ -10471,8 +10544,8 @@ msgstr "" msgid "You are not allowed to upload videos." msgstr "" -#: src/view/com/profile/ProfileFollows.tsx:132 -msgid "You are not following anyone." +#: src/view/com/profile/ProfileFollows.tsx:146 +msgid "You are not following anyone yet" msgstr "" #: src/components/live/queries.ts:156 @@ -10549,10 +10622,6 @@ msgstr "" msgid "You can update this later from your settings." msgstr "" -#: src/view/com/profile/ProfileFollowers.tsx:132 -msgid "You do not have any followers." -msgstr "" - #: src/screens/Profile/KnownFollowers.tsx:112 msgid "You don't follow any users who follow @{name}." msgstr "" @@ -10614,12 +10683,7 @@ msgstr "" msgid "You have no conversations yet. Start one!" msgstr "" -#: src/view/com/feeds/ProfileFeedgens.tsx:151 -msgid "You have no feeds." -msgstr "" - #: src/view/com/lists/MyLists.tsx:81 -#: src/view/com/lists/ProfileLists.tsx:149 msgid "You have no lists." msgstr "" @@ -10635,7 +10699,7 @@ msgstr "" msgid "You have not muted any accounts yet. To mute an account, go to their profile and select \"Mute account\" from the menu on their account." msgstr "" -#: src/components/Lists.tsx:57 +#: src/components/Lists.tsx:61 msgid "You have reached the end" msgstr "" @@ -10647,10 +10711,14 @@ msgstr "" msgid "You have temporarily reached the limit for video uploads. Please try again later." msgstr "" -#: src/components/StarterPack/ProfileStarterPacks.tsx:259 +#: src/components/StarterPack/ProfileStarterPacks.tsx:291 msgid "You haven't created a starter pack yet!" msgstr "" +#: src/view/com/feeds/ProfileFeedgens.tsx:155 +msgid "You haven't made any custom feeds yet." +msgstr "" + #: src/components/dialogs/MutedWords.tsx:403 msgid "You haven't muted any words or tags yet" msgstr "" @@ -10696,7 +10764,7 @@ msgstr "" msgid "You must be at least 13 years old to use Bluesky. Read our <0>Terms of Service for more information." msgstr "" -#: src/components/StarterPack/ProfileStarterPacks.tsx:330 +#: src/components/StarterPack/ProfileStarterPacks.tsx:362 msgid "You must be following at least seven other people to generate a starter pack." msgstr "" @@ -11013,4 +11081,4 @@ msgstr "" #: src/components/verification/VerificationsDialog.tsx:65 msgid "Your verifications" -msgstr "" \ No newline at end of file +msgstr "" -- 2.51.2 From 0ba4edab8d6cde543109b75fc6fb84a6ea879940 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 1 Dec 2025 17:52:19 +0200 Subject: [PATCH 6/8] add dot separated time style (#9455) --- src/lib/strings/time.ts | 12 +++++++++++- .../PostThread/components/ThreadItemAnchor.tsx | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/lib/strings/time.ts b/src/lib/strings/time.ts index a44bfdbe4..215ac369e 100644 --- a/src/lib/strings/time.ts +++ b/src/lib/strings/time.ts @@ -1,12 +1,22 @@ import {type I18n} from '@lingui/core' +import {msg} from '@lingui/macro' export function niceDate( i18n: I18n, date: number | string | Date, - dateStyle: 'short' | 'medium' | 'long' | 'full' = 'long', + dateStyle: 'short' | 'medium' | 'long' | 'full' | 'dot separated' = 'long', ) { const d = new Date(date) + if (dateStyle === 'dot separated') { + return i18n._( + msg({ + context: 'date and time formatted like this: [time] · [date]', + message: `${i18n.date(d, {timeStyle: 'short'})} · ${i18n.date(d, {day: 'numeric', month: 'numeric', year: '2-digit'})}`, + }), + ) + } + return i18n.date(d, { dateStyle, timeStyle: 'short', diff --git a/src/screens/PostThread/components/ThreadItemAnchor.tsx b/src/screens/PostThread/components/ThreadItemAnchor.tsx index 829084808..7785afe2c 100644 --- a/src/screens/PostThread/components/ThreadItemAnchor.tsx +++ b/src/screens/PostThread/components/ThreadItemAnchor.tsx @@ -570,7 +570,7 @@ function ExpandedPostDetails({ - {niceDate(i18n, post.indexedAt, 'medium')} + {niceDate(i18n, post.indexedAt, 'dot separated')} {isRootPost && ( @@ -655,7 +655,7 @@ function BackdatedPostIndicator({post}: {post: AppBskyFeedDefs.PostView}) { a.leading_tight, t.atoms.text_contrast_medium, ]}> - Archived from {niceDate(i18n, createdAt)} + Archived from {niceDate(i18n, createdAt, 'medium')} )} -- 2.51.2 From 507531e1dbdc1d7b2bf5700f4a6f3406997a2bcf Mon Sep 17 00:00:00 2001 From: pfrazee <1270099+pfrazee@users.noreply.github.com> Date: Tue, 2 Dec 2025 02:41:53 +0000 Subject: [PATCH 7/8] Nightly source-language update --- src/locale/locales/en/messages.po | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/locale/locales/en/messages.po b/src/locale/locales/en/messages.po index da9887be6..d81a4371f 100644 --- a/src/locale/locales/en/messages.po +++ b/src/locale/locales/en/messages.po @@ -128,6 +128,11 @@ msgstr "" msgid "{0, plural, other {+# more}}" msgstr "" +#: src/lib/strings/time.ts:13 +msgctxt "date and time formatted like this: [time] · [date]" +msgid "{0} · {1}" +msgstr "" + #: src/components/moderation/ContentHider.tsx:89 msgid "{0} (Account)" msgstr "" -- 2.51.2 From 4d1b1bb2fd9831364da514182ac216237b64df61 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 2 Dec 2025 10:06:12 +0200 Subject: [PATCH 8/8] Catch crop cancelled errors (#9451) --- src/lib/strings/errors.ts | 12 ++++++++++++ src/screens/Onboarding/StepProfile/index.tsx | 18 +++++++++++++----- src/state/gallery.ts | 3 ++- src/view/com/util/UserAvatar.tsx | 7 ++++--- src/view/com/util/UserBanner.tsx | 6 ++++-- 5 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/lib/strings/errors.ts b/src/lib/strings/errors.ts index 35b8b39ac..22a6f061a 100644 --- a/src/lib/strings/errors.ts +++ b/src/lib/strings/errors.ts @@ -52,3 +52,15 @@ export function isErrorMaybeAppPasswordPermissions(e: unknown) { const str = String(e) return str.includes('Bad token scope') || str.includes('Bad token method') } + +/** + * Intended to capture "User cancelled" or "Crop cancelled" errors + * that we often get from expo modules such expo-image-crop-tool + * + * The exact name has changed in the past so let's just see if the string + * contains "cancel" + */ +export function isCancelledError(e: unknown) { + const str = String(e).toLowerCase() + return str.includes('cancel') +} diff --git a/src/screens/Onboarding/StepProfile/index.tsx b/src/screens/Onboarding/StepProfile/index.tsx index 6066e4297..453184639 100644 --- a/src/screens/Onboarding/StepProfile/index.tsx +++ b/src/screens/Onboarding/StepProfile/index.tsx @@ -15,6 +15,8 @@ import {openCropper} from '#/lib/media/picker' import {getDataUriSize} from '#/lib/media/util' import {useRequestNotificationsPermission} from '#/lib/notifications/notifications' import {logEvent, useGate} from '#/lib/statsig/statsig' +import {isCancelledError} from '#/lib/strings/errors' +import {logger} from '#/logger' import {isNative, isWeb} from '#/platform/detection' import { DescriptionText, @@ -184,11 +186,17 @@ export function StepProfile() { if (!image) return if (!isWeb) { - image = await openCropper({ - imageUri: image.path, - shape: 'circle', - aspectRatio: 1 / 1, - }) + try { + image = await openCropper({ + imageUri: image.path, + shape: 'circle', + aspectRatio: 1 / 1, + }) + } catch (e) { + if (!isCancelledError(e)) { + logger.error('Failed to crop avatar in onboarding', {error: e}) + } + } } image = await compressIfNeeded(image, 1000000) diff --git a/src/state/gallery.ts b/src/state/gallery.ts index 2370df27d..c8ddba702 100644 --- a/src/state/gallery.ts +++ b/src/state/gallery.ts @@ -17,6 +17,7 @@ import {getImageDim} from '#/lib/media/manip' import {openCropper} from '#/lib/media/picker' import {type PickerImage} from '#/lib/media/picker.shared' import {getDataUriSize} from '#/lib/media/util' +import {isCancelledError} from '#/lib/strings/errors' import {isNative} from '#/platform/detection' export type ImageTransformation = { @@ -143,7 +144,7 @@ export async function cropImage(img: ComposerImage): Promise { }, } } catch (e) { - if (e instanceof Error && e.message.includes('User cancelled')) { + if (!isCancelledError(e)) { return img } diff --git a/src/view/com/util/UserAvatar.tsx b/src/view/com/util/UserAvatar.tsx index aa5b22bd3..8a9e51a33 100644 --- a/src/view/com/util/UserAvatar.tsx +++ b/src/view/com/util/UserAvatar.tsx @@ -26,6 +26,7 @@ import {openCamera, openCropper, openPicker} from '#/lib/media/picker' import {type PickerImage} from '#/lib/media/picker.shared' import {makeProfileLink} from '#/lib/routes/links' import {sanitizeDisplayName} from '#/lib/strings/display-names' +import {isCancelledError} from '#/lib/strings/errors' import {sanitizeHandle} from '#/lib/strings/handles' import {logger} from '#/logger' import {isAndroid, isNative, isWeb} from '#/platform/detection' @@ -407,10 +408,10 @@ let EditableUserAvatar = ({ setRawImage(await createComposerImage(item)) editImageDialogControl.open() } - } catch (e: any) { + } catch (e) { // Don't log errors for cancelling selection to sentry on ios or android - if (!String(e).toLowerCase().includes('cancel')) { - logger.error('Failed to crop banner', {error: e}) + if (!isCancelledError(e)) { + logger.error('Failed to crop avatar', {error: e}) } } }, [ diff --git a/src/view/com/util/UserBanner.tsx b/src/view/com/util/UserBanner.tsx index 3600f5c24..65e7b5a4a 100644 --- a/src/view/com/util/UserBanner.tsx +++ b/src/view/com/util/UserBanner.tsx @@ -12,6 +12,7 @@ import { import {compressIfNeeded} from '#/lib/media/manip' import {openCamera, openCropper, openPicker} from '#/lib/media/picker' import {type PickerImage} from '#/lib/media/picker.shared' +import {isCancelledError} from '#/lib/strings/errors' import {logger} from '#/logger' import {isAndroid, isNative} from '#/platform/detection' import { @@ -87,8 +88,9 @@ export function UserBanner({ setRawImage(await createComposerImage(items[0])) editImageDialogControl.open() } - } catch (e: any) { - if (!String(e).includes('Canceled')) { + } catch (e) { + // Don't log errors for cancelling selection to sentry on ios or android + if (!isCancelledError(e)) { logger.error('Failed to crop banner', {error: e}) } } -- 2.51.2