[Experiment] Always show bottom bar (#4946)
This commit is contained in:
parent
a5af24b53b
commit
40ab67fc4b
3 changed files with 26 additions and 1 deletions
|
@ -2,6 +2,7 @@ import {interpolate, useAnimatedStyle} from 'react-native-reanimated'
|
|||
|
||||
import {useMinimalShellMode} from '#/state/shell/minimal-mode'
|
||||
import {useShellLayout} from '#/state/shell/shell-layout'
|
||||
import {useGate} from '../statsig/statsig'
|
||||
|
||||
// Keep these separated so that we only pay for useAnimatedStyle that gets used.
|
||||
|
||||
|
@ -27,8 +28,13 @@ export function useMinimalShellHeaderTransform() {
|
|||
export function useMinimalShellFooterTransform() {
|
||||
const mode = useMinimalShellMode()
|
||||
const {footerHeight} = useShellLayout()
|
||||
const gate = useGate()
|
||||
const isFixedBottomBar = gate('fixed_bottom_bar')
|
||||
|
||||
const footerTransform = useAnimatedStyle(() => {
|
||||
if (isFixedBottomBar) {
|
||||
return {}
|
||||
}
|
||||
return {
|
||||
pointerEvents: mode.value === 0 ? 'auto' : 'none',
|
||||
opacity: Math.pow(1 - mode.value, 2),
|
||||
|
@ -39,13 +45,25 @@ export function useMinimalShellFooterTransform() {
|
|||
],
|
||||
}
|
||||
})
|
||||
|
||||
return footerTransform
|
||||
}
|
||||
|
||||
export function useMinimalShellFabTransform() {
|
||||
const mode = useMinimalShellMode()
|
||||
const gate = useGate()
|
||||
const isFixedBottomBar = gate('fixed_bottom_bar')
|
||||
|
||||
const fabTransform = useAnimatedStyle(() => {
|
||||
if (isFixedBottomBar) {
|
||||
return {
|
||||
transform: [
|
||||
{
|
||||
translateY: -44,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
return {
|
||||
transform: [
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
export type Gate =
|
||||
// Keep this alphabetic please.
|
||||
| 'debug_show_feedcontext'
|
||||
| 'fixed_bottom_bar'
|
||||
| 'new_user_guided_tour'
|
||||
| 'onboarding_minimum_interests'
|
||||
| 'show_follow_back_label_v2'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue