From 7e0a789aae972552bdc7645318f96bc27853cbc7 Mon Sep 17 00:00:00 2001 From: James Acklin Date: Tue, 14 Jan 2025 19:25:10 -0500 Subject: [PATCH 1/2] WelcomeSheet: refactor to use Dialog for larger screens and Modal for smaller screens --- packages/ui/src/components/WelcomeSheet.tsx | 224 ++++++++++++-------- 1 file changed, 132 insertions(+), 92 deletions(-) diff --git a/packages/ui/src/components/WelcomeSheet.tsx b/packages/ui/src/components/WelcomeSheet.tsx index 08bc67c7e3..15c6ba3235 100644 --- a/packages/ui/src/components/WelcomeSheet.tsx +++ b/packages/ui/src/components/WelcomeSheet.tsx @@ -1,10 +1,11 @@ import React, { useCallback } from 'react'; -import { Image } from 'react-native'; +import { Image, Modal } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { Text, View, XStack, YStack, isWeb } from 'tamagui'; - +import { Dialog, View, XStack, YStack, isWeb, VisuallyHidden } from 'tamagui'; +import { Text } from './TextV2'; import { Icon } from './Icon'; import { Sheet } from './Sheet'; +import useIsWindowNarrow from '../hooks/useIsWindowNarrow'; function WelcomeSheetComponent({ open, @@ -18,99 +19,138 @@ function WelcomeSheetComponent({ }, [onOpenChange]); const inset = useSafeAreaInsets(); + const isWindowNarrow = useIsWindowNarrow(); + + const content = ( + + + + + + Welcome to TM + + A messenger you can finally trust. + + + + + + + + + + Control every bit + + Whatever you do, say, and make on Tlon is yours to keep + + + + + + + + + + + From now until forever + + With Tlon you can always take your data with you and continue + using it elsewhere + + + + + + + + + + + Connect with calm + + Tlon is designed to maximize genuine connection, not addictive + engagement + + + + + ); + + if (!isWindowNarrow) { + return ( + + + + Welcome to TM + + + + {content} + + + + ); + } return ( - - - - - - - - - - - Welcome to TM - - A messenger you can finally trust. - - - - - - - - - - Control every bit - - Whatever you do, say, and make on Tlon is yours to keep - - - - - - - - - - - From now until forever - - With Tlon you can always take your data with you and continue - using it elsewhere - - - - - - - - - - - Connect with calm - - Tlon is designed to maximize genuine connection, not addictive - engagement - - - - - - - + + + + + {content} + + + + ); } From a66637ff02d2214fdbd3f0d362a9b72d7c484ca8 Mon Sep 17 00:00:00 2001 From: James Acklin Date: Tue, 14 Jan 2025 19:59:08 -0500 Subject: [PATCH 2/2] MessageInput: better horizontal alignment on web-new --- packages/ui/src/components/MessageInput/AttachmentButton.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/ui/src/components/MessageInput/AttachmentButton.tsx b/packages/ui/src/components/MessageInput/AttachmentButton.tsx index 56a555b862..1c8f6c32b9 100644 --- a/packages/ui/src/components/MessageInput/AttachmentButton.tsx +++ b/packages/ui/src/components/MessageInput/AttachmentButton.tsx @@ -25,6 +25,8 @@ export default function AttachmentButton({