Skip to content

Commit

Permalink
Increase hit slop for web's app language picker (#3535)
Browse files Browse the repository at this point in the history
* fix: make app language picker tap region larger

* fix: add right padding on drawer signup card

noticeable on portuguese language

* fix: mimic hitSlop
  • Loading branch information
mary-ext authored Apr 13, 2024
1 parent a8c1e71 commit 196dd3a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/components/AppLanguageDropdown.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ export function AppLanguageDropdown() {
)

return (
<View style={[a.flex_row, a.gap_sm, a.align_center, a.flex_shrink]}>
<View
style={[
// We don't have hitSlop here to increase the tap region,
// alternative is negative margins.
{height: 32, marginVertical: -((32 - 14) / 2)},
a.flex_row,
a.gap_sm,
a.align_center,
a.flex_shrink,
]}>
<Text aria-hidden={true} style={t.atoms.text_contrast_medium}>
{APP_LANGUAGES.find(l => l.code2 === sanitizedLang)?.name}
</Text>
Expand Down
4 changes: 3 additions & 1 deletion src/view/shell/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ let DrawerContent = ({}: {}): React.ReactNode => {
/>
</View>
) : (
<NavSignupCard />
<View style={{paddingRight: 20}}>
<NavSignupCard />
</View>
)}

{hasSession ? (
Expand Down

0 comments on commit 196dd3a

Please sign in to comment.