Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Issue 1097373002: [Effen] Prevent scrolling past the bottom of a scrollable list. (Closed)

Created:
5 years, 8 months ago by Hixie
Modified:
5 years, 6 months ago
CC:
abarth-chromium, mojo-reviews_chromium.org, ojan, qsr+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

[Effen] Prevent scrolling past the bottom of a scrollable list. - make the ScrollBehavior instance long-lived, rather than recreating it each time we update the list contents. - have OverscrollBehavior track the total height of the contents and the height of the scrollable region, so that it can determine when to stop scrolling down. - teach OverscrollBehavior about how to determine when to stop scrolling down, and how to bounce when it's too far down. - replace the 'energy' concept in Particles with a method that sets the energy and direction at the same time, instead of assuming that the direction is always positive when setting energy. - make FixedHeightScrollable lists track the number of items in the list and have them update their ScrollBehavior regarding this information as it changes. - track how many items are currently showing in the list stock list. R=eseidel@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/f0da1d12a46c94aa9d72ce63b0eba5c08a47ef05

Patch Set 1 #

Patch Set 2 : Move the creation of the OverscrollBehavior class to FixedHeightScrollable, since we already assumeā€¦ #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -24 lines) Patch
M sky/examples/stocks/lib/stock_list.dart View 1 1 chunk +7 lines, -4 lines 1 comment Download
M sky/framework/animation/mechanics.dart View 2 chunks +8 lines, -5 lines 2 comments Download
M sky/framework/animation/scroll_behavior.dart View 2 chunks +42 lines, -8 lines 0 comments Download
M sky/framework/components/fixed_height_scrollable.dart View 1 2 chunks +17 lines, -4 lines 0 comments Download
M sky/framework/components/scrollable.dart View 1 chunk +11 lines, -3 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
eseidel
lgtm https://codereview.chromium.org/1097373002/diff/20001/sky/framework/animation/mechanics.dart File sky/framework/animation/mechanics.dart (right): https://codereview.chromium.org/1097373002/diff/20001/sky/framework/animation/mechanics.dart#newcode28 sky/framework/animation/mechanics.dart:28: void setVelocityFromEnergy({double energy, double direction}) { Why the ...
5 years, 8 months ago (2015-04-21 19:52:33 UTC) #2
Hixie
https://codereview.chromium.org/1097373002/diff/20001/sky/framework/animation/mechanics.dart File sky/framework/animation/mechanics.dart (right): https://codereview.chromium.org/1097373002/diff/20001/sky/framework/animation/mechanics.dart#newcode28 sky/framework/animation/mechanics.dart:28: void setVelocityFromEnergy({double energy, double direction}) { On 2015/04/21 19:52:33, ...
5 years, 8 months ago (2015-04-21 20:18:52 UTC) #3
Hixie
Committed patchset #2 (id:20001) manually as f0da1d12a46c94aa9d72ce63b0eba5c08a47ef05 (presubmit successful).
5 years, 8 months ago (2015-04-21 20:20:34 UTC) #4
abarth-chromium
https://codereview.chromium.org/1097373002/diff/20001/sky/examples/stocks/lib/stock_list.dart File sky/examples/stocks/lib/stock_list.dart (right): https://codereview.chromium.org/1097373002/diff/20001/sky/examples/stocks/lib/stock_list.dart#newcode26 sky/examples/stocks/lib/stock_list.dart:26: itemCount = filteredStocks.length; Won't this |length| query force the ...
5 years, 6 months ago (2015-06-04 16:23:17 UTC) #6
Hixie
5 years, 6 months ago (2015-06-04 16:35:00 UTC) #7
Message was sent while issue was closed.
On 2015/06/04 at 16:23:17, abarth wrote:
>
https://codereview.chromium.org/1097373002/diff/20001/sky/examples/stocks/lib...
> File sky/examples/stocks/lib/stock_list.dart (right):
> 
>
https://codereview.chromium.org/1097373002/diff/20001/sky/examples/stocks/lib...
> sky/examples/stocks/lib/stock_list.dart:26: itemCount = filteredStocks.length;
> Won't this |length| query force the filter to be eagerly evaluated on the
entire list?  What if the list of stocks is very, very long?  Previously, this
code only needed to touch enough of the list to get the information visible in
the viewport.

Yes. I don't really see a way around that, though.

Powered by Google App Engine
This is Rietveld 408576698