Closed Bug 2061543 Opened 3 months ago Closed 1 month ago

[Tab Groups] Stand-up a Fragment + Store to wrap the group chooser sheet + edit flows when outside of the Tabs Tray

Categories

(Firefox for Android :: Tabs, task)

All
Android
task

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: 007, Assigned: jdelorenzo)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fxdroid][android-core])

Attachments

(4 external files)

In order to support the tab group chooser and the edit/create tab group flows outside of the Tabs Tray (which are in a bubble of Nav3), we'll need to stand-up a new Fragment and Store. This will allow other features in Fenix to navigate to these flows using the Fragment-based Nav2.

As part of this ticket:

  • Create a new TabGroupCreationFragment (name can be workshopped)
    • A Nav3 NavDisplay can be used for hosting the different destinations.
  • Add an entry to the global nav graph and make a mandatory argument a list of tab IDs (Strings)
  • Create the usual Redux boiler plate
    • TabGroupCreationStore
    • TabGroupCreationState
    • TabGroupCreationAction
    • TabGroupCreationReducer
    • TabGroupCreationTelemetryMiddleware
  • Stand-up /logic functionality to:
    • Navigate to the create tab group sheet when the user has zero tab groups.
    • Navigate to the chooser sheet when the user has at least one tab group.
    • Navigate to the create tab group sheet when the user selects to make a new group.
    • Add the list of tab IDs to the selected group when a user selects a group on the chooser sheet.
    • Add the list of tab IDs to the selected group when a user creates a new group.
    • Dismiss the fragment when the user selects a group.
    • Fire the same telemetry in response to Actions as in TabsTrayTelemetryMiddleware
  • Create tests for the Redux Action reducing.
  • Create tests for any middleware side effects (saving a tab group, telemetry, etc.).

Important dev note:
If any functionality in TabStorageMiddleware, or elsewhere, can be reused, please refactor it to a new file or class where it can be shared + tested.

This will be immediately used by Bug 2060354, so that ticket could be used for testing the integration.

When the user clicks outside of a sheet, the entire fragment flow is dismissed (aka the fragment is popped)

If a user is navigated directly to the chooser sheet and makes a new group, the fragment should be popped.

If a user is navigated directly to the expanded tab group sheet and the user edits said group, the user is returned to the expanded sheet.

Blocks: 2063470
Blocks: 2063471
Assignee: nobody → jdelorenzo
Blocks: 2069525
Blocks: 2069535

Pure rename, no behavior change. A later patch in this series adds a
sibling TabAddedToNewTabGroup action for the browser menu entry point,
which makes the unqualified name ambiguous.

The Glean-generated TabsTray.TabAddedToGroupExtra and the private
handleTabAddedToGroup helper keep their existing names.

TabsTrayTelemetryMiddleware recorded tab group events inline. Move that
recording into a TabGroupTelemetry class parameterized by access point,
so a second entry point outside the tabs tray can reuse it.

TabGroupTelemetryContext lets a state object supply the group list and
form state that the save and theme events branch on;
TabsTrayState.TabGroupState implements it. No change to which events are
recorded or to their extras.

The entryProvider block had grown to roughly 300 lines nested inside
onCreateView, which made the individual destinations hard to read and
left no place to hang a second nav host off the same pattern.

Pull each destination's content into its own composable, and hoist the
provider itself into getEntryProvider(). A follow-up patch adds
TabGroupFlowFragment, which follows this same shape.

Pure extraction: no behavior change, and every hunk is a move.

Attachment #9635585 - Attachment description: WIP: Bug 2061543: Stand up a fragment to store the Tab Group Flow → WIP: Bug 2061543 - Stand up a fragment to host the Tab Group flow
Attachment #9639378 - Attachment description: WIP: Bug 2061543 - Rename TabAddedToGroup to TabAddedToExistingTabGroup → Bug 2061543 - Rename TabAddedToGroup to TabAddedToExistingTabGroup
Attachment #9635585 - Attachment description: WIP: Bug 2061543 - Stand up a fragment to host the Tab Group flow → Bug 2061543 - Stand up a fragment to host the Tab Group flow
Attachment #9639379 - Attachment description: WIP: Bug 2061543 - Extract tab group telemetry into a TabGroupTelemetry class → Bug 2061543 - Extract tab group telemetry into a TabGroupTelemetry class
Attachment #9639380 - Attachment description: WIP: Bug 2061543 - Extract TabManagementFragment's entryProvider into named composables → Bug 2061543 - Extract TabManagementFragment's entryProvider into named composables
Pushed by jdelorenzo@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6e25467c542c https://hg.mozilla.org/integration/autoland/rev/33b6b20376fb Rename TabAddedToGroup to TabAddedToExistingTabGroup r=android-reviewers,007 https://github.com/mozilla-firefox/firefox/commit/51cc646d8ba7 https://hg.mozilla.org/integration/autoland/rev/112c62386ebb Extract tab group telemetry into a TabGroupTelemetry class r=android-reviewers,calu https://github.com/mozilla-firefox/firefox/commit/f4edbb455298 https://hg.mozilla.org/integration/autoland/rev/2b7d7f91542c Extract TabManagementFragment's entryProvider into named composables r=android-reviewers,007 https://github.com/mozilla-firefox/firefox/commit/aa713c7e9955 https://hg.mozilla.org/integration/autoland/rev/ed29bab5049a Stand up a fragment to host the Tab Group flow r=android-reviewers,android-l10n-reviewers,parker,007
See Also: → 2092186
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: