This is needed to prevent removed search groups from coming back after
user interacts with the tab. E.g. if we don't fire this action, upon
interaction with the tab after a corresponding search group was removed
we will end up creating metadat with the deleted 'searchTerms' (they'll
be read from the 'historyMetadata' state on the tab).
At this point we probably want to start encapsulating all of this in a
use case - let's do that separately in
https://github.com/mozilla-mobile/android-components/issues/11309, and
just fix the bug for now.
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.
This moves the group removal logic to the place where the groups are
actually formed. This helps clean-up the fragment code a bit, and
removes the awkward 'allow mutate some random internal state' API from
the provider.
* For #22146 - Added counter for home screen views
* For #22146 - Added PR number to metrics
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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.
* For #22145 - Added telemetry to the opening screen preference.
* For #22145 - Added PR number to metric
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* For #22298 - Added telemetry to inactive tabs CFR
* For #22298 - added PR issue number to metrics
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
findLoginToUpdate() should be suspend, but I didn't get mark it that way
on the initial logins work. Let's make this one suspend, then I can
update findLoginToUpdate() in a-c.
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.
Changing the download file name length to the max allowed by AS (251 char, won’t compile if more; max would be 260 for latest windows versions, but generally it is 255), and changing the UI test to check if the long file name is fully visible.
Changing the downloaded dialog layout to properly display really long file names.
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.
When you want to look at one of these markers, you usually want to look
at all three so I found that having them on a single track was easier to
follow. Since they run in sequence, they should never overlap and that
should minimize confusion.
* 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>
* 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>