Skip to content

Commit ba72110

Browse files
Fix overlapping touch targets for profile header buttons (bluesky-social#10868)
1 parent 302026d commit ba72110

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/screens/Profile/Header/ProfileHeaderStandard.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ export function HeaderStandardButtons({
360360
size="small"
361361
color="secondary"
362362
shape="round"
363+
// expand the 33pt button toward a 44pt touch target, capped
364+
// horizontally at half the 4pt row gap so the target cannot
365+
// overlap the neighboring buttons' own targets
366+
hitSlop={{top: 6, bottom: 6, left: 2, right: 2}}
363367
onPress={() => {
364368
playHaptic('Light')
365369
ax.metric('invite:dialog:open', {logContext: 'ProfileHeader'})

src/view/com/profile/ProfileMenu.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {Trans, useLingui} from '@lingui/react/macro'
44
import {useNavigation} from '@react-navigation/native'
55
import {useQueryClient} from '@tanstack/react-query'
66

7-
import {HITSLOP_20} from '#/lib/constants'
87
import {makeProfileLink} from '#/lib/routes/links'
98
import {type NavigationProp} from '#/lib/routes/types'
109
import {shareText, shareUrl} from '#/lib/sharing'
@@ -264,7 +263,10 @@ let ProfileMenu = ({
264263
{...props}
265264
testID="profileHeaderDropdownBtn"
266265
label={l`More options`}
267-
hitSlop={HITSLOP_20}
266+
// hitSlop reaches outside parent views on iOS, so the
267+
// left inset must stay within half of the 4pt row gap or
268+
// it steals taps from the adjacent header button
269+
hitSlop={{top: 6, bottom: 6, left: 2, right: 12}}
268270
variant="solid"
269271
color="secondary"
270272
size="small"

0 commit comments

Comments
 (0)