Revamp edit image alt text dialog (#5461)

* revamp alt dialog

* readd the limit check

don't trim with enforceLen, it ruins copy-pasting long text and it's overall annoying behavior

* Update src/view/com/composer/photos/ImageAltTextDialog.tsx

Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>

---------

Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
This commit is contained in:
Mary
2024-09-24 23:21:06 +07:00
committed by GitHub
parent 8ea89469ef
commit ed512d6dc5
6 changed files with 136 additions and 211 deletions
-8
View File
@@ -3,7 +3,6 @@ import {Image as RNImage} from 'react-native-image-crop-picker'
import {AppBskyActorDefs, AppBskyGraphDefs} from '@atproto/api'
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
import {ComposerImage} from '../gallery'
export interface EditProfileModal {
name: 'edit-profile'
@@ -43,12 +42,6 @@ export interface CropImageModal {
onSelect: (img?: RNImage) => void
}
export interface AltTextImageModal {
name: 'alt-text-image'
image: ComposerImage
onChange: (next: ComposerImage) => void
}
export interface DeleteAccountModal {
name: 'delete-account'
}
@@ -131,7 +124,6 @@ export type Modal =
| ListAddRemoveUsersModal
// Posts
| AltTextImageModal
| CropImageModal
| SelfLabelModal