focus-android icon indicating copy to clipboard operation
focus-android copied to clipboard

"Open link in private tab" option from a custom tab does not switch to Focus

Open delia-pop opened this issue 3 years ago • 7 comments

Steps to reproduce

  1. Set Firefox Focus as default browser.
  2. Open Gmail (or another app: Chrome, Twitter etc).
  3. Open a link from an email.
  4. From the webpage opened in a custom tab, long tap a link.
  5. Select "Open link in a private tab".
  6. From the "New private tab opened" snackbar displayed tap on the "SWITCH" button.
  7. Observe the result.

Expected behavior

As per discussion from https://github.com/mozilla-mobile/focus-android/issues/3753, the "Open link in a private tab" should be replaced by “Open in browser”. Once the option is selected, the tab should be immediately opened in Focus.

However, regarding the the current behavior, when tapping on the "SWITCH" button from the snackbar, the webpage should immediately be opened in Focus.

⚠️ UPDATE: expected behavior:

@jeffreygee In fact Fenix displays a different context menu for custom tabs. Should we follow the same path for Focus? @ionutbedregeanu - Yeah, I would follow the same path for Focus as in Fenix

Actual behavior

Tapping on the "Open link in private tab" option from a custom tab does not immediately switch to Focus after selecting "SWITCH" from the snack bar. If the user opens the Firefox Focus browser, it can be observed that the link is opened in a new tab.

Device information

  • Android device: Huawei P9 Lite (Android 8).
  • Focus version: Beta 94.0.0-beta.2 (build 352922038 GV 94.0-20211017185800)/ RC 94.0.0.

https://user-images.githubusercontent.com/89388888/138112508-4164311e-8eae-4731-a863-98155b766c2a.mp4

delia-pop avatar Oct 20 '21 14:10 delia-pop

There are a few options on how to better handle this, but I think UX should decide. cc @brampitoyo.

mcarare avatar Oct 21 '21 12:10 mcarare

@mcarare You are right that the “Switch” action should move the user out of the custom tab, and into the Focus app where the new tab is opened.

However, since we’re planning to deprecate multi-tasking, I would say that this issue is lower-priority to fix, compared to others.

brampitoyo avatar Oct 22 '21 05:10 brampitoyo

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 21 '22 00:04 stale[bot]

I was able to reproduce this issue on the latest Focus Nightly build 101.0a1 with Oppo Find X3 Lite (Android 11). After tapping on "Switch", nothing happens. I was not redirected to Focus, I still remained in the custom tab. Opening Focus Nightly, the tab is opened, but as a user I had no idea that the action was successful.

lobontiumira avatar Apr 21 '22 09:04 lobontiumira

This issue still reproduces on the latest Focus Nightly 104.0a1 build from 7/14 with Oppo Reno 6 (Android 12).

lobontiumira avatar Jul 14 '22 12:07 lobontiumira

@jeffreygee From what i see in AC "Open link in a private tab" was implemented for normal and not for custom tabs. This option is hidden in Fenix custom tab context menu. In fact Fenix displays a different context menu for custom tabs. Should we follow the same path for Focus?

Fenix custom tab context menu for link and picture

Focus custom tab context menu for link and picture

ionutbedregeanu avatar Jul 15 '22 11:07 ionutbedregeanu

@ionutbedregeanu - Yeah, I would follow the same path for Focus as in Fenix

jeffreygee avatar Sep 01 '22 22:09 jeffreygee

Verified as fixed on the latest Focus Nightly 107.0a1 from 10/16 with Google Pixel (Android 10), and Oppo Find X3 Lite (Android 11) - the custom tab's context menus are implemented as in Fenix, without the "Open link in private tab" option:

Untitled

lobontiumira avatar Oct 17 '22 07:10 lobontiumira

Verified as fixed also on Beta 107.0b1.

lobontiumira avatar Oct 19 '22 06:10 lobontiumira