Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Universal back button component #4903

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Universal back button component #4903

wants to merge 4 commits into from

Conversation

mozzius
Copy link
Member

@mozzius mozzius commented Aug 8, 2024

Kinda random but I hate our back chevron. The tap target is too small and it generally looks a bit off. There is also a lot of duplicated code re-creating this back button.

This replaces most instances with a new <BackButton> component. On native, it uses platform-native back buttons from @react-nativgation/elements, tweaked to match the size and colour of our existing button.

Current:
Screenshot 2024-08-09 at 00 40 22
Screenshot 2024-08-09 at 01 50 39
Screenshot 2024-08-09 at 01 51 10

New (iOS)
Screenshot 2024-08-09 at 00 07 26
Screenshot 2024-08-09 at 01 50 55

New (Android)
Screenshot 2024-08-09 at 00 07 45
Screenshot 2024-08-09 at 01 51 20

Test plan

  1. Double check I got the logic right - we still want the existing pressable if it's for the hamburger menu
  2. Check it looks good across the app - Look for instances of ViewHeader, SimpleViewHeader, the DMs header, the user list header etc
  3. Make sure there's no regressions on web

Copy link

render bot commented Aug 8, 2024

Copy link

github-actions bot commented Aug 8, 2024

Old size New size Diff
7.09 MB 7.11 MB 14.87 KB (0.20%)

@mozzius mozzius changed the title Platform-native back buttons Universal back button component Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant