New issue
Advanced search Search tips

Issue 851555 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocked on:
issue 853846

Blocking:
issue 841020



Sign in to add a comment

KSV: App list takes a moment to hide when launching Keyboard Shortcut Viewer app

Project Member Reported by msw@chromium.org, Jun 11 2018

Issue description

KSV: App list takes a moment to hide when launching Keyboard Shortcut Viewer app
(1) launch chromeos with --keyboard-shortcut-viewer-app
(2) open the applist
(3) search for "key"
(4) click on the top icon that shows a keyboard with the name "Shortcuts"
Expected: The app list disappears quickly and shows the KSV window
Actual: The app list stays for 1s+ while waiting for the KSV window

Maybe related to slow app startup:  Issue 847613 
 

Comment 1 by msw@chromium.org, Jun 11 2018

Cc: xiy...@chromium.org
Components: UI>Shell>Launcher
Labels: -Pri-3 OS-Chrome Pri-2
Owner: wutao@chromium.org
Status: Assigned (was: Untriaged)
Perhaps we should just make the app list hide when users click an item/icon?

It looks like ARC++ and Crostini manually dismiss the app list when launching/activating:
  https://cs.chromium.org/chromium/src/chrome/browser/ui/app_list/arc/arc_app_item.cc?rcl=ee909721233bd592bb427432055cf7953c68afbc&l=61
  https://cs.chromium.org/chromium/src/chrome/browser/ui/app_list/search/arc_app_result.cc?rcl=ee909721233bd592bb427432055cf7953c68afbc&l=61
  https://cs.chromium.org/chromium/src/chrome/browser/ui/app_list/crostini/crostini_app_item.cc?rcl=ee909721233bd592bb427432055cf7953c68afbc&l=58

Perhaps internal app items/results should do the same thing?
https://cs.chromium.org/chromium/src/chrome/browser/ui/app_list/internal_app/internal_app_item.cc?rcl=99c3527b610cb819fc27ce303eb9e08cff3bdd1a&l=35
https://cs.chromium.org/chromium/src/chrome/browser/ui/app_list/search/internal_app_result.cc?rcl=99c3527b610cb819fc27ce303eb9e08cff3bdd1a&l=34

Or maybe some common app list controller element should do it regardless of the app item/result type?
  https://cs.chromium.org/chromium/src/chrome/browser/ui/app_list/app_list_controller_impl.cc?rcl=ee909721233bd592bb427432055cf7953c68afbc&l=110
  https://cs.chromium.org/chromium/src/chrome/browser/ui/app_list/app_list_controller_impl.cc?rcl=ee909721233bd592bb427432055cf7953c68afbc&l=124
(and then we can remove the per-app-type dismissal code)

Comment 2 by xiy...@chromium.org, Jun 11 2018

For apps in the grid, ChromeAppListItem::Activate is the common code path when an app is clicked. For search results, app_list::AppResult::Open is the one.

Comment 3 by wutao@chromium.org, Jun 11 2018

Added dismiss to the common code paths sgtm. Will work on it.

Comment 4 by wutao@chromium.org, Jun 18 2018

Blockedon: 853846

Comment 5 by wutao@chromium.org, Jun 18 2018

Status: Started (was: Assigned)
xiyuan@, I am not sure what is the best way to handle the dismiss for AppResult. ChromeAppListItem is relatively easier.

For ChromeAppListItem, the common place to call ChromeAppListItem::Activate is at ChromeAppListModelUpdater::ActivateChromeItem. Before line 155 [1], we can do:
  AppListControllerDelegate* delegate = item->GetController()******;
  if (!delegate->IsHomeLauncherEnabledInTabletMode())
    delegate->DismissView();

******We need to make ChromeAppListItem::GetController public.

[1] https://cs.chromium.org/chromium/src/chrome/browser/ui/app_list/chrome_app_list_model_updater.cc?l=155&rcl=627fd97ad671f7157584a311c6ad3f2cf49c4afe



It is a little complicated for AppResult::Open, the common path is at SearchController::OpenResult(ChromeSearchResult* result, int event_flags).
The problem is that ChromeSearchResult does not have AppListControllerDelegate. Only AppResult has AppListControllerDelegate.


Comment 6 by xiy...@chromium.org, Jun 18 2018

For ChromeAppListItem, please put the logic in ChromeAppListItem::Activate instead of in ChromeAppListModelUpdater.

For search result, how about making SearchController takes AppListControllerDelegate as its member? We pass it down in  CreateSearchController [1].

https://cs.chromium.org/chromium/src/chrome/browser/ui/app_list/search/search_controller_factory.cc?rcl=3d35a78122f5bbfd2191d352f5e2826ec853cb3d&l=62

Comment 7 by wutao@chromium.org, Jun 18 2018

Thanks xiyuan@.

Uploaded a cl to: https://chromium-review.googlesource.com/c/chromium/src/+/1105279
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/37ccdbddf2b85dd850d64ff92e5e65977f879449

commit 37ccdbddf2b85dd850d64ff92e5e65977f879449
Author: wutao <wutao@chromium.org>
Date: Tue Jun 19 00:51:01 2018

app_list: Dimiss launcher in common code paths

When opening app in app list or in the search result, we want to dismiss
the launcher first while waiting the app to be opened. This cl
consolidates the dismiss codes to common code paths.

Bug:  851555 
Test: manual.
Change-Id: I0230838c368c74c0acbf3e889ac9162be3abdb87
Reviewed-on: https://chromium-review.googlesource.com/1105279
Commit-Queue: Tao Wu <wutao@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568264}
[modify] https://crrev.com/37ccdbddf2b85dd850d64ff92e5e65977f879449/chrome/browser/ui/app_list/arc/arc_app_item.cc
[modify] https://crrev.com/37ccdbddf2b85dd850d64ff92e5e65977f879449/chrome/browser/ui/app_list/arc/arc_app_unittest.cc
[modify] https://crrev.com/37ccdbddf2b85dd850d64ff92e5e65977f879449/chrome/browser/ui/app_list/chrome_app_list_item.cc
[modify] https://crrev.com/37ccdbddf2b85dd850d64ff92e5e65977f879449/chrome/browser/ui/app_list/chrome_app_list_item.h
[modify] https://crrev.com/37ccdbddf2b85dd850d64ff92e5e65977f879449/chrome/browser/ui/app_list/chrome_app_list_model_updater.cc
[modify] https://crrev.com/37ccdbddf2b85dd850d64ff92e5e65977f879449/chrome/browser/ui/app_list/crostini/crostini_app_item.cc
[modify] https://crrev.com/37ccdbddf2b85dd850d64ff92e5e65977f879449/chrome/browser/ui/app_list/search/arc_app_result.cc
[modify] https://crrev.com/37ccdbddf2b85dd850d64ff92e5e65977f879449/chrome/browser/ui/app_list/search/crostini_app_result.cc
[modify] https://crrev.com/37ccdbddf2b85dd850d64ff92e5e65977f879449/chrome/browser/ui/app_list/search/search_controller.cc
[modify] https://crrev.com/37ccdbddf2b85dd850d64ff92e5e65977f879449/chrome/browser/ui/app_list/search/search_controller.h
[modify] https://crrev.com/37ccdbddf2b85dd850d64ff92e5e65977f879449/chrome/browser/ui/app_list/search/search_controller_factory.cc

Comment 9 by wutao@chromium.org, Jun 19 2018

Status: Fixed (was: Started)

Sign in to add a comment