Commit Graph

42 Commits

Author SHA1 Message Date
Arturo Mejia 8c82e9f640 Handle interactions with message controller 2022-03-09 19:53:23 -05:00
MatthewTighe 2cc9ca3773 for #23069: add blocklist middleware for home 2022-02-22 22:25:04 +00:00
Gabriel Luong 42ac6feb0c For #23424 - Part 2: Add context menu for contile top sites 2022-01-31 22:14:34 +00:00
Gabriel Luong 26b65a2a23 For #22727 - Add Contile to Top Sites 2022-01-18 20:13:43 +00:00
Mugurell 5c3fedd707
For #22534 - Show history highlights and groups in "Recently visited" (#22535)
* For #22534 - Update homescreen section name to "Recently visited"

* For #22534 - Show both history highlights and groups in Recently visited

For now the metadata groups don't support scoring so as an interim solution we
will show up to 9 items, evenly distributes, first favoring groups sorted by
date then history highlights pre-sorted by default.

Tapping a history highlight will switch to it's already open tab if available
or create a new one in which to load it if needed.

A "Remove" option will also be available for history highlights to remove it
from the screen and also from history.
Currently removing a group / highlight will not query new ones to again show up
to 9 items, this will be implemented separately.

* For #22534 - Rename and refactor historymetadata to recentvisits

The updated feature supports more than history metadata so updating the overall
naming scheme seems needed.
To signal that this is a homescreen feature the entire package is moved to home

* For #22534 - Update UI tests to account for the new items space on the screen

Saw failures about not finding the collection section on screen.
This is probably happening because w are now adding the recent visits to
homescreen above the collections section pushing it off screen.

Since the collections might be obstructed by the toolbar shown on top as a
quick solution we'll scroll to the next homescreen section so that the
collections will be shown above in their entirety.

* Update app/src/main/java/org/mozilla/fenix/home/recentvisits/RecentVisitsFeature.kt

Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>

* Update app/src/main/java/org/mozilla/fenix/home/recentvisits/RecentVisitsFeature.kt

Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>

Co-authored-by: Gabriel Luong <gabriel.luong@gmail.com>
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-11-29 20:12:52 +00:00
Gabriel Luong 91da5318e3 For #22211 - Use Hero images for Recent Bookmarks 2021-11-25 20:35:55 +00:00
Noah Bond a06b04ec6d
MR2 Telemetry: Recent tabs section probe (#22166)
* For #22107 - Added probe to track if the Recent tabs / jump back in section is visible

* For #22107 - Fixed lint errors

* For #22107 - added data review number to metric

* For #22166 - fixed expiration date

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-11-02 23:08:30 +00:00
Gabriel Luong 07a6a386f8 For #21753 - Refactor Pocket out of sessioncontrol 2021-10-20 23:08:14 +00:00
Mugurell 507801e5d5 For #21623 - Pocket recommended stories telemetry 2021-10-07 08:36:00 +00:00
Mugurell 565beb88c9 For #21593 - Refactor out "isSelected" from PocketRecommendedStoriesCategory
Having the list of categories and the list of selected categories separate in
State allows updating them independently.
2021-10-04 11:54:42 +00:00
Elise Richards c60de0bc6c For #21287: long press menu on recently visited homescreen groups 2021-09-30 22:00:18 -04:00
Mugurell 0c632dbbdb For #21391 - Final design composables
Fonts are not exactly following the Figma design but do better suit the overall
design since the other fonts are also not respecting the latest specs.
2021-09-29 19:15:07 +00:00
Mugurell c1f0e5a611 For #21275 - Sort items by how many times they were actually shown 2021-09-28 20:25:25 +00:00
Roger Yang 8a15e8a681 Close #21451: Add active search term tab groups on home 2021-09-27 21:10:57 +00:00
Arturo Mejia f15291757b For #21493 show onboarding dialog for home sections 2021-09-27 19:22:34 +00:00
Mugurell ba4c44afcf For #21045: Add categories support 2021-09-27 09:57:15 +00:00
Gabriel Luong 90d7927b2f Issue #21117 - Modify layout for items displayed under "Recently Visited" in the HomeScreen to follow latest UX designs 2021-09-22 21:30:45 +00:00
Gabriel Luong 98b218d964 For #21413 - Remove unused OnboardingPrivateBrowsingViewHolder and OnboardingWhatsNewViewHolder 2021-09-22 14:20:16 +00:00
Arturo Mejia 4e846b3cb6 For #21095 add customize home button on the home screen. 2021-09-16 14:58:45 -04:00
Elise Richards 52975b4f05 For #20654: Handle private mode switching from home behind search dialog.
Add tests for controller and interactor to handle private mode switches
2021-09-14 18:21:06 +00:00
Sebastian Kaspari 971b419d77 Run ktlintFormat to adapt to latest formatting rules. 2021-07-30 11:58:02 +00:00
Gabriel Luong 9b22b2baa4 For #20438 - Display a list of history metadata groups 2021-07-22 19:19:50 +00:00
Elise Richards 9bfe9b0787
For FNX-22339: Recently saved bookmarks (#19835)
* Title and button for home screen recently saved bookmarks section

Create bookmark item view with favicon and title

* View holders and interactors for recently saved bookmarks

Recent bookmark item view holder binding

Create adapter for recent bookmarks. Implement controller methods. Implement view holder bindings for items

Top level adapter for recent bookmarks section

Retrieve list of recent bookmarks on home

View holders and interactors for recently saved bookmarks

Recent bookmark item view holder binding

Create adapter for recent bookmarks. Implement controller methods. Implement view holder bindings for items

Top level adapter for recent bookmarks section

Retrieve list of recent bookmarks on home

Update list on app start and when bookmarks are added

View holders and interactors for recently saved bookmarks

Recent bookmark item view holder binding

Create adapter for recent bookmarks. Implement controller methods. Implement view holder bindings for items

Top level adapter for recent bookmarks section

Retrieve list of recent bookmarks on home

Update list on app start and when bookmarks are added

Make a use case for retrieving and updating the list of recently saved bookmarks

Add adapter items and define header viewholder binding

Use session interactor for header button clicks. Bind in the adapter

* Retrieve list of bookmarks asynchronously on home

Interactor and controller tests

Address review comments

Split up tests for recent bookmarks

Update to new interactors

Dark mode and light mode styles

Refactor bookmarks home stuff

* Add RecentBookmarksFeature to home

Move interactor to SessionControlInteractor

Clean up lint, styles, and dimens.

* Bookmarks use case tests for retrieving recently saved bookmarks. Linting.

* View holder tests

* Match ux to designs for colors, margins, and scrolling

* Clean up clean up

* Tests for the view bound feature

* Controller test

* Clean up: check state of store in feature tests; ellipsize textviews for bookmark item; remove unused attr; format

Co-authored-by: Jonathan Almeida <jalmeida@mozilla.com>
2021-07-09 19:36:20 +00:00
Gabriel Luong 9d3cf79051 For #19916 - Add last viewed tab to home screen
Co-authored-by: Jonathan Almeida <jalmeida@mozilla.com>
2021-06-10 16:22:57 -04:00
mcarare ba218e638b For #18375: Add experiment for set default browser New Tab card. 2021-04-13 17:25:51 +03:00
ekager b7fe809ae4 For #16351 - Make homescreen interactive when search dialog is up 2020-11-18 13:53:33 -08:00
Gabriel Luong 66210469c0
For #9548 - Ability to rename top sites (#16285)
* Ability to rename top sites, closes #9548

* Highlight the "Remove" top site action as destructive

With more menu items in the top site contextual menu, it makes sense to differentiate

* Added test for the top site renaming action

* Fixed lint check (wildcard imports, blank spaces)

* Applied suggestions from code review

* Apply suggestions from code review

Co-authored-by: Gabriel Luong <gabriel.luong@gmail.com>

* Implemented dialog click listener with manual dismiss/cancel

Co-authored-by: Lorenzo Stanco <lorenzo.stanco@gmail.com>
2020-10-30 15:08:04 -04:00
Sawyer Blatz 1f17371df6 For #14565: Add telemetry for top sites 2020-09-17 10:06:39 -07:00
ekager 655d2b8a88 For #12377 - Choice to hide no collections placeholder from homescreen 2020-08-24 16:48:50 -04:00
Mihai Eduard Badea 58e24b81aa For issue #12400 - Refresh swiped collection tab view
Item is now refreshed by calling notifyDataSetChanged on the adapter when the last tab from the collection has been swiped away and the user cancels the deletion by pressing the cancel button from the dialog.
Also added a "wasSwiped" flag to onCollectionRemoveTab in order to check if the tab was deleted from a swipe action and not by pressing the "X" button.
2020-07-31 12:48:32 -04:00
ekager e5e62fa79a For #6846: Added quick actions for nav bar in home 2020-07-27 13:28:28 -04:00
Jeff Boek 2861421312 For #11112 - Adds save tabs to collection button to the no collections message 2020-06-23 08:17:55 -07:00
Jeff Boek 52c2fdb310
Remove tab tray feature flag (#11176)
* For #11171 - Removes feature flag for the new tab tray

* For #11171 - Removes all tab references from homeFragment

* For #11171 - Fixes unit tests

* For #11171 - Gets UI tests to compile and HomeScreenTest to pass

* For #11171 - Fixes `deleteMultipleSelectionTest`

* For #11171 - Fixes `openHistoryItemInNewPrivateTabTest`

* For #11171 - Fixes `openHistoryInPrivateTabTest`

* For #11171 - Fixes `openHistoryInNewTabTest`

* For #11171 - Fixes `openNewPrivateTabTest`

* For #11171 - Fixes tabbedBrowsingTests

* For #11171 - Fixes SettingsPrivacyTest

* For #11171 - Fixes TopSitesTest

* For #11171 - Fixes lint errors

* Ignore
2020-06-05 12:59:08 -05:00
Sawyer Blatz 7067e5c000
For #8125: Add default top site telemetry (#10752) 2020-05-22 13:10:09 -07:00
Sawyer Blatz dce16964c0
For #9208: Adds in-product prompt to homescreen (#9836) 2020-04-22 14:29:43 -07:00
Mihai Adrian dfded8e69c
For #9687: Refactor onboarding cards to follow app architecture (#9743)
* For #9687: Refactor onboarding cards to follow app architecture

* For #9687: Update unit test to new controller parameters
2020-04-06 11:00:47 -07:00
mcarare df80a5240b For #6607 Add button to no tab content pane 2020-02-28 13:21:22 -08:00
mcarare 372b1e7f0e For #6980: Update Private browsing card.
Added test to description.
Added link to settings.
Updated unit tests.
2020-02-13 14:13:57 -08:00
Gabriel Luong 192eecdf5b For #6758 - Part 7: Add menu for opening a top site in private tab and removing a top site 2020-01-24 15:18:25 -08:00
Gabriel Luong 9ecb67e783 For #6758 - Part 6: Add top site view 2020-01-24 15:18:25 -08:00
Mihai Carare cd853d0d8f For #7029: Navigate to Search Fragment when pressing Start browsing 2020-01-21 16:26:43 -08:00
Gabriel 56b21426eb
For #5574 - Migrate SessionControl to LibState (#6651)
* For #5574 - Part 1: Port TabAction.SaveTabGroup to TabSessionInteractor and SessionControlController. (#6651)

- Introduces the TabSessionInteractor, SessionControlInteractor and SessionControlController classes.
- Removes the TabAction.SaveTabGroup.

* For #5574 - Part 2: Port TabAction.PrivateBrowsingLearnMore to TabSessionInteractor and SessionControlController (#6651)

* For #5574 - Part 3: Port TabAction.ShareTabs to TabSessionInteractor and SessionControlController (#6651)

* For #5574 - Part 4: Remove unused TabAction.Share and TabItemMenu (#6651)

In #2205, the tab overflow button was removed which would have shown the
TabItemMenu when clicked. So, we can remove TabItemMenu since it is not
used and as a result, we can also remove TabAction.Share since there are
no consumers.

* For #5574 - Part 5: Port TabAction.PlayMedia and TabAction.PauseMedia to TabSessionInteractor and SessionControlController (#6651)

* For #5574 - Part 6: Port TabAction.Select to TabSessionInteractor and SessionControlController (#6651)

* For #5574 - Part 7: Port Onboarding.Finish to OnboardingInteractor and SessionControlController (#6651)

* For #5574 - Part 8: Port TabAction.Close and TabAction.CloseAll to TabSessionInteractor and SessionControlController (#6651)

- Removes TabAction

* For #5574 - Part 9: Port CollectionAction.Delete to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 10: Port CollectionAction.ShareTabs to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 11: Port CollectionAction.AddTab and CollectionAction.Rename to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 12: Port CollectionAction.RemoveTab to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 13: Port CollectionAction.OpenTab to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 14: Port CollectionAction.CloseTabs to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 15: Introduce a HomeFragmentStore (#6651)

- We will hook up the HomeFragmentStore in later parts.
- Removes List<Tab>.toSessionBundle(context: Context) since it is unused.

* For #5574 - Part 16: Port CollectionAction.Collapse and CollectionAction.Expand to CollectionInteractor and SessionControlController (#6651)

- We assume the store is hooked up to the SessionControlController in this part,
but this work will be done in a later part.
- Removes CollectionAction.

* For #5574 - Part 20: Remove the architecture module. (#6651)

* For #5574 - Part 17:  Remove duplicate subscribeToTabCollections in BrowserFragment.kt (#6651)

There is a duplicate call of subscribeToTabCollections() in both HomeFragment and BrowserFragment.
In this patch, we remove the call in BrowserFragment to avoid passing the HomeFragmentStore to
BrowserFragment in order to dispatch the CollectionsChange event.

* For #5574 - Part 18: Delete SessionControlComponent and fix TabCollection and Tab imports (#6651)

* For #5574 - Part 19: Use the new HomeFragmentStore in the HomeFragment (#6651)

- Renames SessionControlUIView to SessionControlView

* For #5574 - Part 21: Fix white screen on home fragment (#6651)

* For #5574 - Part 22: Fix formatting in SessionControlInteractor and replace See with @see in SessionControlController (#6651)

* For #5574 - Part 23: Move to metrics.track call to the beginning of handleCollectionRemoveTab (#6651)

This ensures that the metrics.track will be called immediately before the tab is removed from the collection.

* For #5574 - Part 24: Use the sessionManager getter in SessionControlController (#6651)

* For #5574 - Part 25: Use mapNotNull in List<Tab>.toSessionBundle (#6651)

* For #5574 - Part 26: Simplify closeTab and closeAllTabs functions by assigning a deletionJob constant (#6651)

* For #5574 - Part 27: Replace listOf() with emptyList() in removeAllTabsWithUndo (#6651)

* For #5574 - Part 28: Replace the Context parameter with the HomeActivity in SessionControlController (#6651)

* For #5574 - Part 29: Add test for HomeFragmentStore, DefaultSessionControlController and SessionControlInteractor (#6651)

* For #5574 - Removes running CI against the architecture debug build varient
2019-12-04 22:06:05 -05:00