-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$1000] Scrolling speed is 2 to 3 times faster compared to other apps #15759
Comments
Triggered auto assignment to @sakluger ( |
Bug0 Triage Checklist (Main S/O)
|
Asking in Slack why this is an issue, since we fixed it previously here #10654. |
We're not sure why this issue resurfaced, but I agree that scrolling feels too fast. Moving along to external. |
Job added to Upwork: https://www.upwork.com/jobs/~01919eac50b0e2020d |
Current assignee @sakluger is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
Triggered auto assignment to @tgolen ( |
📣 @0xmiroslav You have been assigned to this job by @mountiny! |
I thinks this one might be good for Callstack too |
Hi, Ana from Callstack here, I would like to pick up this issue |
Working on it! |
Yep, exporting harder issues to expert contributors sorry for just jumping inc its just faster |
Still working on it, currently drafting the proposal |
I will take this one from Tim since he is ooo. @BeeMargarida excited for your proposal |
ProposalPlease re-state the problem that we are trying to solve in this issue.The scroll speed of the chats (and other listings) in Web/Desktop is faster than in other similar apps (for example Slack). What is the root cause of that problem?After checking the app code, there is no specific change made to the scroll logic recently that would cause this, so I checked the react-native-web fork. The logic differs from the mainstream in the method Trying it out in the examples app of react-native-web (here) using the Lists example with inverted enabled, the scroll also feels fast (faster than with the inverted disabled). So this seems to be something specific to the inverted wheel logic in react-native-web. What changes do you think we should make in order to solve the problem?The first though would be to use the
The proposed and quick solution would be to use a constant value to apply to the delta of the wheel event in the Expensify's react-native-web fork. An example of the code would be the one below. This would be an hardcoded value of const WHEEL_SENSITIVITY = 0.5;
...
this.invertedWheelEventHandler = {
...
var leftoverDelta = delta * WHEEL_SENSITIVITY;
...
} There is a similar logic in VSCode It would also be beneficial to open the conversation on react-native-web side to see what if there's a better solution. What alternative solutions did you explore? (Optional)Instead of modifying the react-native-web code, the other solution explored consisted in adding the wheel handler in the specific page ( componentDidMount() {
this.fadeIn();
if (ReportScrollManager.flatListRef.current) {
ReportScrollManager.flatListRef.current._listRef._scrollRef.addEventListener('wheel', this.handleWheel);
}
}
componentWillUnmount() {
ReportScrollManager.flatListRef.current._listRef._scrollRef.removeEventListener('wheel', this.handleWheel);
}
handleWheel(event) {
event.preventDefault();
event.stopImmediatePropagation();
const newScrollPosition = window.pageYOffset + (event.deltaY * SCROLL_SPEED);
window.scrollTo({top: newScrollPosition, behavior: 'smooth'});
} However, there are several problems with this approach:
|
@BeeMargarida Love the write up! Can we implement the fix in our fork please and try the 0.5 sensitivity same as VSCode? Could you also create an issue in react-native-web so some discussion can be open, it does not seem ideal that the speed is not same for those. Only thing I am concerned about is that this behaviour seemed to work well for a bit at least I think, but it could be a rumour too :D |
Yap, on it!
Hope not 🤞, but I'm still not sure what cause the change in the behaviour 🤔 |
Its hard to find if we dont know the exact time, it could be anytime in last 2 months. But given this is repro in the example app, I think its fine to proceed with the speed modifier |
Created the issue on react-native-web and the PR in the Expensify fork: |
@mountiny What are the next steps? Is it necessary to wait for a release of the react-native-web fork? |
Yes, I will release the fork and then you can create an App PR with the new version @BeeMargarida |
@sakluger @BeeMargarida @mountiny @0xmiroslav this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
I am a bit sick so working not full days, going to try to release the new version today |
@BeeMargarida so I have published a new release, but there is also this PR which was on hold and @kidroca will most likely update the version there so we might just want to test after that #15663 |
Got it, thank you 👍 |
The other PR was merged in main with the updated react-natve-web version so this should be good to go I believe, we should test to make sure. |
Screen.Recording.2023-03-24.at.18.29.29.mov🎉 Seems to be working great! I think we can close this one out now since there is no C+ payment to be done and it was reported internally. Thank you @BeeMargarida |
Did we ever submit an upstream PR for this? |
We made an issue in RNW necolas/react-native-web#2500 seems like Necolas directed us towards RN. @BeeMargarida do you think you could try to work on this in RN directly? |
Yap, I've subscribed to the open issue. I can take a look at the incomplete tasks in there, see if I can pick and help at any of them |
Thank you, feel free to reprot back on this issue if that works for you |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
Speed of scroll should be similar to other apps
Actual Result:
One trackpad of scrolling in Slack seems to scroll about 2/3 of a screen -- which feels "right". But one trackpad of scrolling in NewDot scrolls like 3 screens, which feels like way too much.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.80-1
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Recording.123.mp4
Expensify/Expensify Issue URL:
Issue reported by: @quinthar
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1678260000907879
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: