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

Android styling and products bug fixes #78

Merged
merged 10 commits into from
Apr 8, 2020

Conversation

wangannie
Copy link
Member

@wangannie wangannie commented Apr 8, 2020

What's new in this PR

  • Fixed styling inconsistencies on Android which resolves Styling bugs and inconsistencies on Android #66 including:
    • Fixed font inconsistencies(some buttons and text fields would switch to Roboto)
    • Fixed drop shadows (wouldn't show on Android)
  • Fixed various Android-specific bugs like how the rewards button on the map screen was getting covered by the bottom sheet.
  • Fixed Android-specific bugs with unresponsive touch gestures on the bottom sheet which resolves Can't navigate to Products List or Product Details on Android #77 so that:
    • Buttons linking to Products List and Product Details should work now
    • Horizontal scroll in products should work

FYI: Some gesture-related components must be imported from react-native-gesture-handler instead of react-native for them to work on Android. This fixed FlatList scrolling issues, but in some cases like for TouchableOpacity, react-native-gesture-handler worked for Android but wouldn't work for iOS.

Relevant Links

Online sources

Styling:
Basically, I realized you can't use a custom font-weight or Android will get confused and resort to the system default. Also, regular shadows don't work on Android and you have to use elevation values.
react-navigation/react-navigation#2822

Touch gesture bugs:
osdnk/react-native-reanimated-bottom-sheet#16
osdnk/react-native-reanimated-bottom-sheet#19
osdnk/react-native-reanimated-bottom-sheet#20

Related PRs

How to review

To test without running the repo locally: https://exp.host/@wangannie/healthycorners

  • Test on Android and see if it matches iOS/Figma.
  • Look out for spots where it pulls the system default font.
  • See if the map is jittery on a real Android device. I suspect it's just an issue with the simulator right now, and I couldn't find any particular issues with our MapView setup.

Next steps

  • Figure out drop shadow for the bottom sheet. We achieved this using an offset box-shadow on the bottom sheet content container, but since Android seems limited to elevation and doesn't allow for offsets, I couldn't figure out a workaround.

Tests Performed, Edge Cases

Screenshots

@wangannie wangannie requested a review from JustinMi April 8, 2020 05:55
@wangannie wangannie self-assigned this Apr 8, 2020
@wangannie wangannie changed the title Android styling and bug fixes Android styling and products bug fixes Apr 8, 2020
@@ -252,7 +252,7 @@ export default class MapScreen extends React.Component {
enabledInnerScrolling={false}
enabledBottomClamp
overdragResistanceFactor={1}
enabledGestureInteraction
enabledContentTapInteraction={false}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I don't understand why this has to be false for the buttons to be clickable. It seems super counterintuitive but it finally worked.

@wangannie wangannie requested a review from aceschen April 8, 2020 16:27
Copy link
Contributor

@aceschen aceschen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Android:

  • Font inconsistencies are fixed (all Poppins)
  • Rewards banner visible
  • Map is still sometimes jittery when viewing a lot of location markers, snaps back to true north if rotated
  • Product list and detail buttons work, bottom line of list gets cut off
  • Horizontal scroll in products works
  • Search bar text in subhead, should be body
  • Drop shadows for hamburger menu and search bar work on map screen, bottom drawer does not

@wangannie wangannie merged commit c6937e2 into master Apr 8, 2020
@wangannie wangannie deleted the AnnieW/android_styling_fixes branch April 8, 2020 19:54
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.

Can't navigate to Products List or Product Details on Android Styling bugs and inconsistencies on Android
2 participants