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

fix: Add a proper binding to handle infinite scroll (WEBAPP-5949) #5922

Merged
merged 7 commits into from
Mar 1, 2019

Conversation

atomrc
Copy link
Contributor

@atomrc atomrc commented Feb 26, 2019

No description provided.

@atomrc atomrc force-pushed the fix/search_scrolling_behavior branch from 59b23dd to a844825 Compare February 26, 2019 16:05
@codecov-io
Copy link

codecov-io commented Feb 26, 2019

Codecov Report

Merging #5922 into dev will increase coverage by 0.27%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##              dev    #5922      +/-   ##
==========================================
+ Coverage   48.71%   48.98%   +0.27%     
==========================================
  Files         327      327              
  Lines       14314    15172     +858     
==========================================
+ Hits         6973     7432     +459     
- Misses       7341     7740     +399

@atomrc atomrc force-pushed the fix/search_scrolling_behavior branch from a844825 to d60cc83 Compare February 27, 2019 08:57
@atomrc atomrc marked this pull request as ready for review February 27, 2019 10:54
src/script/view_model/bindings/MessageListBindings.js Outdated Show resolved Hide resolved
/**
* To avoid reacting to programmatically triggered scroll, we just want to enable the scroll listener when there is a mouse event before it.
* The strategy here is to enable the scroll listener when there is a mouse event and automatically disable the listener after 500ms of inactivity of the mouse.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be problematic to only react to the mousewheel event. There are other user interactions that will cause scrolling, selecting chunks of text and dragging the scrollbar for example.

src/script/view_model/bindings/MessageListBindings.js Outdated Show resolved Hide resolved
@atomrc atomrc force-pushed the fix/search_scrolling_behavior branch from 07be565 to c848b6e Compare March 1, 2019 10:59
@atomrc atomrc merged commit 1074de9 into dev Mar 1, 2019
@atomrc atomrc deleted the fix/search_scrolling_behavior branch March 1, 2019 12:40
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.

4 participants