Closed Bug 1822887 Opened 2 years ago Closed 1 year ago

[Tabs tray to Compose] Refactor unnecessary selected tabs parameters out of `SelectionMenuIntegration.handleMenuClicked` and `SelectionBannerBinding.initListeners`

Categories

(Fenix :: Tabs, task, P3)

All
Android
task

Tracking

(firefox114 verified)

VERIFIED FIXED
114 Branch
Tracking Status
firefox114 --- verified

People

(Reporter: 007, Assigned: 007)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid])

Attachments

(1 file)

The calls to the following interactor functions do not need the collection of selected tabs, as these can be readily accessed via TabsTrayState. Refactor these interactor functions (and their respective controllers/implementors) to not need this parameter and rely on TabsTrayState instead.

Do exhaustive when (item) {
        is SelectionMenu.Item.BookmarkTabs -> {
            navInteractor.onSaveToBookmarks(store.state.mode.selectedTabs)
        }
        is SelectionMenu.Item.DeleteTabs -> {
            trayInteractor.onDeleteTabs(store.state.mode.selectedTabs)
        }
        is SelectionMenu.Item.MakeInactive -> {
            trayInteractor.onInactiveDebugClicked(store.state.mode.selectedTabs)
        }
}

For SelectionBannerBinding.initListeners, the calls to navInteractor and the action dispatch for exiting selection mode should be moved to the interactor/controller.

Notes for QA:

This is a business logic refactor, so all existing functionality should be maintained with:

  • Tabs tray multiselection save tabs as bookmarkss
  • Tabs tray multiselection tab deletion
  • Tabs tray multiselection force tabs as inactive
  • Tabs tray multiselection save tabs to collections
  • Tabs tray multiselection share tabs

Please validate that there have been no regressions with this functionality.

Assignee: nobody → nbond
Summary: [Tabs tray to Compose] Refactor unnecessary selected tabs parameters out of `SelectionMenuIntegration.handleMenuClicked` → [Tabs tray to Compose] Refactor unnecessary selected tabs parameters out of `SelectionMenuIntegration.handleMenuClicked` and `SelectionBannerBinding.initListeners`
Whiteboard: [fxdroid]
Status: NEW → ASSIGNED

Authored by https://github.com/MozillaNoah
https://github.com/mozilla-mobile/firefox-android/commit/2551c90be982aa68716a4f5daf02180698ff2991
[main] Bug 1822887 - Refactor multi selection business logic from NavigationInteractor to TabsTrayController

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
Flags: qe-verify+
Flags: qe-verify+

Verified as fixed on the latest Nightly (114.0a1) from 4th of May 2023.
No issues encountered while multiple selection of tabs is performed, the tabs can be bookmarked, saved to collections, shared and marked as inactive.
Devices used for testing: Google Pixel 7 Pro (Android 13).
Thanks!

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: