App icon indicating copy to clipboard operation
App copied to clipboard

[$500] Scrolling on Android/Android Mobile Web doesn't have decelerating behavior like on iOS

Open jasperhuangg opened this issue 1 year ago • 27 comments

Action Performed:

  1. Navigate to any report or the LHN.
  2. Scroll up or down.

Expected Result:

Scrolling should decelerate when you lift your thumb off the screen.

Actual Result:

Scrolling stops immediately when you lift your thumb off the screen.

Workaround:

N/A

Platform:

Where is this issue occurring?

  • Android
  • Mobile Web

Version Number: v1.2.4-2 Reproducible in staging?: Yes Reproducible in production?: Yes Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation Expensify/Expensify Issue URL: Issue reported by: @quinthar Slack conversation:

View all open jobs on GitHub

jasperhuangg avatar Sep 23 '22 16:09 jasperhuangg

Triggered auto assignment to @laurenreidexpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

melvin-bot[bot] avatar Sep 23 '22 16:09 melvin-bot[bot]

⚠️ Looks like this issue was linked to a possible regression on PRODUCTION here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a production regression has occurred a Root Cause Analysis is required. Please follow the instructions here.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

melvin-bot[bot] avatar Sep 23 '22 17:09 melvin-bot[bot]

@jasperhuangg co-assigning to you to check link to the regression as above, thanks

laurenreidexpensify avatar Sep 25 '22 18:09 laurenreidexpensify

@jasperhuangg bump ^^

laurenreidexpensify avatar Sep 28 '22 07:09 laurenreidexpensify

Triggered auto assignment to @alex-mechler (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

melvin-bot[bot] avatar Oct 03 '22 12:10 melvin-bot[bot]

Asked in Slack here @mountiny suggested next step is to add Eng label to move forward to External

laurenreidexpensify avatar Oct 03 '22 12:10 laurenreidexpensify

Looks good to go to external, might be nice to get a video comparing ios to android though

alex-mechler avatar Oct 03 '22 20:10 alex-mechler

Current assignee @laurenreidexpensify is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Oct 03 '22 20:10 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (External)

melvin-bot[bot] avatar Oct 03 '22 20:10 melvin-bot[bot]

Triggered auto assignment to @Julesssss (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] avatar Oct 03 '22 20:10 melvin-bot[bot]

Due to Limited Availability unassigning this one. Can you reapply the external label to get another C+ assigned thanks! @laurenreidexpensify or @Julesssss

Santhosh-Sellavel avatar Oct 03 '22 20:10 Santhosh-Sellavel

Current assignee @laurenreidexpensify is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Oct 04 '22 09:10 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External)

melvin-bot[bot] avatar Oct 04 '22 09:10 melvin-bot[bot]

Current assignee @Julesssss is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Oct 04 '22 09:10 melvin-bot[bot]

https://www.upwork.com/jobs/~01c693f5f951f62330

laurenreidexpensify avatar Oct 04 '22 09:10 laurenreidexpensify

Awaiting proposals. There's probably a prop of some sort that needs to be flipped, as this is the default behavior for Android scroll views

Julesssss avatar Oct 04 '22 09:10 Julesssss

Proposal

There is a property called decelerationRate which sets the decleration rate of scroll on ios or android. Reading the Documentation we can see that we can set 'normal' | 'fast' | number My recommendation is that we go with normal, so that way we don't mess with already existing decleration on IOS but just add a decleration on Android

We should add decelerationRate property on FlatList in LHNOptionsList.js

On line 89 <FlatList decelerationRate="normal" https://github.com/Expensify/App/blob/1a42cf8a48bcb51b7b469f342a3f122de7aaef34/src/components/LHNOptionsList/LHNOptionsList.js#L88

Also in ReportActionsList.js Line 176 <InvertedFlatList decelerationRate="normal" https://github.com/Expensify/App/blob/1a42cf8a48bcb51b7b469f342a3f122de7aaef34/src/pages/home/report/ReportActionsList.js#L175

Uros787 avatar Oct 04 '22 23:10 Uros787

@Uros787 thank you for the proposal.

I understand that we're trying to set the decelerationRate to normal, but the docs suggest that the rate is normal by default. docs - scrollview#decelerationrate

rushatgabhane avatar Oct 05 '22 06:10 rushatgabhane

I went to sleep on this proposal I left yesterday, I guess I should've seen that it's normal by default.

Let me propose something like this. Let's utilize Platform from react native, and write code like this: decelerationRate={Platform.OS === 'android' ? 0.998 : 'normal'}

Why 0.998? That is a default deceleration on iOS, that way we can mimic the deceleration on both platforms

Uros787 avatar Oct 05 '22 06:10 Uros787

Hahaha that happens.

I don't think we should change the deceleration rate from the default value on Android. Scrolling experience should be consistent between different apps on a given platform.

Thought: Is this issue occuring because scrolling in general is now faster? see slack 🧵

cc: @Julesssss

rushatgabhane avatar Oct 05 '22 06:10 rushatgabhane

@rushatgabhane is there a way for contributors to access slack?

Uros787 avatar Oct 05 '22 07:10 Uros787

@Uros787 yes, you need to request an invite to the #expensify-open-source channel by emailing [email protected] with the subject Slack Channel Invite and include a link to your Upwork profile.

(source)

rushatgabhane avatar Oct 05 '22 07:10 rushatgabhane

I don't think we should change the deceleration rate from the default value on Android.

Yeah, I agree 100%. Android's RecyclerView (native version of FlatList) will decelerate by default. Something is preventing this and I'd like to see a solution that addresses this instead of applying a workaround.

Julesssss avatar Oct 05 '22 10:10 Julesssss

Still awaiting a proposal

Julesssss avatar Oct 14 '22 15:10 Julesssss

@laurenreidexpensify could you please double the bounty. Thanks

Julesssss avatar Oct 14 '22 15:10 Julesssss

Sorry @Julesssss was OOO and this got lost in the mix. Will double now.

laurenreidexpensify avatar Oct 21 '22 16:10 laurenreidexpensify

Thanks, we're still awaiting proposals

Julesssss avatar Oct 31 '22 10:10 Julesssss

price doubled

laurenreidexpensify avatar Nov 01 '22 12:11 laurenreidexpensify

I can't recreate the issue - scrolling does not stop as soon as I lift my finger it continues and decelerates

I tested on physical Android device running Android 8

(I've also tried a simulator using Android 12, and couldn't recreate as well)

kidroca avatar Nov 01 '22 15:11 kidroca

Agreed this seems to have been fixed I can reproduce either.

On Tue, Nov 1, 2022, 8:30 AM Peter Velkov @.***> wrote:

I can't recreate the issue - scrolling does not stop as soon as I lift my finger it continues and decelerates

I tested on physical Android device running Android 8

— Reply to this email directly, view it on GitHub https://github.com/Expensify/App/issues/11241#issuecomment-1298707737, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEMNUUFDXKXEKI4L7OU7WLWGEZPTANCNFSM6AAAAAAQUEXH44 . You are receiving this because you were mentioned.Message ID: @.***>

quinthar avatar Nov 05 '22 00:11 quinthar