Commit Graph

1266 Commits (1f633edd7d4436f20ead4ba657b1284b94cca0c6)

Author SHA1 Message Date
jhugman 82a6f8cae4
First use of Nimbus FML plugin (#23400)
* Consume Nimbus FML plugin

* Convert Homescreen to use FML

* Convert nimbusValidation to use FML

* Convert legacy experiments to use the feature API and FML

Remove dead helper code and documentation

* Fixup failing test

Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2 years ago
Matt Tighe d23fb30151 replace WallpaperFeatureDiscovered probe with WallpaperSettingsOpened 2 years ago
Matt Tighe a419a6963c add events based on feedback 2 years ago
Matt Tighe a5f540568e update based on PR feedback and data review 2 years ago
Matt Tighe eed42ee96b closes #23381: add telemetry for wallpapers feature 2 years ago
Gabriel Luong e5e7e6dbcf For #23409 - Specify fetchProvidedTopSites parameter for TopSitesConfig 2 years ago
Sarah541 ef5966cddd
For #22576 - Indicate mutability flag for PendingIntent
* For #22576 - Indicate mutability flag for PendingIntent

* Fix lint issues

* Make Analytics Pending Intent flag mutable

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2 years ago
Sammy Khamis 7d34fbb87d fix fenix crashing when trying to add an invalid bookmark 2 years ago
Arturo Mejia dc0f50b590 For #22851: Load wallpapers dynamically from the assets directory. 2 years ago
Sammy Khamis 088339c4de changes to fix up issues with places uniffication 2 years ago
Gabriel Luong bbf6ce3f0c For #23121 - Replace @drawble/ic_share with @drawable/mozac_ic_share 2 years ago
Gabriel Luong ca67b0a752 For #23121 - Replace @drawble/ic_top_sites with @drawable/mozac_ic_pin 2 years ago
Gabriel Luong 541c56b589 For #23121 - Replace @drawble/ic_login with @drawable/mozac_ic_login 2 years ago
Gabriel Luong ef026d3ec2 For #23121 - Replace @drawble/ic_download with @drawable/mozac_ic_download 2 years ago
Gabriel Luong ad33e3c1e1 For #23121 - Replace @drawble/ic_desktop with @drawable/mozac_ic_device_desktop 2 years ago
Gabriel Luong ae38410106 For #23121 - Replace @drawable/ic_new with @drawable/mozac_ic_new 2 years ago
Gabriel Luong 9352946afc For #23121 - Replace @drawable/ic_addons_extensions with @drawable/mozac_ic_extensions 2 years ago
Roger Yang f8b0dd6e7e No issue: Remove showHistorySearchGroups feature flag 2 years ago
mcarare a6abaf7cf9 Set a minimum number of sites a search group should contain. 2 years ago
Gabriel Luong 70882179a0 For #23304 - Add a setting for enabling Contile 2 years ago
Roger Yang 829c06ebe4 Close #23250: Remove duplicate sites within a time period in history 2 years ago
Gabriel Luong 26b65a2a23 For #22727 - Add Contile to Top Sites 2 years ago
Matt Tighe 0b99c2e67d fixes #22943: update androidx.lifecycle to 2.4.0 2 years ago
Alexandru2909 cf83b3050b For #8108 - Add BrowserToolbar option to remove url from TopSites 2 years ago
Roger Yang 047ec890b2 Closes #22550: Refactor search term tab grouping logic to rely on middleware 2 years ago
MickeyMoz 96b96fbfdb Update Android Components version to 97.0.20220104190053. 2 years ago
Gabriel Luong ddc806e8bc For #22978 - Replace @color/foundation_normal_theme with @color/fx_mobile_layer_color_1 2 years ago
rxu 2203ebf923 Pass distribution_id to Socorro crash report 3 years ago
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.
3 years ago
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.
3 years ago
Arturo Mejia 7a44412619 For #22851 toggle wallpapers when tap on the Firefox logo 3 years ago
rxu 073fd89390 Add default topsite MeiTuan for MozillaOnline builds 3 years ago
mcarare bbf0ccca54 For #22450: Replace quit icon with AC one. 3 years ago
Grisha Kruglov 8de4c0b4db For #22569: Remove allopen plugin and Mockable annotations 3 years ago
Gabriel Luong 2c22622edb For #22836 - Replace primary_text_private_theme with fx_mobile_private_text_color_primary color token 3 years ago
Gabriel Luong 543f2000af For #22793 - Rename fx_mobile_icon_color_notice color token to fx_mobile_icon_color_information 3 years ago
Matt Tighe fee26e62a8 Fixes #22688: remove inactive_tabs_recently_closed probe 3 years ago
mcarare 0cb4059b12 For #17130: Replace hardcoded strings with string resources. 3 years ago
Christian Sadilek ae0dba29b1 Prevent flash when navigating to home 3 years ago
Gabriel Luong 596072729d For #22701 - Replace whats_new_notification_color with fx_mobile_icon_color_notice color token 3 years ago
Christian Sadilek 26713a58c8 Refactor: Move historymetadata classes in separate package 3 years ago
rxu 4d9a58c156 Add distribution_id into first session ping 3 years ago
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>
3 years ago
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
3 years ago
Gabriel Luong 91da5318e3 For #22211 - Use Hero images for Recent Bookmarks 3 years ago
Sebastian Kaspari e341109ced Issue #12731: Disable suspending of engine sessions under memory pressure in Nightly 3 years ago
Grisha Kruglov 413ff7cd85 Closes #22499: Emit search group disband action on history group removal
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.
3 years ago
Arturo Mejia 74406bef59 For issue #5298 the same page appears in the History section multiple times 3 years ago
Grisha Kruglov 77672dfa15 Post: move group removal logic into PagedHistoryProvider
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.
3 years ago
Grisha Kruglov 45d4807bfe Closes #22472: Filter out redirects from History search groups 3 years ago
Noah Bond dde916038d
MR2 Telemetry: Homescreen view count (#22377)
* 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>
3 years ago
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.
3 years ago
Mugurell 17865bdf66 For #22147 - New search term groups telemetry 3 years ago
Noah Bond 2e5555d034
MR2 telemetry - Inactive tabs CFR (#22301)
* 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>
3 years ago
Grisha Kruglov 9a4a4713ac No issue: clean up code duplication in PagedHistoryProvider 3 years ago
Roger Yang 04618983aa Close #22299: Add history search term group telemetry 3 years ago
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.
3 years ago
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>
3 years ago
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>
3 years ago
Arturo Mejia 2061779938 For #22170 record auto-close prompt telemetry events 3 years ago
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>
3 years ago
Roger Yang a46905b5e7 Issue #22057: Add search term groups telemetry 3 years ago
Roger Yang 4e5c9a3440 Close #22172: Add Recent searches telemetry 3 years ago
Roger Yang 9c970a5276 Close #22103: Add recent bookmarks telemetry 3 years ago
Elise Richards e4cc22fb71 For #22175: Telemetry event for deleting a search term group from the recent searches section on home 3 years ago
Jonathan Almeida 9cef9357b1 Close #20704: Add AppStore to Components 3 years ago
Arturo Mejia 940af156eb For #22192 add telemetry for studies 3 years ago
Arturo Mejia a2c7dfb26e For #22170: Add telemetry for the auto-close prompt 3 years ago
Grisha Kruglov 04a35c81b8 Closes #22083 - Match history groups to history pages by all items within the group
When deciding if we should include a history group within the "page of
history" results on the History View UI, we used to look at the most
recent timestamp of the metadata items within the group, and see if that
falls within the range of the timestamps of the history page, +/- some
buffer.

This assumes that each metadata entry will have a corresponding history
item. However, that's not true - when restarting the app, the selected
tab will be restored, and when opening History View right after we'll
record some metadata for it. However, we won't record a history visit
during the app restore for the selected tab.

That's all correct, but the assumption around group matching to history is now incorrect.

This patch changes the logic to instead look at every item within the
group, and see if any of them match the time window of the current
history page. This has a side-effect of also displaying search groups
multiple times on diffenent pages of history, if it makes sense to do so chronologically.
I think that's fine, it reflects reality at least (e.g. items within the
group may have been visited at very different points in time).

Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
Gabriel Luong b04bf99b7d For #21776 - Remove unused symbols 3 years ago
Gabriel Luong b54698a3f2 For #21776 - Class member can have 'private' visibility 3 years ago
Gabriel Luong ed48dc934a For #21776 - Remove reductant 'suspend' modifier from SecurePrefsTelemetry 3 years ago
codrut.topliceanu bba787e87e For #21732 - Adds inactive tabs survey on disable + telemetry 3 years ago
Sebastian Kaspari 170fa9705e Update Kotlin and Jetpack Compose versions. 3 years ago
Mugurell c4278bfbf6 For #21841 - New telemetry for Google and Baidu top sites removal 3 years ago
Noah Bond 826249497a
MR2 Inactive tabs telemetry (#21908)
* For #21903 - Added telemetry for interacting with inactive tabs

* For #21903 - Added missing inactive tab delete count event to delete all event

* For #21903 - Added PR numbers to metrics

* For #21903 - Updated broken unit tests. Resolved critical lint warning.

* For #21903 - Fixed inactive tabs setting toggle metric

* For #21903 - Updated FenixApp unit test

* For #21903 - Updated newline character in Metrics. Set inactive tab metrics' lifetime to default. Updated expiration to Nov 2022. Refactored inactive tabs metric to be a single metric.

* PR: addendum for last commit that missed a file

* For #21903 - Changed logic check for reporting inactive tab count

* PR: fixed merge conflict

* For #21903 - Removed tab close tracking when the user closes ALL inactive tabs

* For #21903 - Removed individual tab close metric verify from CLOSE ALL test

* For #21903 - Updated inactive tabs toggle setting expiration to match the expiration of the other events

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
3 years ago
Grisha Kruglov 97d93eb564 Make linters happy 3 years ago
Ben Dean-Kawamura cc247c407f Register the logins key provider
This is required for sync to work
3 years ago
Ben Dean-Kawamura 34ec442961 Updating Fenix to work with the new logins API
Switched to always using `Login` instead of the `SavedPassword` alias.

Made `MasterPasswordTipProvider.saveLogins()` call
`importLoginsAsync()`.  This is needed because it's the only method that
inputs a `Login` rather than a `LoginEntry`.

Moved the `SavedLoginsStorageController.kt.syncAndUpdateList` call
to inside `add()` and `update()`.  This simplifies the error handling a
bit.

Refactored dupe-checking code to use findLoginToUpdate()

Refactored `AddLoginFragment` / `EditLoginFragment` to put the username
error handling code all in 1 method.  I think it's easier to follow the
logic of showing/hiding the error labels when it's all in one place.
This fixes issues #24103 and #24104.  I would love to address #24102,
but I'm not sure what the correct behavior is there so I just kept that
the same.
3 years ago
MickeyMoz 1cbdb6e684 Update Android Components version to 95.0.20211008105820. 3 years ago
Mugurell 507801e5d5 For #21623 - Pocket recommended stories telemetry 3 years ago
Arturo Mejia 2b363b9868 For #21618: Integrate Nimbus with MR2 Home Page to enable experimentation 3 years ago
Christian Sadilek 8f187af9ae Make search term grouping tolerant to (parent tab) navigation
Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
3 years ago
Gabriel Luong 15d1a0aa17 For #21551 - Add delete history metadata in the History view
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
Grisha Kruglov 0d9e2b3a36 Do not show home screen behind search if we have search terms
Home screen isn't actually visible in case we're displaying awesomebar
search results. The navigation is thus unnecessary and actually causes visual
jankiness as we display home for a moment before covering it up with
search results.
3 years ago
Michael Comella 365983d4b0 For #21294: suppress MaxLineLength in Fact.toEvent.
These double comparisons are easier to read and see the pattern of on one line
so I'd rather keep them on one line. Additionally, it's difficult to
test each change individually so I'd rather not make additional changes.
To do this, I suppressed the max line length warning.
3 years ago
Michael Comella c10f41164d For #21294: remove allocations in Fact.toEvent.
This commit was generated primarily by a macro that:
- appends `== component &&`
- appends `== item`
- (if applicable) Skips to the ending brace
- Go down one line and move cursor to the front of the line to prep for repeat

My only intervention was to skip extra lines to line it up to run again
and specify how many times in a row it should run.

---

The `to` in this code is an infix function that calls instantiates a
Pair under the hood. Subjectively observed, when this method is called
it generally hits the else case so 35 Pairs are instantiated each call -
that's 560 bytes. This method is called frequently - for example, an estimated
4 times each time a letter is typed on the homescreen and a measured 116 times
in a simple navigation (see the issue). The latter generates an estimated
63.4 KiB.

It was straightforward to remove these allocations so that's what this
change does.

The primary risk from this change is that it's difficult to test each
case to ensure it's working.
3 years ago
Michael Comella d33e38e020 For #21294: change `when (condition) {` `when {` in Fact.toEvent.
This will not compile. However, it enables the subsequent PR to remove
allocations from Fact.toEvent.
3 years ago
Christian Sadilek 54549c49ec Fix mapping between history visits and groups to use createdAt
We currently have a 15s buffer to match metadata to its corresponding
visit. However, a existing metadata record can be updated more than
15s after it was created e.g. when closing the tab and updating
the view time.
3 years ago
Christian Sadilek d830006984 For #20893: Dedupe urls/site in history groups 3 years ago
Gabriel Luong 90d7927b2f Issue #21117 - Modify layout for items displayed under "Recently Visited" in the HomeScreen to follow latest UX designs 3 years ago
Arturo Mejia c05fbfb6c3 For #21239 improve telemetry values for Allow users to customize their home screen 3 years ago
Gabriel Luong 98b218d964 For #21413 - Remove unused OnboardingPrivateBrowsingViewHolder and OnboardingWhatsNewViewHolder 3 years ago
Sebastian Kaspari 6d99c34f12 Issue #21172: Replace BrowserAwesomeBar view with AwesomeBar() composable. 3 years ago
Gabriel Luong d9847f9525 For #21408 - Pass the corresponding HistoryMetadataKey to openToBrowserAndLoad and addTab use case 3 years ago
Gabriel Luong 2ae7d5d593 For #20893 - Search term groups in history 3 years ago
Arturo Mejia 3272de1364 For #21239 add telemetry for Allow users to customize their home screen 3 years ago
rxu e6395bff97 Add default topsite 58 for MozillaOnline builds 3 years ago
Arturo Mejia fe914dc964 For #21226 only show the "Customize Home" menu on home screen. 3 years ago
Arturo Mejia d4a212f235 For #21095 allow users to configure their home screen. 3 years ago