From 9e59a2eef2f82511a9a9a056dbdb0c62fe2f61c6 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 28 Feb 2025 14:50:44 -0800 Subject: [PATCH] Fix starter pack layout (#7869) --- .../StarterPack/StarterPackLandingScreen.tsx | 19 +- src/screens/StarterPack/StarterPackScreen.tsx | 209 +++++++++--------- src/screens/StarterPack/Wizard/index.tsx | 5 +- 3 files changed, 108 insertions(+), 125 deletions(-) diff --git a/src/screens/StarterPack/StarterPackLandingScreen.tsx b/src/screens/StarterPack/StarterPackLandingScreen.tsx index 2d9a919698..a48fbc61c0 100644 --- a/src/screens/StarterPack/StarterPackLandingScreen.tsx +++ b/src/screens/StarterPack/StarterPackLandingScreen.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {Pressable, ScrollView, View} from 'react-native' +import {Pressable, View} from 'react-native' import Animated, {FadeIn, FadeOut} from 'react-native-reanimated' import { AppBskyGraphDefs, @@ -25,13 +25,13 @@ import { } from '#/state/shell/starter-pack' import {LoggedOutScreenState} from '#/view/com/auth/LoggedOut' import {formatCount} from '#/view/com/util/numeric/format' -import {CenteredView} from '#/view/com/util/Views' import {Logo} from '#/view/icons/Logo' import {atoms as a, useTheme} from '#/alf' import {Button, ButtonText} from '#/components/Button' import {useDialogControl} from '#/components/Dialog' import * as FeedCard from '#/components/FeedCard' import {useRichText} from '#/components/hooks/useRichText' +import * as Layout from '#/components/Layout' import {LinearGradientBackground} from '#/components/LinearGradientBackground' import {ListMaybePlaceholder} from '#/components/Lists' import {Default as ProfileCard} from '#/components/ProfileCard' @@ -165,10 +165,8 @@ function LandingScreenLoaded({ } return ( - - + + - + )} - + ) } @@ -376,11 +374,8 @@ export function AppClipOverlay({ accessibilityRole="button" style={[ a.absolute, + a.inset_0, { - top: 0, - left: 0, - right: 0, - bottom: 0, backgroundColor: 'rgba(0, 0, 0, 0.95)', zIndex: 1, }, diff --git a/src/screens/StarterPack/StarterPackScreen.tsx b/src/screens/StarterPack/StarterPackScreen.tsx index ac61c153b3..cf153db448 100644 --- a/src/screens/StarterPack/StarterPackScreen.tsx +++ b/src/screens/StarterPack/StarterPackScreen.tsx @@ -24,7 +24,6 @@ import {logEvent} from '#/lib/statsig/statsig' import {cleanError} from '#/lib/strings/errors' import {getStarterPackOgCard} from '#/lib/strings/starter-pack' import {logger} from '#/logger' -import {isWeb} from '#/platform/detection' import {updateProfileShadow} from '#/state/cache/profile-shadow' import {useModerationOpts} from '#/state/preferences/moderation-opts' import {getAllListMembers} from '#/state/queries/list-members' @@ -43,7 +42,6 @@ import {useSetActiveStarterPack} from '#/state/shell/starter-pack' import {PagerWithHeader} from '#/view/com/pager/PagerWithHeader' import {ProfileSubpageHeader} from '#/view/com/profile/ProfileSubpageHeader' import * as Toast from '#/view/com/util/Toast' -import {CenteredView} from '#/view/com/util/Views' import {bulkWriteFollows} from '#/screens/Onboarding/util' import {atoms as a, useBreakpoints, useTheme} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' @@ -222,55 +220,53 @@ function StarterPackScreenLoaded({ }, [onOpenShareDialog, routeParams.new, shareDialogControl]) return ( - - - ( -
- )}> - {showPeopleTab - ? ({headerHeight, scrollElRef}) => ( - - ) - : null} - {showFeedsTab - ? ({headerHeight, scrollElRef}) => ( - - ) - : null} - {showPostsTab - ? ({headerHeight, scrollElRef}) => ( - - ) - : null} - - + <> + ( +
+ )}> + {showPeopleTab + ? ({headerHeight, scrollElRef}) => ( + + ) + : null} + {showFeedsTab + ? ({headerHeight, scrollElRef}) => ( + + ) + : null} + {showPostsTab + ? ({headerHeight, scrollElRef}) => ( + + ) + : null} + - + ) } @@ -707,64 +703,57 @@ function InvalidStarterPack({rkey}: {rkey: string}) { }) return ( - - - - Starter pack is invalid - - - - The starter pack that you are trying to view is invalid. You may - delete this starter pack instead. - - + + + + + Starter pack is invalid + + + + The starter pack that you are trying to view is invalid. You may + delete this starter pack instead. + + + + + + + - - - - - + ) } diff --git a/src/screens/StarterPack/Wizard/index.tsx b/src/screens/StarterPack/Wizard/index.tsx index 92cad2f659..deb191f1a3 100644 --- a/src/screens/StarterPack/Wizard/index.tsx +++ b/src/screens/StarterPack/Wizard/index.tsx @@ -41,7 +41,6 @@ import {useSession} from '#/state/session' import {useSetMinimalShellMode} from '#/state/shell' import * as Toast from '#/view/com/util/Toast' import {UserAvatar} from '#/view/com/util/UserAvatar' -import {CenteredView} from '#/view/com/util/Views' import {useWizardState, WizardStep} from '#/screens/StarterPack/Wizard/State' import {StepDetails} from '#/screens/StarterPack/Wizard/StepDetails' import {StepFeeds} from '#/screens/StarterPack/Wizard/StepFeeds' @@ -281,7 +280,7 @@ function WizardInner({ } return ( - + )} - + ) }