Commit Graph

97 Commits (1f633edd7d4436f20ead4ba657b1284b94cca0c6)

Author SHA1 Message Date
Jonathan Almeida 061de54291 Issue #21576: Hide 'Other' title when there are no search groups 3 years ago
Jonathan Almeida c877a25400 Issue #21641: Do not add a group of only one tab 3 years ago
Noah Bond aa28b6f142
For #21360 - Added toggle for search term tab groups (#21615)
* For #21360  - Added toggle for search term tab groups

* For #21360 - Lint cleanup

* PR: Added missing licenses and possibly fixed UI test

* PR: Added a "scrollTo" to potentially fix a UI test

* PR: Added potential fix for alwaysStartOnHomeTest

* PR: Added temporary ignore to alwaysStartOnHomeTest

* PR: added missing ignore comment

* For #21360 - Added missing feature flag driven visibility logic

Co-authored-by: Sebastian Kaspari <s.kaspari@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
3 years ago
Elise Richards 3a2b9e5d2b
For #21643: Pre-land strings for inactive tabs CFR. Update section title for normal, non-search group tabs. (#21645) 3 years ago
Noah Bond 25d0696101
Inactive tabs changes (#21524)
* Issue mozilla-mobile#21319 - Moved inactive tabs to the top of the normal tabs tray.

* Issue mozilla-mobile#21319 - Added a delete icon to delete ALL inactive tabs.

* Issue mozilla-mobile#21319 - Changed default inactive time period to 14 days

* Issue mozilla-mobile#21319 - Hooked inactive tabs setting to UI code

Inactive tabs setting is also disabled when the user has selected the one day or week auto-close tab setting.

* Issue mozilla-mobile#21319 - File and Lint cleanup

* PR: Fixed bug causing grouped tabs to also show in "Other" when marked as inactive but inactive is OFF in Settings

* PR: Fixed lint warnings

* PR: Removed redundant feature check

* PR - Ignore test until search term tab groups switch is done
3 years ago
codrut.topliceanu 0e88c25df1 For #20762 - Adds grey border to inactive tabs 3 years ago
Roger Yang 8a15e8a681 Close #21451: Add active search term tab groups on home 3 years ago
Roger Yang fc18fd2520
For #21236: Separate tabs with the same search term into a different section (#21177)
* For #21236: Separate tabs with the same search term into a different section in tabs tray

* Issue #21236: Scroll to selected tab + various tab fixes for groupings

* Issue #21236: Fix failing test

Co-authored-by: Jonathan Almeida <jalmeida@mozilla.com>
3 years ago
Noah Bond b3a86e982d Issue mozilla-mobile#20637 - Fixed bug causing the tabs tray to scroll to the wrong tab when opened 3 years ago
Mugurell 09e8d34c26 For #20507 - Inactive tabs telemetry
Two new events are added:
- "inactive_tabs_expanded" for when the inactive tabs section is expanded
- "inactive_tabs_collapsed" for when the inactive tabs section is collapsed

For tracking when an inactive tab is opened / closed I've repurposed the
existing tabs tray telemetry (since the functionality uses the same code)
- tabs_tray.opened_existing_tab
- tabs_tray.closed_existing_tab
to support an extra "source" key indicating the feature from which a tab was
opened or closed. The current values for this new key are:
- "Tabs tray" for when a tab was opened/closed from tabs tray
- "Inactive tabs" for when a tab was openes/closed from the Inactive tabs
section of the tabs tray.
3 years ago
codrut.topliceanu bf5b4a5655 For #17917: Use View binding in tabs tray 3 years ago
Jonathan Almeida 5442798b38 Issue #20718: Show url if title is missing for inactive tabs 3 years ago
Jonathan Almeida d6bc93981d Issue #20663: Make inactive card collapsible
We use make the inactive tabs section of the tabstray collapsible in
this change, with a technical quirk: we want to make the "isExpanded"
state of the tabs stay for the lifetime of the app and not the tabs
tray, but this functionality does not exist.

In this patch, we're storing the UI state in a singleton class that
exists for the lifetime of the app, but a more concrete solution is to
use an AppStore that holds content like this, which we can land in a
future patch.
3 years ago
codrut.topliceanu 4b21f52db4 For #20310 - Adds Recently Closed button to tabsTray 3 years ago
Jonathan Almeida ca51ac6168 Issue #20664: Do not consider newly created tabs as inactive 3 years ago
Jonathan Almeida 69d630f46c Issue #20349: Add inactive tab grouping to tabs tray 3 years ago
codrut.topliceanu 37e2c6ceeb For #19739 - Adds start tabsTray with multiSelect support 3 years ago
Jonathan Almeida 5be35df969 Revert "For #19739 - Adds start tabsTray with multiSelect support"
This reverts commit d8288f5e89.
3 years ago
codrut.topliceanu d8288f5e89 For #19739 - Adds start tabsTray with multiSelect support 3 years ago
Mihai Adrian Carare 83a5aa2838
For #20007: Multiselect title is important for a11y just in select mode. (#20008) 3 years ago
Sebastian Kaspari 4753a1d494 Complete browser-state migration and remove browser-session dependency.
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
Jonathan Almeida 811dd3e618 Issue #19809: Change default tab tray view to grid layout 3 years ago
codrut.topliceanu 85c438798e For #19191 - Fixes missing multi-select checkmarks 3 years ago
Mugurell dc26272381 For #19475 - Cleanup - respect naming scheme in TabsTrayController
In our current MVI implementation the View Interactors are first called in
response to a direct user action and contain methods following the
"onXXHappened" naming scheme and then delegate other Interactors / Controllers
for specific actions.

Controllers contain the business logic for actually updating the app's state
and offer methods following the "handleXXAction" naming scheme.
3 years ago
Jonathan Almeida ede909e858
Issue #19176: Exit select mode when removing tab (#19486) 3 years ago
Jonathan Almeida a95a26b2c6 Issue #19002: Use a single BrowserTrayList for normal/private list
We now have a BrowserTrayList.
 - Renamed from `BaseBrowserTrayList`.
 - Removed the abstract `configuration` and used a `lateinit var`
 instead.
 - Removed `NormalBrowserTrayList` and `PrivateBrowserTrayList`.
3 years ago
Jonathan Almeida bd753d3f94 Issue #19002: Correct browser viewholder naming 3 years ago
Jonathan Almeida 809c82a9f9 Issue #19002: Move TabsTrayViewHolder to browser package 3 years ago
Jonathan Almeida 78af3d80b3 Issue #19002: Remove unused TrayItem interface 3 years ago
Jonathan Almeida e66983d093 Issue #19002: Use AbstractBinding from lib-state 3 years ago
Jonathan Almeida 0a4927a495 Issue #18934: Do not nullify adapter on window detached
Previously, to fix a memory leak, we were removing the adapter reference
entirely in order to have the `onDetachedFromRecyclerView` callback
invoked. This causes a side-effect where we can no longer reference the
adapter any more when we re-attach.

The simpler solution is to just invoke the needed callback directly
instead.
3 years ago
Jonathan Almeida cb60461bdd Close #18934: Remove adapter when deataching from window 3 years ago
Jonathan Almeida f3df2c73d9
Close #18862: Add multi-select banner to tabs tray (#18932)
* Issue #18862: Add new addBookmark BookmarksUseCase

* Issue #18862: Add class for state binding features

* Issue #18862: Add delete multiple tabs to tray interactor

* Issue #18862: Add new actions to navigation interactor

* Issue #18862: Enable select mode from main tray menu

* Issue #18862: Add menu when in select mode

* Close #18862: Add multi-select banner to tabs tray

* Close #18862: Add select support for handle UI

We apply various layout changes to the "handle" UI in the tabs tray when
switching modes. It isn't quite clear to my, why we do this, if it's
really needed to meet the end result, and if there is a better way.

For now, we're simplying moving over that logic that we can re-evaluate
at a later time.
3 years ago
Jonathan Almeida e422016367 Call stop in deattach for feature binding 3 years ago
Jonathan Almeida 6d09a8757c Close #18845: Adds swipe-to-delete to tabs tray refactor
Copied the TabsTouchHelper from the `tabtray` package here so we don't
need to re-write our own because there's nothing more to add.

We can hook this up with our tabs tray here by putting it in the
`BaseBrowserTrayList` for our normal and private tabs list.
3 years ago
codrut.topliceanu d961d7ba38 For #18515 - Adds FAB to TabsTray rewrite 3 years ago
Jonathan Almeida b1727416f3 No issue: Move UseCase wrappers to the interactor; it's only usage 3 years ago
Jonathan Almeida 09e9561600 Issue #18774: Fix long parameter warnings in detekt 3 years ago
Jonathan Almeida 9078139e40 Close #18774: Migrate mutli-selection to store
Removes the recyclerview-selection library and replaces it with the
SelectionHolder/SelectionInteractor with a Store.

This is an implementation that's similar to what we have in other UI
lists (library).
3 years ago
Jonathan Almeida a443509c8b Issue #18535: Set the span count for grid view 3 years ago
Jonathan Almeida 8ccc4648a9 Issue #18535: Move list/grid viewholders to browser package 3 years ago
Jonathan Almeida e41344aa1f Close #18668: Add stable ID cache for TabAdapter.getItemId 3 years ago
Jonathan Almeida 917783a141 Issue #18443: Fix changes between grid/list viewholders 3 years ago
Jonathan Almeida 9ce4adaa32 Close #18443: Use recyclerview-selection for multi-select mode in tray
Add multi-select mode to the BrowserTabsAdapter. It has the
functionality to:
 - Enable multi-select mode on long-press.
 - Enable multi-select mode when changed by an external function.
 - Only works for normal tabs (as we currently have it).

Co-authored-by: "codrut.topliceanu" <codrut.topliceanu@softvision.ro>
3 years ago
Roger Yang c21b44e0a3
Closes #18535: Re-add grid layout to tabs tray (#18638) 3 years ago
Jonathan Almeida 2c23941823 Issue #18538: Add BrowserTabsAdapter for tabs tray 3 years ago
Jonathan Almeida 05aa948dc7 Issue #17822: Create a tabs tray layout and fragment
Co-authored-by: Kate Glazko <kglazko@Kates-MacBook-Pro.local>
3 years ago