Webapps don't navigate as a result of notifications if the webapp is already open |
|||
Issue descriptionRepro steps: 1) In chrome://flags disable "Improved Add to Homescreen" 2) Navigates to https://tests.peter.sh/notification-generator/ 3) Tap "Add to Home screen" in the app menu 4) "Tap" the "Display the notification" <button> on the web page. This should generate a notification 5) Tap on the "Peter Beverloo" link 6) Tap on the notification Expected: The webapp navigates to https://tests.peter.sh/notification-generator/ Actual: The webapp does not navigate
,
Jul 17 2017
Fixed steps: Repro steps: 1) In chrome://flags disable "Improved Add to Homescreen" 2) Navigates to https://tests.peter.sh/notification-generator/ 3) Tap "Add to Home screen" in the app menu 4) Launch the web app 5) "Tap" the "Display the notification" <button> on the web page. This should generate a notification 6) Tap on the "Peter Beverloo" link at the bottom of the page 7) Tap on the notification Expected: The webapp navigates to https://tests.peter.sh/notification-generator/ Actual: The webapp does not navigate
,
Jul 19 2017
Do we actually want to force the navigation in this case? If a URL is already open and in memory, it seems a bit of a waste to navigate to exactly the same URL.
,
Jul 19 2017
,
Jul 19 2017
WebAPKs force navigations in this case. The bug here is that the notification wants to navigate to a different URL than the one that the webapp is currently showing. For instance, the user may be on the twitter home page and the notification may want to navigate to the twitter conversation view
,
Jul 20 2017
The repro case you have seems to use the same URL being loaded as the notification wants to navigate to. Does it still repro if you are trying to go to a different URL? Or is it a sporadic behaviour?
,
Jul 20 2017
Dominick, thank you for the question. Yes, it still repros if you are trying to go to a different URL. It repros both if the notification is trying to go to a different URL than the current URL trying to go to a different URL than the start URL The bug is not sporadic.
,
Jul 20 2017
Thanks for clarifying. I still think it's a negative experience if we navigate when we're already at the URL that was asked to be opened.
,
Jul 20 2017
But then again, I suppose the default behaviour for deep link navigation is to always navigate, so perhaps that's also okay for notifications. It would be nice if we could find a smart way of telling when a page is or isn't stale, but I guess consistency with ordinary deep linking is desirable.
,
Jul 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/aca98f1a90f13831326bb304c6baf83274134afa commit aca98f1a90f13831326bb304c6baf83274134afa Author: Peter Kotwicz <pkotwicz@chromium.org> Date: Sat Jul 22 01:35:54 2017 [Android Webapp] Always navigate as a result of clients#openWindow() This CL makes webapps always navigate as a result of clients#openWindow() In particular: - The CL moves WebApkConstants#EXTRA_WEBAPK_FORCE_NAVIGATION to ShortcutHelper - Sets the extra in ServiceTabLauncher#launchTab() for webapps BUG= 744843 NOPRESUBMIT=true (Because the version in shell_apk_version.gni does not need to be incremented because although I renamed WebApkConstants#EXTRA_WEBAPK_FORCE_NAVIGATION I did not change its value) Change-Id: I98465c1f8773a705dc7177792256d901bf9aa6bc Reviewed-on: https://chromium-review.googlesource.com/575328 Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org> Reviewed-by: Dominick Ng <dominickn@chromium.org> Reviewed-by: Xi Han <hanxi@chromium.org> Cr-Commit-Position: refs/heads/master@{#488831} [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/java/src/org/chromium/chrome/browser/ServiceTabLauncher.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkInfo.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateDataFetcher.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkUpdateDataFetcherTest.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappModeTest.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappVisibilityTest.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkInfoTest.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerTest.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkNavigationClient.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkConstants.java [modify] https://crrev.com/aca98f1a90f13831326bb304c6baf83274134afa/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/MainActivity.java
,
Jul 28 2017
Improved repro steps Repro steps: 1) In chrome://flags disable "Improved Add to Homescreen" 2) Navigates to https://tests.peter.sh/notification-generator/ 3) Tap "Add to Home screen" in the app menu 4) Close Chrome 5) Tap the newly added icon on the home screen. This should launch Chrome in fullscreen mode 6) Select "Only open a new window" in the Action <select> combo box 7) Tap the "Display the notification" <button> on the web page. This should generate a notification 8) Tap on the "Peter Beverloo" link 9) Tap on the notification Expected: The webapp navigates to https://tests.peter.sh/notification-generator/ Actual: The webapp does not navigate
,
Jul 28 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by pkotw...@chromium.org
, Jul 17 2017