From d97e75c62f39b874af97b40ebc7211841d9ce1b7 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Thu, 4 May 2023 00:54:35 -0500 Subject: [APP-539] Rework lightbox and alt-image behaviors (#573) * Replace the long press on the lightbox with footer controls * Remove long-press from images in the feed * Tune the lightbox footer control ui * Replace the AltImageRead modal with the ability to view all alt text in the lightbox footer * Tune lightbox footer for iOS * Add alt text to the web lightbox * Fix lint * a11y slight changes --------- Co-authored-by: renahlee --- src/view/com/modals/AltImageRead.tsx | 80 ------------------------------------ 1 file changed, 80 deletions(-) delete mode 100644 src/view/com/modals/AltImageRead.tsx (limited to 'src/view/com/modals/AltImageRead.tsx') diff --git a/src/view/com/modals/AltImageRead.tsx b/src/view/com/modals/AltImageRead.tsx deleted file mode 100644 index 985477287..000000000 --- a/src/view/com/modals/AltImageRead.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import React, {useCallback} from 'react' -import {StyleSheet, View} from 'react-native' -import {usePalette} from 'lib/hooks/usePalette' -import {gradients, s} from 'lib/styles' -import {Text} from '../util/text/Text' -import {TouchableOpacity} from 'react-native-gesture-handler' -import LinearGradient from 'react-native-linear-gradient' -import {useStores} from 'state/index' -import {isDesktopWeb} from 'platform/detection' - -export const snapPoints = ['70%'] - -interface Props { - altText: string -} - -export function Component({altText}: Props) { - const pal = usePalette('default') - const store = useStores() - - const onPress = useCallback(() => { - store.shell.closeModal() - }, [store]) - - return ( - - Image description - - {altText} - - - - - Done - - - - - ) -} - -const styles = StyleSheet.create({ - container: { - gap: 18, - paddingVertical: isDesktopWeb ? 0 : 18, - paddingHorizontal: isDesktopWeb ? 0 : 12, - height: '100%', - width: '100%', - }, - title: { - textAlign: 'center', - fontWeight: 'bold', - fontSize: 24, - }, - text: { - borderRadius: 5, - marginVertical: 18, - paddingHorizontal: 18, - paddingVertical: 16, - }, - button: { - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'center', - width: '100%', - borderRadius: 32, - padding: 10, - }, -}) -- cgit 1.4.1