Rm pointer events

This commit is contained in:
Dan Abramov
2024-01-19 04:16:32 +00:00
parent 7975a04441
commit 296ab76535
4 changed files with 13 additions and 23 deletions
+2 -6
View File
@@ -242,12 +242,8 @@ let PagerTabBar = ({
], ],
})) }))
return ( return (
<Animated.View <Animated.View style={[styles.tabBarMobile, headerTransform]}>
pointerEvents="box-none" <View onLayout={onHeaderOnlyLayout}>{renderHeader?.()}</View>
style={[styles.tabBarMobile, headerTransform]}>
<View onLayout={onHeaderOnlyLayout} pointerEvents="box-none">
{renderHeader?.()}
</View>
<View <View
onLayout={onTabBarLayout} onLayout={onTabBarLayout}
style={{ style={{
+7 -9
View File
@@ -442,12 +442,10 @@ let ProfileHeaderLoaded = ({
const pluralizedFollowers = pluralize(profile.followersCount || 0, 'follower') const pluralizedFollowers = pluralize(profile.followersCount || 0, 'follower')
return ( return (
<View style={pal.view} pointerEvents="box-none"> <View style={pal.view}>
<View pointerEvents="none">
<UserBanner banner={profile.banner} moderation={moderation.avatar} /> <UserBanner banner={profile.banner} moderation={moderation.avatar} />
</View> <View style={styles.content}>
<View style={styles.content} pointerEvents="box-none"> <View style={[styles.buttonsLine]}>
<View style={[styles.buttonsLine]} pointerEvents="box-none">
{isMe ? ( {isMe ? (
<TouchableOpacity <TouchableOpacity
testID="profileHeaderEditProfileButton" testID="profileHeaderEditProfileButton"
@@ -567,7 +565,7 @@ let ProfileHeaderLoaded = ({
</NativeDropdown> </NativeDropdown>
) : undefined} ) : undefined}
</View> </View>
<View pointerEvents="none"> <View>
<Text <Text
testID="profileHeaderDisplayName" testID="profileHeaderDisplayName"
type="title-2xl" type="title-2xl"
@@ -578,7 +576,7 @@ let ProfileHeaderLoaded = ({
)} )}
</Text> </Text>
</View> </View>
<View style={styles.handleLine} pointerEvents="none"> <View style={styles.handleLine}>
{profile.viewer?.followedBy && !blockHide ? ( {profile.viewer?.followedBy && !blockHide ? (
<View style={[styles.pill, pal.btn, s.mr5]}> <View style={[styles.pill, pal.btn, s.mr5]}>
<Text type="xs" style={[pal.text]}> <Text type="xs" style={[pal.text]}>
@@ -599,7 +597,7 @@ let ProfileHeaderLoaded = ({
</View> </View>
{!blockHide && ( {!blockHide && (
<> <>
<View style={styles.metricsLine} pointerEvents="box-none"> <View style={styles.metricsLine}>
<Link <Link
testID="profileHeaderFollowersButton" testID="profileHeaderFollowersButton"
style={[s.flexRow, s.mr10]} style={[s.flexRow, s.mr10]}
@@ -648,7 +646,7 @@ let ProfileHeaderLoaded = ({
</Text> </Text>
</View> </View>
{descriptionRT && !moderation.profile.blur ? ( {descriptionRT && !moderation.profile.blur ? (
<View pointerEvents={isNative ? 'auto' : 'none'}> <View>
<RichText <RichText
testID="profileHeaderDescription" testID="profileHeaderDescription"
style={[styles.description, pal.text]} style={[styles.description, pal.text]}
@@ -39,18 +39,14 @@ export function ProfileHeaderSuggestedFollows({
did: actorDid, did: actorDid,
}) })
return ( return (
<View style={{paddingVertical: OUTER_PADDING, height: TOTAL_HEIGHT}}>
<View <View
style={{paddingVertical: OUTER_PADDING, height: TOTAL_HEIGHT}}
pointerEvents="box-none">
<View
pointerEvents="box-none"
style={{ style={{
backgroundColor: pal.viewLight.backgroundColor, backgroundColor: pal.viewLight.backgroundColor,
height: '100%', height: '100%',
paddingTop: INNER_PADDING / 2, paddingTop: INNER_PADDING / 2,
}}> }}>
<View <View
pointerEvents="box-none"
style={{ style={{
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'space-between', justifyContent: 'space-between',
+2 -2
View File
@@ -77,7 +77,7 @@ export function RichText({
type={type} type={type}
text={segment.text} text={segment.text}
href={`/profile/${mention.did}`} href={`/profile/${mention.did}`}
style={[style, lineHeightStyle, pal.link, {pointerEvents: 'auto'}]} style={[style, lineHeightStyle, pal.link]}
dataSet={WORD_WRAP} dataSet={WORD_WRAP}
/>, />,
) )
@@ -88,7 +88,7 @@ export function RichText({
type={type} type={type}
text={toShortUrl(segment.text)} text={toShortUrl(segment.text)}
href={link.uri} href={link.uri}
style={[style, lineHeightStyle, pal.link, {pointerEvents: 'auto'}]} style={[style, lineHeightStyle, pal.link]}
dataSet={WORD_WRAP} dataSet={WORD_WRAP}
warnOnMismatchingLabel warnOnMismatchingLabel
/>, />,