Closed Bug 1352999 Opened 7 years ago Closed 7 years ago

Custom Tab: Same page/URL is opened in different tabs in Nightly

Categories

(Firefox for Android Graveyard :: General, defect, P2)

55 Branch
ARM
Android
defect

Tracking

(firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: sflorean, Assigned: walkingice, NeedInfo)

References

Details

Attachments

(1 file)

Environment: 
Device: Huawei Honor (Android 5.1.1);
Build: Nightly 55.0a1 (2017-04-02);

Steps to reproduce:
1. Open a web page by custom tabs;
2. Tap on three dots menu and "Open in Nightly";
3. Go back to app and repeat step 2 for 4-5 times.

Expected result:
Same link is opened in the same tab.

Actual result:
Same link is opened in different tabs.

Notes:
This is not implemented in Chrome but it will be more user friendly to have just one tab with one content in browser if we perform the same steps.
Hi Jack, 

Can you please help us verify and clarify the symptom if this has anything to do with UX design??

Thank you very much !
Flags: needinfo?(jalin)
as discussed , the symptom is UX design. 
In current design, when returning back, opening browser via custom tab will go back to custom Tab page. 
While in Chrome, when returning back, opening browser via custom tab will go back to the APP page.


It's not a function break, would suggest to update the UX spec in the next stage implementation for 2nd signoff.

Hi Joe, Could you please share your ideas per PM's perspective?

Thank you very much!
Flags: needinfo?(jcheng)
P2 per triage on april12
Priority: -- → P2
Hi, refered to Chrome behaviors, UX suggests,

1. Open a web page by custom tabs;
2. Tap on three dots menu and "Open in Nightly". At the same time, close custom tabs then open a new tab in Nightly;
3-1. If users press Back key directly, go back to the app and delete the new opened tab in Nightly;
3-2. If users switch to other tab then leave Nightly, the new opened tab in Nightly will not be deleted.

so based on the above, we will have just one tab with one content in browser as expected result.
(In reply to Jack Lin[:jacklin] from comment #4)
> Hi, refered to Chrome behaviors, UX suggests,
> 
> 1. Open a web page by custom tabs;
> 2. Tap on three dots menu and "Open in Nightly". At the same time, close
> custom tabs then open a new tab in Nightly;

Closing and reopening will lose the whole state of the tab (session history, scroll position, form input, ...). We cannot avoid this when switching to a different browser, but as long as we remain within Firefox, we should keep the tab open and just switch activities (which would also side-step the problem of duplicating the tab.

Once bug 1348686 (plus possible follow-ups) is implemented, this would be trivial to do, although it would simplify things if the menu just offered to "Switch to full version of <Firefox/Beta/Nightly/Fennec/...>" instead of a generic ACTION_VIEW, as we could then just directly switch the tab's type to trigger the switch to the full UI. If we want to keep the menu generic [1], something could probably be rigged up using intent extras, though.

As for 3-1, custom tab and web app tabs are technically externally opened tabs, so reaching the beginning of session history while pressing back will close the tab. How to make sure that in that case we'll be returning to the original app I've no idea, though - I'm not really familiar with the intricacies of Android's activity/task history handling [2].

[1] Although e.g. "Open link in new tab" from the context menu isn't - pressing "Switch" from the context menu will - when bug 1351739 has landed - always take you to the full UI of whatever Firefox version you're viewing the custom tab in.
[2] If we've gone from custom tabs to full UI, I assume that the custom tabs activity will be lying around in Android's activity stack somewhere between our current activity and the app that originally launched the custom tab.
Depends on: 1348686
Yes I agree with that we should keep scrolling position when switching to full UI. Discussed with Jack, for now we could just close CustomTabsActivity once user clicked "Switch" option. And file a new bug to implement what you said (base on bug 1348686).

for the appendix 1, I think we don't have to keep the menu generic. Then it also related to bug 1355735
See Also: → 1356188
Comment on attachment 8857898 [details]
Bug 1352999 - Close activity if user asks to open page in full browser

https://reviewboard.mozilla.org/r/129940/#review132486
Attachment #8857898 - Flags: review?(s.kaspari) → review+
Assignee: nobody → walkingice0204
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/0ac4960227da
Close activity if user asks to open page in full browser r=sebastian
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/0ac4960227da
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
per team's conversation last week, this isn't a blocker for this feature. 
clearning NI flag as it's resolved
Flags: needinfo?(jcheng)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: