Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[Experiment] Always show bottom bar (#4946)

authored by

dan and committed by
GitHub
40ab67fc a5af24b5

+26 -1
+18
src/lib/hooks/useMinimalShellTransform.ts
··· 2 2 3 3 import {useMinimalShellMode} from '#/state/shell/minimal-mode' 4 4 import {useShellLayout} from '#/state/shell/shell-layout' 5 + import {useGate} from '../statsig/statsig' 5 6 6 7 // Keep these separated so that we only pay for useAnimatedStyle that gets used. 7 8 ··· 27 28 export function useMinimalShellFooterTransform() { 28 29 const mode = useMinimalShellMode() 29 30 const {footerHeight} = useShellLayout() 31 + const gate = useGate() 32 + const isFixedBottomBar = gate('fixed_bottom_bar') 30 33 31 34 const footerTransform = useAnimatedStyle(() => { 35 + if (isFixedBottomBar) { 36 + return {} 37 + } 32 38 return { 33 39 pointerEvents: mode.value === 0 ? 'auto' : 'none', 34 40 opacity: Math.pow(1 - mode.value, 2), ··· 39 45 ], 40 46 } 41 47 }) 48 + 42 49 return footerTransform 43 50 } 44 51 45 52 export function useMinimalShellFabTransform() { 46 53 const mode = useMinimalShellMode() 54 + const gate = useGate() 55 + const isFixedBottomBar = gate('fixed_bottom_bar') 47 56 48 57 const fabTransform = useAnimatedStyle(() => { 58 + if (isFixedBottomBar) { 59 + return { 60 + transform: [ 61 + { 62 + translateY: -44, 63 + }, 64 + ], 65 + } 66 + } 49 67 return { 50 68 transform: [ 51 69 {
+1
src/lib/statsig/gates.ts
··· 1 1 export type Gate = 2 2 // Keep this alphabetic please. 3 3 | 'debug_show_feedcontext' 4 + | 'fixed_bottom_bar' 4 5 | 'new_user_guided_tour' 5 6 | 'onboarding_minimum_interests' 6 7 | 'show_follow_back_label_v2'
+7 -1
src/view/screens/Home.tsx
··· 7 7 import {useSetTitle} from '#/lib/hooks/useSetTitle' 8 8 import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' 9 9 import {logEvent, LogEvents} from '#/lib/statsig/statsig' 10 + import {useGate} from '#/lib/statsig/statsig' 10 11 import {emitSoftReset} from '#/state/events' 11 12 import {SavedFeedSourceInfo, usePinnedFeedsInfos} from '#/state/queries/feed' 12 13 import {FeedDescriptor, FeedParams} from '#/state/queries/post-feed' ··· 88 89 const selectedFeed = allFeeds[selectedIndex] 89 90 const requestNotificationsPermission = useRequestNotificationsPermission() 90 91 const triggerTourIfQueued = useTriggerTourIfQueued(TOURS.HOME) 92 + const gate = useGate() 91 93 92 94 useSetTitle(pinnedFeedInfos[selectedIndex]?.displayName) 93 95 useOTAUpdates() ··· 169 171 const {isMobile} = useWebMediaQueries() 170 172 useFocusEffect( 171 173 React.useCallback(() => { 174 + if (gate('fixed_bottom_bar')) { 175 + // Unnecessary because it's always there. 176 + return 177 + } 172 178 const listener = AppState.addEventListener('change', nextAppState => { 173 179 if (nextAppState === 'active') { 174 180 if (isMobile && mode.value === 1) { ··· 181 187 return () => { 182 188 listener.remove() 183 189 } 184 - }, [setMinimalShellMode, mode, isMobile]), 190 + }, [setMinimalShellMode, mode, isMobile, gate]), 185 191 ) 186 192 187 193 const onPageSelected = React.useCallback(