Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

remove use of `pointerEvents` on iOS profile header (#3694)

authored by

Hailey and committed by
GitHub
5b82b150 c3fcd486

+31 -18
+5 -2
src/screens/Profile/Header/ProfileHeaderLabeler.tsx
··· 21 21 import {useRequireAuth, useSession} from '#/state/session' 22 22 import {useAnalytics} from 'lib/analytics/analytics' 23 23 import {useHaptics} from 'lib/haptics' 24 + import {isIOS} from 'platform/detection' 24 25 import {useProfileShadow} from 'state/cache/profile-shadow' 25 26 import {ProfileMenu} from '#/view/com/profile/ProfileMenu' 26 27 import * as Toast from '#/view/com/util/Toast' ··· 164 165 moderation={moderation} 165 166 hideBackButton={hideBackButton} 166 167 isPlaceholderProfile={isPlaceholderProfile}> 167 - <View style={[a.px_lg, a.pt_md, a.pb_sm]} pointerEvents="box-none"> 168 + <View 169 + style={[a.px_lg, a.pt_md, a.pb_sm]} 170 + pointerEvents={isIOS ? 'auto' : 'box-none'}> 168 171 <View 169 172 style={[a.flex_row, a.justify_end, a.gap_sm, a.pb_lg]} 170 - pointerEvents="box-none"> 173 + pointerEvents={isIOS ? 'auto' : 'box-none'}> 171 174 {isMe ? ( 172 175 <Button 173 176 testID="profileHeaderEditProfileButton"
+5 -3
src/screens/Profile/Header/ProfileHeaderStandard.tsx
··· 12 12 13 13 import {useGate} from '#/lib/statsig/statsig' 14 14 import {logger} from '#/logger' 15 - import {isWeb} from '#/platform/detection' 15 + import {isIOS, isWeb} from '#/platform/detection' 16 16 import {Shadow} from '#/state/cache/types' 17 17 import {useModalControls} from '#/state/modals' 18 18 import { ··· 152 152 moderation={moderation} 153 153 hideBackButton={hideBackButton} 154 154 isPlaceholderProfile={isPlaceholderProfile}> 155 - <View style={[a.px_lg, a.pt_md, a.pb_sm]} pointerEvents="box-none"> 155 + <View 156 + style={[a.px_lg, a.pt_md, a.pb_sm]} 157 + pointerEvents={isIOS ? 'auto' : 'box-none'}> 156 158 <View 157 159 style={[a.flex_row, a.justify_end, a.gap_sm, a.pb_sm]} 158 - pointerEvents="box-none"> 160 + pointerEvents={isIOS ? 'auto' : 'box-none'}> 159 161 {isMe ? ( 160 162 <Button 161 163 testID="profileHeaderEditProfileButton"
+6 -3
src/screens/Profile/Header/Shell.tsx
··· 12 12 import {BACK_HITSLOP} from 'lib/constants' 13 13 import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' 14 14 import {NavigationProp} from 'lib/routes/types' 15 + import {isIOS} from 'platform/detection' 15 16 import {LoadingPlaceholder} from 'view/com/util/LoadingPlaceholder' 16 17 import {UserAvatar} from 'view/com/util/UserAvatar' 17 18 import {UserBanner} from 'view/com/util/UserBanner' ··· 61 62 ) 62 63 63 64 return ( 64 - <View style={t.atoms.bg} pointerEvents="box-none"> 65 - <View pointerEvents="none"> 65 + <View style={t.atoms.bg} pointerEvents={isIOS ? 'auto' : 'box-none'}> 66 + <View pointerEvents={isIOS ? 'auto' : 'none'}> 66 67 {isPlaceholderProfile ? ( 67 68 <LoadingPlaceholder 68 69 width="100%" ··· 80 81 81 82 {children} 82 83 83 - <View style={[a.px_lg, a.pb_sm]} pointerEvents="box-none"> 84 + <View 85 + style={[a.px_lg, a.pb_sm]} 86 + pointerEvents={isIOS ? 'auto' : 'box-none'}> 84 87 <ProfileHeaderAlerts moderation={moderation} /> 85 88 {isMe && ( 86 89 <LabelsOnMe details={{did: profile.did}} labels={profile.labels} />
+15 -10
src/view/com/pager/PagerWithHeader.tsx
··· 1 1 import * as React from 'react' 2 2 import { 3 3 LayoutChangeEvent, 4 + NativeScrollEvent, 4 5 ScrollView, 5 6 StyleSheet, 6 7 View, 7 - NativeScrollEvent, 8 8 } from 'react-native' 9 9 import Animated, { 10 - useAnimatedStyle, 11 - useSharedValue, 10 + AnimatedRef, 12 11 runOnJS, 13 12 runOnUI, 14 13 scrollTo, 15 - useAnimatedRef, 16 - AnimatedRef, 17 14 SharedValue, 15 + useAnimatedRef, 16 + useAnimatedStyle, 17 + useSharedValue, 18 18 } from 'react-native-reanimated' 19 + 20 + import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' 21 + import {ScrollProvider} from '#/lib/ScrollContext' 22 + import {isIOS} from 'platform/detection' 19 23 import {Pager, PagerRef, RenderTabBarFnProps} from 'view/com/pager/Pager' 20 - import {TabBar} from './TabBar' 21 - import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' 22 24 import {ListMethods} from '../util/List' 23 - import {ScrollProvider} from '#/lib/ScrollContext' 25 + import {TabBar} from './TabBar' 24 26 25 27 export interface PagerWithHeaderChildParams { 26 28 headerHeight: number ··· 236 238 const headerRef = React.useRef(null) 237 239 return ( 238 240 <Animated.View 239 - pointerEvents="box-none" 241 + pointerEvents={isIOS ? 'auto' : 'box-none'} 240 242 style={[styles.tabBarMobile, headerTransform]}> 241 - <View ref={headerRef} pointerEvents="box-none" collapsable={false}> 243 + <View 244 + ref={headerRef} 245 + pointerEvents={isIOS ? 'auto' : 'box-none'} 246 + collapsable={false}> 242 247 {renderHeader?.()} 243 248 { 244 249 // It wouldn't be enough to place `onLayout` on the parent node because