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

Issue 2982453002: New AppListView Scroll Behavior. (Closed)

Created:
3 years, 5 months ago by newcomer
Modified:
3 years, 5 months ago
Reviewers:
vadimt, oshima, khmel
CC:
chromium-reviews, sadrul, Matt Giuca, tfarina, shuchen+watch_chromium.org, nona+watch_chromium.org, kalyank, James Su, yusukes+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

New AppListView Scroll Behavior. The old AppListView did not respond to scroll events from PEEKING mode. Now the AppListView transitions from PEEKING to FULLSCREEN_ALL_APPS when a scroll event (mousewheel or touchpad gesture) is received via AppListView::HandleScroll. I had to make a fix to ensure that events are properly propogating, and I had to explicitly pass MouseWheel events from the SearchBoxView widget. New Tests: MouseWheel Scroll events from the SearchBoxView from PEEKING. MouseWheel scroll events from the AppListView shield from PEEKING. Ditto, from other states. BUG=739408 Review-Url: https://codereview.chromium.org/2982453002 Cr-Commit-Position: refs/heads/master@{#487222} Committed: https://chromium.googlesource.com/chromium/src/+/b8a3badb43f071f13b420aeacccf818cbf5e9bef

Patch Set 1 #

Total comments: 10

Patch Set 2 : Addressed comments #

Total comments: 2

Patch Set 3 : Addressed comments. #

Total comments: 8

Patch Set 4 : Addressed comments. #

Total comments: 16

Patch Set 5 : New AppListView Scroll Behavior. #

Patch Set 6 : New AppListView Scroll Behavior. #

Patch Set 7 : rebased. #

Patch Set 8 : Removed unintended edit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -70 lines) Patch
M ash/app_list/app_list_presenter_delegate_unittest.cc View 1 2 3 4 5 1 chunk +37 lines, -0 lines 0 comments Download
M ui/app_list/pagination_controller.cc View 2 chunks +4 lines, -7 lines 0 comments Download
M ui/app_list/views/app_list_page.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/app_list/views/app_list_page.cc View 1 2 3 2 chunks +13 lines, -15 lines 0 comments Download
M ui/app_list/views/app_list_view.h View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M ui/app_list/views/app_list_view.cc View 1 2 3 4 5 8 chunks +57 lines, -4 lines 0 comments Download
M ui/app_list/views/search_box_view.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M ui/app_list/views/search_box_view.cc View 1 2 3 4 5 4 chunks +23 lines, -12 lines 0 comments Download
M ui/app_list/views/start_page_view.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/textfield/textfield.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 15 chunks +42 lines, -30 lines 0 comments Download
M ui/views/controls/textfield/textfield_controller.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 36 (21 generated)
newcomer
Vadim, please take a look. -Alex
3 years, 5 months ago (2017-07-11 17:42:34 UTC) #3
vadimt
https://codereview.chromium.org/2982453002/diff/1/ui/app_list/views/app_list_page.h File ui/app_list/views/app_list_page.h (right): https://codereview.chromium.org/2982453002/diff/1/ui/app_list/views/app_list_page.h#newcode71 ui/app_list/views/app_list_page.h:71: ContentsView* contents_view_; Please replace making protected with an accessor, ...
3 years, 5 months ago (2017-07-11 23:32:57 UTC) #4
newcomer
Responded to comments! https://codereview.chromium.org/2982453002/diff/1/ui/app_list/views/app_list_page.h File ui/app_list/views/app_list_page.h (right): https://codereview.chromium.org/2982453002/diff/1/ui/app_list/views/app_list_page.h#newcode71 ui/app_list/views/app_list_page.h:71: ContentsView* contents_view_; On 2017/07/11 23:32:56, vadimt ...
3 years, 5 months ago (2017-07-12 16:56:00 UTC) #5
vadimt
lgtm https://codereview.chromium.org/2982453002/diff/20001/ui/app_list/views/app_list_page.h File ui/app_list/views/app_list_page.h (right): https://codereview.chromium.org/2982453002/diff/20001/ui/app_list/views/app_list_page.h#newcode71 ui/app_list/views/app_list_page.h:71: ContentsView* contents_view() const { return contents_view_; } My ...
3 years, 5 months ago (2017-07-12 18:28:02 UTC) #6
newcomer
Oshima, Please take a look. -Alex https://codereview.chromium.org/2982453002/diff/20001/ui/app_list/views/app_list_page.h File ui/app_list/views/app_list_page.h (right): https://codereview.chromium.org/2982453002/diff/20001/ui/app_list/views/app_list_page.h#newcode71 ui/app_list/views/app_list_page.h:71: ContentsView* contents_view() const ...
3 years, 5 months ago (2017-07-13 23:37:17 UTC) #8
newcomer
Adding Khmel@ Please take a look. -Alex
3 years, 5 months ago (2017-07-13 23:37:52 UTC) #10
oshima
https://codereview.chromium.org/2982453002/diff/40001/ash/app_list/app_list_presenter_delegate_unittest.cc File ash/app_list/app_list_presenter_delegate_unittest.cc (right): https://codereview.chromium.org/2982453002/diff/40001/ash/app_list/app_list_presenter_delegate_unittest.cc#newcode598 ash/app_list/app_list_presenter_delegate_unittest.cc:598: // swipe down, the app list should return to ...
3 years, 5 months ago (2017-07-14 02:06:47 UTC) #11
newcomer
Responded to Oshima@'s comments! -Alex https://codereview.chromium.org/2982453002/diff/40001/ash/app_list/app_list_presenter_delegate_unittest.cc File ash/app_list/app_list_presenter_delegate_unittest.cc (right): https://codereview.chromium.org/2982453002/diff/40001/ash/app_list/app_list_presenter_delegate_unittest.cc#newcode598 ash/app_list/app_list_presenter_delegate_unittest.cc:598: // swipe down, the ...
3 years, 5 months ago (2017-07-14 17:49:33 UTC) #12
oshima
lgtm
3 years, 5 months ago (2017-07-14 17:58:14 UTC) #13
khmel
lgtm after nits are adressed. https://codereview.chromium.org/2982453002/diff/60001/ash/app_list/app_list_presenter_delegate_unittest.cc File ash/app_list/app_list_presenter_delegate_unittest.cc (right): https://codereview.chromium.org/2982453002/diff/60001/ash/app_list/app_list_presenter_delegate_unittest.cc#newcode574 ash/app_list/app_list_presenter_delegate_unittest.cc:574: if (!GetParam()) nit: can ...
3 years, 5 months ago (2017-07-14 18:10:01 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2982453002/140001
3 years, 5 months ago (2017-07-17 18:07:35 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/491452)
3 years, 5 months ago (2017-07-17 18:16:41 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2982453002/180001
3 years, 5 months ago (2017-07-17 18:45:20 UTC) #32
commit-bot: I haz the power
Committed patchset #8 (id:180001) as https://chromium.googlesource.com/chromium/src/+/b8a3badb43f071f13b420aeacccf818cbf5e9bef
3 years, 5 months ago (2017-07-17 20:22:58 UTC) #35
newcomer
3 years, 5 months ago (2017-07-17 21:38:11 UTC) #36
Message was sent while issue was closed.
https://codereview.chromium.org/2982453002/diff/60001/ash/app_list/app_list_p...
File ash/app_list/app_list_presenter_delegate_unittest.cc (right):

https://codereview.chromium.org/2982453002/diff/60001/ash/app_list/app_list_p...
ash/app_list/app_list_presenter_delegate_unittest.cc:574: if (!GetParam())
On 2017/07/14 18:10:00, khmel wrote:
> nit: can you use test_with_fullscreen_ instead?
> 
> If not please do something:
> const bool full_screen = !GetParam() and reuse it at L 578

Fixed by putting this test into FullscreenAppListPresenterDelegateTest

https://codereview.chromium.org/2982453002/diff/60001/ash/app_list/app_list_p...
ash/app_list/app_list_presenter_delegate_unittest.cc:578: bool test_mouse_event
= GetParam();
On 2017/07/14 18:10:00, khmel wrote:
> nit: const bool ... or discard it in regards to prev comment

Done.

https://codereview.chromium.org/2982453002/diff/60001/ash/app_list/app_list_p...
ash/app_list/app_list_presenter_delegate_unittest.cc:600:
generator.GestureScrollSequence(start, gfx::Point(0, 720),
On 2017/07/14 18:10:00, khmel wrote:
> nit: please inline (gfx::Point(0, 0), gfx::Point(0, 720))

Done.

https://codereview.chromium.org/2982453002/diff/60001/ash/app_list/app_list_p...
ash/app_list/app_list_presenter_delegate_unittest.cc:605: gfx::Point
outside_search_box = view->GetBoundsInScreen().origin();
On 2017/07/14 18:10:01, khmel wrote:
> nit: const gfx::...

Refactored test after rebase to use GetPointOutside/InsideSearchBox()

https://codereview.chromium.org/2982453002/diff/60001/ui/app_list/pagination_...
File ui/app_list/pagination_controller.cc (right):

https://codereview.chromium.org/2982453002/diff/60001/ui/app_list/pagination_...
ui/app_list/pagination_controller.cc:44: if (abs(offset_magnitude) >
kMinScrollToSwitchPage &&
On 2017/07/14 18:10:01, khmel wrote:
> nit: I would not do just only style fix and prefer to leave file un-touch to
> simplify the review. Have no strong pref here. You may also leave it.


I actually am fixing a bug here (returning true inside the if statement, else
returning false). This conditional was preventing scroll events from propogating
to AppListView.

https://codereview.chromium.org/2982453002/diff/60001/ui/app_list/views/app_l...
File ui/app_list/views/app_list_view.cc (right):

https://codereview.chromium.org/2982453002/diff/60001/ui/app_list/views/app_l...
ui/app_list/views/app_list_view.cc:682: int offset =
event->AsScrollEvent()->y_offset();
On 2017/07/14 18:10:01, khmel wrote:
>  nit const int or even better inline

Done.

https://codereview.chromium.org/2982453002/diff/60001/ui/app_list/views/app_l...
ui/app_list/views/app_list_view.cc:735: if (HandleScroll(event)) {
On 2017/07/14 18:10:01, khmel wrote:
> nit: 
> we prefer following style:
> if (!HandleScroll(event))
>   return;
> ....

Done.

https://codereview.chromium.org/2982453002/diff/60001/ui/app_list/views/searc...
File ui/app_list/views/search_box_view.cc (right):

https://codereview.chromium.org/2982453002/diff/60001/ui/app_list/views/searc...
ui/app_list/views/search_box_view.cc:364: if
(app_list_view_->HandleScroll(event))
On 2017/07/14 18:10:01, khmel wrote:
> nit:
>   if (!app_list_view_->HandleScroll(event))
>      return;

Done.

Powered by Google App Engine
This is Rietveld 408576698