Closed Bug 1904325 Opened 1 year ago Closed 11 months ago

[Menu Redesign] Support custom tab configurations for the new navbar

Categories

(Firefox for Android :: Toolbar, task, P1)

All
Android
task

Tracking

()

VERIFIED FIXED
130 Branch
Tracking Status
firefox130 --- verified

People

(Reporter: petru, Assigned: petru)

References

(Blocks 2 open bugs)

Details

Attachments

(13 files, 3 obsolete files)

1.08 MB, video/mp4
Details
1.07 MB, video/mp4
Details
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
4.92 MB, video/mp4
Details
48 bytes, text/x-phabricator-request
Details | Review
8.46 MB, video/mp4
Details
52.39 KB, image/jpeg
Details

Based on

Currently Fenix support a limited subset [1] with the new navbar getting some for free but other important ones not being supported.
Testing with dev-tabs-launcher [2] I see the following features working/missing:

Feature Addressbar Navbar
Colours
- choosing between ligtht/dark/system theme
- choosing toolbar theme
- choosing system navbars theme
- change menu color
- pass colour scheme to Gecko
Custom buttons
- custom close button
- custom action button
- whether to show or not the share button
- custom options in the 3dot menu

[1] https://searchfox.org/mozilla-central/rev/93692d0756f01f99e2b028e40b45776fa0a397e9/mobile/android/android-components/components/feature/customtabs/src/main/java/mozilla/components/feature/customtabs/CustomTabsToolbarFeature.kt#132
[2] https://github.com/ohmae/dev-tabs-launcher

In regards to the navbar I think we should address asap the features supported by the addressbar and not yet supported by the navbar.

Later we can look into supporting a larger set of custom tab customisations. Having two toolbars (addressbar + navbar) supporting this should allow for an improved user experience.
To note that two toolbars should've already be supported with customized colours [2], buttons [2] and gestures [3].

[1] https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarColor(int)
[2] https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarViews(android.widget.RemoteViews,int[],android.app.PendingIntent)
[3] https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsIntent.Builder#setSecondaryToolbarSwipeUpGesture(android.app.PendingIntent)

Attached video CustomTabWithNavbar.mp4

Showing missing colours and action buttons customisations when using the new navbar.

Severity: -- → N/A
Type: defect → task
Summary: Support custom tab configurations for the new navbar → [Menu Redesign] Support custom tab configurations for the new navbar
Assignee: nobody → petru
Status: NEW → ASSIGNED

Since custom tabs can declare whether they want to have the share menu shown or not
we should stop showing it by default in the 3dot menu.

When custom tabs ask for the option to be shown it will be shown as an action in the
address bar.

This patch reverses the changes from bug 1899394.

Since custom tabs can declare whether they want to have the share menu shown or not
we should stop showing it by default in the 3dot menu.

When custom tabs ask for the option to be shown it will be shown as an action in the
address bar.

This patch reverses the changes from bug 1899394.

Allow these to then be used for other similar functionalities, like for how
the navbvar should look like when used for custom tabs.

Allow these to then be used for other similar functionalities, like for how
the navbvar should look like when used for custom tabs.

Allow these to then be used for other similar functionalities, like for how
the navbvar should look like when used for custom tabs.

Not sure why there are multiple of the same patches, seems like they all reference the same differential.
I'll mark some duplicates as obsoletes.

Attachment #9410654 - Attachment is obsolete: true
Attachment #9410656 - Attachment is obsolete: true
Attachment #9410648 - Attachment is obsolete: true
Attachment #9410649 - Attachment is obsolete: true
Attachment #9410655 - Attachment is obsolete: true
Attachment #9410653 - Attachment is obsolete: true
Attached video Issues fixed
Attachment #9410654 - Attachment is obsolete: false
Attachment #9410654 - Attachment is obsolete: false
Attachment #9410649 - Attachment is obsolete: false
Attachment #9410648 - Attachment is obsolete: false
Attachment #9410649 - Attachment description: Bug 1904325 - Show a share button as addressbar action in custom tabs only if they ask for r=#android-reviewers → WIP: Bug 1904325 - Avoid always showing the share button in custom tabs menu
Attachment #9410653 - Attachment is obsolete: false
See Also: → 1899408

Talked with Aarjav and demoed the proposed changes, 3 changes requested:

  • don't allow to modify the back button icon of the custom tab, always show the "X"
  • don't theme the system navigation bar, always show it as black, even when using a light theme for the app / device
  • keep the share button always in the menu. It's okay if it happens to be shown in the menu and in the address bar also.

Fenix needs more control over which UI elements to be themes, specifically when
used in combination with the new navigation bar the system bars should be black.

Added a new patch with the changes Aarjav requested.
And here a recording of what the UX would look like which Aarjav approved.

Attachment #9410649 - Attachment is obsolete: true
Attachment #9410648 - Attachment description: Bug 1904325 - Have both the address bar and the navbar set the custom menu in the same way r=#android-reviewers → Bug 1904325 - part 1: Have both the address bar and the navbar set the custom menu in the same way r=#android-reviewers
Attachment #9410653 - Attachment description: Bug 1904325 - Extract color inference methods from CustomTabsToolbarFeature r=#android-reviewers → Bug 1904325 - part 2: Extract color inference methods from CustomTabsToolbarFeature r=#android-reviewers
Attachment #9410654 - Attachment description: Bug 1904325 - Allow custom tabs to configure navbar colors r=#android-reviewers → Bug 1904325 - part 3: Allow custom tabs to configure navbar colors r=#android-reviewers
Attachment #9411047 - Attachment description: Bug 1904325 - Customize which UI elements should be themed for a custom tab r=#android-reviewers → Bug 1904325 - part 4: Customize which UI elements should be themed for a custom tab r=#android-reviewers

Increasing priority to P1 now that we're fixing toolbar phase 1's beta blockers.

Priority: -- → P1
Pushed by plingurar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e2cba87dc168 part 1: Have both the address bar and the navbar set the custom menu in the same way r=android-reviewers,gl https://hg.mozilla.org/integration/autoland/rev/f765bf969fcd part 2: Extract color inference methods from CustomTabsToolbarFeature r=android-reviewers,007 https://hg.mozilla.org/integration/autoland/rev/60d11d4ccb5e part 3: Allow custom tabs to configure navbar colors r=android-reviewers,007 https://hg.mozilla.org/integration/autoland/rev/d96f1104816f part 4: Customize which UI elements should be themed for a custom tab r=android-reviewers,mavduevskiy
Flags: qe-verify+
Blocks: 1908950
Blocks: 1908954

Verified as fixed on Nightly 130.0a1 from 07/29 with Google Pixel 8 Pro (Android 14).

There are a few known issues affecting custom tabs: 1908316, 1908318, 1908661, 1908662, 1891096 but they will be handled separately.

Flags: qe-verify+
Status: RESOLVED → VERIFIED
See Also: → 1896961
See Also: → 1916298
Regressions: 1926489
No longer regressions: 1926489
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: