From e87065f04227b0f9859b034c3c71679f52e63689 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 19 Dec 2023 12:32:17 -0600 Subject: [PATCH 1/7] Try to fix scroll indicator on Feeds page (#2245) * Try to fix scroll indicator on Feeds page * Apply to List --- src/view/com/util/List.tsx | 1 + src/view/screens/Feeds.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/view/com/util/List.tsx b/src/view/com/util/List.tsx index 5947fe87a1..2acc3f4b30 100644 --- a/src/view/com/util/List.tsx +++ b/src/view/com/util/List.tsx @@ -52,6 +52,7 @@ function ListImpl( return ( {hasSession && ( From 946b2c916308193822a9fb2ea89c8b0f2b54448d Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 20 Dec 2023 17:45:30 +0000 Subject: [PATCH 2/7] add `yarn intl:compile` to postinstall hook (#2250) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bed17e9dc2..b80456b792 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "prepare": "is-ci || husky install", - "postinstall": "patch-package", + "postinstall": "patch-package && yarn intl:compile", "prebuild": "expo prebuild --clean", "android": "expo run:android", "ios": "expo run:ios", From 4a93a5b6adefdf8d27cfbf54833ba50eb8fb2ef9 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 20 Dec 2023 17:50:50 +0000 Subject: [PATCH 3/7] Invalid handle autocomplete (#2251) * refactor invalid handle check from a previous PR to use util function * add invalid handle check to `prefixMatch` --- src/state/queries/actor-autocomplete.ts | 3 ++- src/view/screens/Profile.tsx | 3 ++- src/view/shell/desktop/LeftNav.tsx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/state/queries/actor-autocomplete.ts b/src/state/queries/actor-autocomplete.ts index fe207371d0..709a15b407 100644 --- a/src/state/queries/actor-autocomplete.ts +++ b/src/state/queries/actor-autocomplete.ts @@ -11,6 +11,7 @@ import { getModerationOpts, useModerationOpts, } from './preferences' +import {isInvalidHandle} from '#/lib/strings/handles' const DEFAULT_MOD_OPTS = getModerationOpts({ userDid: '', @@ -119,7 +120,7 @@ function prefixMatch( prefix: string, info: AppBskyActorDefs.ProfileViewBasic, ): boolean { - if (info.handle.includes(prefix)) { + if (!isInvalidHandle(info.handle) && info.handle.includes(prefix)) { return true } if (info.displayName?.toLocaleLowerCase().includes(prefix)) { diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index f1c648a672..4558ae33d5 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -39,6 +39,7 @@ import {truncateAndInvalidate} from '#/state/queries/util' import {Text} from '#/view/com/util/text/Text' import {usePalette} from 'lib/hooks/usePalette' import {isNative} from '#/platform/detection' +import {isInvalidHandle} from '#/lib/strings/handles' interface SectionRef { scrollToTop: () => void @@ -231,7 +232,7 @@ function ProfileScreenLoaded({ track('ProfileScreen:PressCompose') const mention = profile.handle === currentAccount?.handle || - profile.handle === 'handle.invalid' + isInvalidHandle(profile.handle) ? undefined : profile.handle openComposer({mention}) diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx index df6cb64999..f3c8c1d110 100644 --- a/src/view/shell/desktop/LeftNav.tsx +++ b/src/view/shell/desktop/LeftNav.tsx @@ -46,6 +46,7 @@ import {useComposerControls} from '#/state/shell/composer' import {useFetchHandle} from '#/state/queries/handle' import {emitSoftReset} from '#/state/events' import {NavSignupCard} from '#/view/shell/NavSignupCard' +import {isInvalidHandle} from '#/lib/strings/handles' function ProfileCard() { const {currentAccount} = useSession() @@ -221,7 +222,7 @@ function ComposeBtn() { if ( !handle || handle === currentAccount?.handle || - handle === 'handle.invalid' + isInvalidHandle(handle) ) return undefined From 2a94e6a2effe62bc786891f9f76fbb4d39ba3e74 Mon Sep 17 00:00:00 2001 From: Elie Michel Date: Wed, 20 Dec 2023 19:33:00 +0100 Subject: [PATCH 4/7] Restore autofocus on emoji drop down (#1821) --- src/view/com/composer/text-input/web/EmojiPicker.web.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/com/composer/text-input/web/EmojiPicker.web.tsx b/src/view/com/composer/text-input/web/EmojiPicker.web.tsx index 09a2dcf41b..e27a0793d0 100644 --- a/src/view/com/composer/text-input/web/EmojiPicker.web.tsx +++ b/src/view/com/composer/text-input/web/EmojiPicker.web.tsx @@ -76,7 +76,7 @@ export function EmojiPicker({close}: {close: () => void}) { return (await import('./EmojiPickerData.json')).default }} onEmojiSelect={onInsert} - autoFocus={false} + autoFocus={true} /> From 238ff58db9355c630c9284bc488e8adf044af430 Mon Sep 17 00:00:00 2001 From: Kev Date: Wed, 20 Dec 2023 21:59:43 +0100 Subject: [PATCH 5/7] Fix image is cropped in alt text modal (#1963) --- src/view/com/modals/AltImage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/view/com/modals/AltImage.tsx b/src/view/com/modals/AltImage.tsx index 80130f43ad..a2e9183179 100644 --- a/src/view/com/modals/AltImage.tsx +++ b/src/view/com/modals/AltImage.tsx @@ -80,6 +80,7 @@ export function Component({image}: Props) { source={{ uri: image.cropped?.path ?? image.path, }} + contentFit="contain" accessible={true} accessibilityIgnoresInvertColors /> From 39a5a1e3111adf469f5e23ee9a0462416f1c27ec Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 20 Dec 2023 13:44:52 -0800 Subject: [PATCH 6/7] Fix the is13 check in account creation (close #2258) (#2259) --- src/view/com/auth/create/state.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/com/auth/create/state.ts b/src/view/com/auth/create/state.ts index 4df82f8fcb..a77d2a44fe 100644 --- a/src/view/com/auth/create/state.ts +++ b/src/view/com/auth/create/state.ts @@ -144,7 +144,7 @@ export async function submit({ } export function is13(state: CreateAccountState) { - return getAge(state.birthDate) >= 18 + return getAge(state.birthDate) >= 13 } export function is18(state: CreateAccountState) { From d068cb19392965f9b96e113ca2ba0fceb8326db5 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 20 Dec 2023 16:55:29 -0800 Subject: [PATCH 7/7] Web composer improvements (#2257) * Keep the emoji picker in the tablet width (close #1880) * Support pressing tab to select a mention (close #1831) --- src/view/com/composer/Composer.tsx | 2 +- src/view/com/composer/text-input/web/Autocomplete.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index c4453e0c3e..64427b837e 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -452,7 +452,7 @@ export const ComposePost = observer(function ComposePost({ ) : null} - {isDesktop ? : null} + {!isMobile ? : null} diff --git a/src/view/com/composer/text-input/web/Autocomplete.tsx b/src/view/com/composer/text-input/web/Autocomplete.tsx index 1f74125617..51197b8e4d 100644 --- a/src/view/com/composer/text-input/web/Autocomplete.tsx +++ b/src/view/com/composer/text-input/web/Autocomplete.tsx @@ -134,7 +134,7 @@ const MentionList = forwardRef( return true } - if (event.key === 'Enter') { + if (event.key === 'Enter' || event.key === 'Tab') { enterHandler() return true }