GoodDollar / GoodDAPP

GoodDollar.org Wallet is the simplest access point to Claim your daily G$. It Is based on web3 and React native web.
good-dapp.vercel.app
MIT License
106 stars 55 forks source link

[BUG, Android] UI bugs on Android #4093

Closed vldkhh closed 11 months ago

vldkhh commented 1 year ago

[BUG, Android] UI bugs on Android

Private Zenhub Video

Private Zenhub Video

L03TJ3 commented 11 months ago
  1. I don't think the 'during scroll jump to top' is something that can work without some weird hacky implementation
L03TJ3 commented 11 months ago

@johnsmith-gooddollar @sirpy point two, about the bugging scrolling (around the cross-over point where it minizimes the header). any idea how to solve this? Maybe this seems related: https://github.com/facebook/react-native/issues/32696 About the onMomentum being fired multiple times.

I tried adding debounce like this in dashboard handleScrollEnd:

  const handleScrollEnd = useCallback(
    debounce(({ nativeEvent }) => {
      const scrollPosition = nativeEvent.contentOffset.y
      const { minScrollRequiredISH, scrollPositionGap, isFeedSizeEnough } = scrollData
      const scrollPositionISH = scrollPosition + scrollPositionGap
      setHeaderLarge(!isFeedSizeEnough || scrollPositionISH < minScrollRequiredISH)
    }, 200),
    [scrollData, setHeaderLarge],

But then it loses the nativeEvent context (undefined)

L03TJ3 commented 11 months ago

never mind, found the useDebounce hook a couple of lines above... testing now

vldkhh commented 11 months ago

verified on prod