Commit Graph

1205 Commits

Author SHA1 Message Date
mavduevskiy
89f5e96d73
For #18160: Show a prompt when trying to leave private browsing with active downloads (#22912)
Co-authored-by: mike a <mavduevskiy@gmail.com>
2021-12-22 00:12:44 -08:00
Grisha Kruglov
5bbfd49e1d Refactor History types to eliminate nullability
This introduces a separate HistoryDB type at the PagedHistoryProvider
layer, that doesn't need to deal with positions. Positioning logic in
HistoryDataSource becomes a type conversion between the new type and an
existing History type that UI and ItemKeyedDataSource API is written against.

With this refactor, we entirely eliminate nullability from these types.
2021-12-21 19:54:18 +00:00
Grisha Kruglov
836ff1151b Closes #22764: Convert History.id to an Int position
We were converting Long timestamps into Ints (and getting negative
numbers back), and treating that as, basically, a position for the
paging API; the paging API would pass us back the obscure negative
number back as an offset, and we'll mishandle it resulting in an
infinite loop.

This patch removes all of the Long -> Int conversions, and introduces an
explicit 'position' that is calculated once we have a full page of
results completed.
2021-12-21 19:54:18 +00:00
Mugurell
34c0a17b4d For #22852 - Add a new "Storage access" permission 2021-12-21 17:45:19 +00:00
mcarare
00280d3b65 For #20513: Use UrlMetricType for search engine submission url. 2021-12-21 11:25:00 +00:00
Roger Yang
26198330e9 Closes #22671: Show correct time groups header in history 2021-12-17 16:32:56 +00:00
Grisha Kruglov
33af7d8729 Fix breaking change in KeyProvider
`key` was renamed to `getOrGenerateKey` and is now a `suspend`.
2021-12-15 22:57:06 +00:00
Grisha Kruglov
8de4c0b4db For #22569: Remove allopen plugin and Mockable annotations 2021-12-15 12:59:57 +00:00
Matt Tighe
edcccc2f4c fixes #20833: move home recycler bottom margin into standalone item 2021-12-14 22:31:05 +00:00
Matt Tighe
fee26e62a8 Fixes #22688: remove inactive_tabs_recently_closed probe 2021-12-10 23:20:26 +00:00
mcarare
0cb4059b12 For #17130: Replace hardcoded strings with string resources. 2021-12-10 14:44:39 +00:00
aime Soriano Pastor
9bfc94b793 For #9294: Add option to clear current site data in quick settings dialog. 2021-12-09 23:08:08 +00:00
MickeyMoz
07d43971c0 Update Android Components version to 97.0.20211208143435. 2021-12-09 11:41:37 +00:00
Christian Sadilek
229c410437 Introduce timeout for capturing thumbnail in BrowserAnimator 2021-12-07 22:28:44 +00:00
Christian Sadilek
ae0dba29b1 Prevent flash when navigating to home 2021-12-07 22:28:44 +00:00
Christian Sadilek
26713a58c8 Refactor: Move historymetadata classes in separate package 2021-12-02 22:28:58 +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
Noah Bond
de1c6b0dae
Tab group count telemetry (#22479)
* For #22410 - Refactored tab sorter metrics into a middleware

* For #22410 - Created distribution metric for tab group sizes

* For #22410 - Created tests for tabs tray middleware

* For #22410 - Merge fixes

* For #22410 - Added PR number to metric

* For #22410 - Fixed unit tests post merge. Added waitUntilIdle to new tests.

* For #22410 - Added missing line to middleware to have the Store process actions

* For #22410 - Updated metric expiration to December

* For #22410 - PR Feedback

* For #22410 - Removed else from middleware when
2021-11-29 18:16:57 +00:00
Gabriel Luong
7c2d9bd8a8 For #22595 - Remove unused OnboardingAutomaticSignInViewHolder 2021-11-26 20:44:07 +00:00
Gabriel Luong
91da5318e3 For #22211 - Use Hero images for Recent Bookmarks 2021-11-25 20:35:55 +00:00
Arturo Mejia
a49f80d5e8 Update Android Components version to 96.0.20211125162700. 2021-11-25 14:26:21 -05:00
Arturo Mejia
3f86a5d6f9 Improve loading URLs 2021-11-25 14:26:21 -05:00
Mugurell
548efefcbb For #22442 - Don't display individual tab if part of the Jump back in tabs group
We'll show as a recent tab the next most recent tab not part of the last active
search group.
2021-11-25 09:16:15 +00:00
Mugurell
685da115c9 For #22442 - Don't display history group if already in Jump back in 2021-11-25 09:16:15 +00:00
Gabriel Luong
dc15ee2415 For #22488 - Fix intermittent test failure with InactiveTabsControllerTest 2021-11-24 19:49:45 +00:00
Gabriel Luong
749da13516 For #22250 - Convert Recent Bookmarks to Jetpack Compose 2021-11-24 19:10:48 +00:00
Arturo Mejia
74406bef59 For issue #5298 the same page appears in the History section multiple times 2021-11-22 14:18:42 -05:00
Grisha Kruglov
63154a18f9 Closes #22484 - Track direct loads per tab; fix search term lookup
This patch fixes two problems:
1) We were treating "direct tab load" as an event which applies
   uniformally to all tabs, even though it's actually an event which
   happens for a specific tab. This lead to background tabs (pages opened as new tab)
   setting the direct load flag, and then a simultaneously loading
   parent tab would incorrectly interpret that flag for itself.

   The patch switches this tracking from a simple boolean (are we direct
   loading?) to a set of tab IDs that are currently direct loading.

2) In a case when a background tab was loading with a parent who's
   search terms were cleared by a direct load, we were not trying to
   lookup search terms on the background tab's historyMetadata key,
   which exists to capture search terms for this exact scenario.

   The patch adds an additional fallback lookup for that path.
2021-11-18 15:52:01 +00:00
Grisha Kruglov
45d4807bfe Closes #22472: Filter out redirects from History search groups 2021-11-17 16:48:25 -05:00
Roger Yang
24e4452cb5 Close #22402: Add top placeholder for home 2021-11-16 23:05:45 +00:00
Mugurell
d4a6facd81 For #22155 - Store inactive tabs count telemetry when user opens tabs tray
Setting this value in FenixApplication.onCreate was buggy because of a race
with restoring BrowserState.
Setting it here would ensure a better granularity of the events and so to more
accurate reporting.
2021-11-16 21:04:16 +00:00
Mugurell
17865bdf66 For #22147 - New search term groups telemetry 2021-11-16 16:40:07 +00:00
Arturo Mejia
94a543a403 For #22271 Improve URL accessing from the clipboard for Android 12 and above. 2021-11-15 15:24:52 +00:00
Jonathan Almeida
e3b6e00331 Close #22223: Move to the selected page when switching modes 2021-11-10 18:25:44 +00:00
Grisha Kruglov
9a4a4713ac No issue: clean up code duplication in PagedHistoryProvider 2021-11-09 23:41:54 +00:00
Jonathan Almeida
8ced675817 No issue: Correct TabsTrayAction naming 2021-11-08 22:28:31 +00:00
Jonathan Almeida
08b15689b1 Close #22305: Use TabsTrayStore for populating adapters 2021-11-08 22:28:31 +00:00
Jonathan Almeida
f16300392d Close #22305: Add tab state into the TabsTrayStore 2021-11-08 22:28:31 +00:00
Mugurell
953f6feb17 For #22155 - The inactiveTabsCount probe reports actualInactiveTabs number 2021-11-08 12:32:39 +00:00
Mugurell
f9b67091c6 For #22155 - New BrowserState.actualInactiveTabs public method
This allows querying from all throughout the app which of the current tabs are
inactive while taking into consideration whether the feature is enabled or not
such that when the feature is disabled it will always return an empty result.
2021-11-08 12:32:39 +00:00
Sebastian Kaspari
8c9f0c835a Closes #21695: ThreadPenaltyDeathWithIgnoresListener: Ignore stack traces containing InstrumentationHooks class 2021-11-05 18:21:34 +00:00
Roger Yang
04618983aa Close #22299: Add history search term group telemetry 2021-11-04 22:08:56 +00:00
Grisha Kruglov
294997e559 No issue: history view search group missing
Our boundary conditions for matching search groups to visits was wrong.

This change switches the boundary buffer to only be applied to history
items, not the metadata items.

In other words, when checking if any of the metadata items match the
current "page" of history, we'll be looking to see if the item falls
within this time window:
buffer - oldest history item <= metadata item <= newest history item +
buffer

There's a separate problem with buffer though: it's reset to 0 when requested
offset is >0, but that requires a larger refactor of this code, for a
separate PR.
2021-11-04 16:02:18 +00:00
Elise Richards
4f55f16bd7
For #21313: Remove expiring/unused metrics for December (#21789)
* Remove crash reporter metrics

* Remove tab counter menu item probe

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-11-04 03:54:18 +00:00
Christian Sadilek
76bb0c3b37 Closes #21659: Add SERPs to history search groups 2021-11-03 23:19:46 -04:00
Noah Bond
8caefbe2d5
Recent bookmark count telemetry (#22293)
* For #22075 - Added event to track the count of recent bookmarks

* For #22075 - Added data review issue number

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-11-04 00:14:21 +00:00
Arturo Mejia
cff78afe27 For #22078 Selecting search group in Jump back in switches active tab 2021-11-03 22:02:22 +00:00
Arturo Mejia
5a11985d22 No issue: Address tracking protection exceptions breaking changes 2021-11-03 13:01:05 -04: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
Jonathan Almeida
9bb49585ea No issue: Merge our inactive tab interactor/controllers 2021-11-02 17:12:45 +00:00