Commit Graph

4299 Commits (6c59fd424b7488eb2b847792c669e11e7467750c)

Author SHA1 Message Date
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
Jonathan Almeida e3b6e00331 Close #22223: Move to the selected page when switching modes 3 years ago
Grisha Kruglov 9a4a4713ac No issue: clean up code duplication in PagedHistoryProvider 3 years ago
Ben Dean-Kawamura df953b0021 Make findDuplicate() suspend
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.
3 years ago
Jonathan Almeida 8ced675817 No issue: Correct TabsTrayAction naming 3 years ago
Jonathan Almeida 08b15689b1 Close #22305: Use TabsTrayStore for populating adapters 3 years ago
Jonathan Almeida f16300392d Close #22305: Add tab state into the TabsTrayStore 3 years ago
Michael Comella c026d8b28a For #21084: put git hash on About screen in release builds. 3 years ago
Mugurell 953f6feb17 For #22155 - The inactiveTabsCount probe reports actualInactiveTabs number 3 years ago
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.
3 years ago
Sebastian Kaspari 8c9f0c835a Closes #21695: ThreadPenaltyDeathWithIgnoresListener: Ignore stack traces containing InstrumentationHooks class 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
Michael Comella 7d67b84a92 For #22177: add SearchDialogFragmentConstraintLayout; has markers.
Here's a profile with these changes: https://share.firefox.dev/3vTpZha
3 years ago
Michael Comella bc6d8be9c1 For #22177: change onMeasure/onLayout markers into a single track + draw.
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.
3 years ago
Michael Comella ed8f2c0bc3 For #22177: rename RootLinearLayout -> HomeActivityRoot...
This is so we can be more specific with the detail text in our markers.
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
Christian Sadilek 76bb0c3b37 Closes #21659: Add SERPs to history search groups 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 cff78afe27 For #22078 Selecting search group in Jump back in switches active tab 3 years ago
Matt Boris 1809bea49d For #22281 Fix studies opt out learn more link 3 years ago
Michael Comella 0c079fde91 Closes #22213: add marker for LayoutInflater.inflate.
Here is a profile with this change: https://share.firefox.dev/3mlQSHu
3 years ago
Arturo Mejia 2061779938 For #22170 record auto-close prompt telemetry events 3 years ago
Roger Yang 930599407c No issue: Show snackbar when opening non-http URL 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
Jonathan Almeida 9bb49585ea No issue: Merge our inactive tab interactor/controllers 3 years ago
Jonathan Almeida f363b145f2 No issue: Remove unused InactiveTabState code 3 years ago
Mugurell 207e85e59d For #22155 - Inactive tabs count telemetry
A quantity probe in the metrics ping means we'll loose the granularity events
provided but it will be easier to extract the values.

For reporting whether the inactive tabs feature is enabled or not we already
have the "preferences.inactive_tabs_enabled" probe so I didn't duplicate this.
3 years ago
Roger Yang a46905b5e7 Issue #22057: Add search term groups telemetry 3 years ago
Mugurell 018fe15072 For #22138 - Install source metrics probe 3 years ago
Mugurell 9cce30b824 For #22226 - Open grouped history entries the same as individual ones 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 8c43ccc0f6 Issue #20704: Use AppStore for inactive expanded state 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
Gabriel Luong 09bd9e7ba2 For #21888 - Use Hero images for Jump back in 3 years ago
Arturo Mejia d0d87a6d6d No issue update strings ids 3 years ago
Gabriel Luong 959a142c92 For #21973 - Use destructive_normal_theme in place of R.color.design_color 3 years ago
Michael Comella 9721723af5 For android-components#11161: pass profiler into AwesomeBar.
This will add two new markers:
- SuggestionFetcher.fetch
- Suggestion update

This is a profile with the markers: https://share.firefox.dev/3E4PbEk
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
Arturo Mejia d943be0e53 For #22034: Inactive tabs prompt is redisplayed after dismissing by turning on Auto close 3 years ago
Gabriel Luong 44666ca2ca For #21776 - Call chain on collection type may be simplified 3 years ago
Gabriel Luong 100547130e For #21776 - Add package path to TabGroupViewHolder 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 3115f1343f For #21776 - Replace Java static method with Kotlin analog 3 years ago
Gabriel Luong 660300f770 For #21776 - Replace 'isEmpty' with 'ifEmpty' 3 years ago
Gabriel Luong 603ba63962 For #21776 - 'protected' visibility is effectively 'private' in a final class 3 years ago
Gabriel Luong 5afe393b8f For #21776 - Remove unused imports 3 years ago
Gabriel Luong 76c746b982 For #21776 - Remove unnecessary type argument 3 years ago
Gabriel Luong 6d1d4bea93 For #21776 - Remove redundant qualifier name 3 years ago
Gabriel Luong 1039a92281 For #21776 - Remove reductant SAM constructor 3 years ago
Gabriel Luong ed48dc934a For #21776 - Remove reductant 'suspend' modifier from SecurePrefsTelemetry 3 years ago
Gabriel Luong d854c282da For #21776 - Remove val from constructor parameter that are never used as a property 3 years ago
codrut.topliceanu bba787e87e For #21732 - Adds inactive tabs survey on disable + telemetry 3 years ago
Mugurell 6d62aed35f For #21933 - Refresh history items everytime the fragment is opened 3 years ago
Jonathan Almeida 7666f0e4c2 No issue: Replace TabsTray.Tab with TabSessionState
Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
3 years ago
Roger Yang 367c5f42d8 No issue: Add external load flag 3 years ago
Sebastian Kaspari 170fa9705e Update Kotlin and Jetpack Compose versions. 3 years ago
Arturo Mejia ee8c4de62d For #21986 Confirmation when people set tabs to auto-close
For #22034 Inactive tabs prompt is redisplayed after dismissing by turning on Auto close
3 years ago
Mugurell e0bf4f31fa For #21771 - Show url when recent tab's title is not available
This is the same previously used approach and the same used for tabs tray.
3 years ago
Michael Comella ec1a25dfcf For #21921 - post: switch generic marker skip to BaseBrowserFragment.
Since we instrument the marker with the duration in BaseBrowserFragment,
we should skip on BaseBrowserFragment too, not its subclass,
BrowserFragment.
3 years ago
Michael Comella 788eb2c5de For #21921: add duration for some BrowserFragment lifecycle markers.
Here is a sample profile with all the new markers:
https://share.firefox.dev/3lCGoD2
3 years ago
Michael Comella 3a3c39406a For #21921: add durations for some HomeFragment lifecycle markers. 3 years ago
Michael Comella f65ea1e972 For #21921: add and register MarkersFragmentLifecycleCallbacks. 3 years ago
Michael Comella 99533626f1 For #21921: rename MarkersLifecycleCallbacks to ...ActivityLifecycle...
This is to disamibugate with the MarkersFragmentLifecycleCallbacks that
we'll be adding.
3 years ago
Michael Comella 623914bd89 For #22054: add marker for root view layout/measure.
The onLayout marker may be redundant to onGlobalLayout marker but I'm not
sure yet so let's leave them both in and observe if that's the case.

Here's a profile with the markers: https://share.firefox.dev/3lZaOQb
3 years ago
Mugurell acdde511d3 For #22070 - Prevent crash for when a selected topic does not exist anymore
The list of selected topics overwrites old data whenever user selects or
deselects another so the old selections will not leak for long.
3 years ago
Roger Yang 70fc6fc20f Close #22061: Let TabSorter decide if title header should be shown in tabs tray 3 years ago
Roger Yang b5c15280f7 No issue: Only report telemetry when tabs tray is first opened 3 years ago
Mugurell c4278bfbf6 For #21841 - New telemetry for Google and Baidu top sites removal 3 years ago
Michael Comella 0faa61b744 No issue: use Fact.value as detailText for markers.
This allows Facts emitted from ac to provide more details in markers.
3 years ago
Michael Comella 01e3b4b984 No issue: cache SearchDialogFragment.InlineAutocompleteEditText.
Assuming the InlineAutocompleteEditText is not being recreated (and I
did not verify this), it's unnecessary to traverse the view hierarchy
to find it more than once so this patch removes the unnecessary
traversals.
3 years ago
Gabriel Luong 64ca94b8fa For #22022 - Composify Customize Home Button and update the background color 3 years ago
Gabriel Luong ada3da59ec For #22022 - Update SelectableChip button background colors 3 years ago
Gabriel Luong 07a6a386f8 For #21753 - Refactor Pocket out of sessioncontrol 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
Mugurell d3df7369e0
CI for 21827 (#22004)
* Remove redundant calls to setHasOptionsMenu(false)

Fix memory leaks for credit card and login fragments

* Fixes:

Add link to issue tracker
Use activity?.invalidateOptionsMenu() instead of setHasOptionsMenu(false)
Move it inside of 'if' statement to avoid unintended issues when called improperly
Revert changes to AddLoginFragment.kt

* Fix call invocation to redirectToReAuth() from AddLoginFragment.kt
Fix 'when' statement in redirectToReAuth() to use AddLoginFragment

Co-authored-by: Vitaly V. Pinchuk <vetal.978@gmail.com>
3 years ago
Arturo Mejia 846aefc0f4 For #21723 Align the default value of the custom cookie setting with the UI 3 years ago
Roger Yang 60f7f766da Issue #21893: Keep search group when second to last search term tab is removed 3 years ago
Christian Sadilek c3ef16de61 Closes #21944: Top sites rendered slowly on first load of HomeFragment 3 years ago
Grisha Kruglov 0b5b1a738a Do less work while navigating Logins views
Fetching a set of logins from the store is quite expensive. This commit
avoids doing that while navigating back and forth between the list and
detail views:

- retain processes logins state when navigating into detail view
- use the `get` storage api to obtain specific login, instead of
  `list().filter {...}`
- avoid re-sorting retained logins when navigating back into the list
  view
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
Arturo Mejia 25c784b684 For #21906 ⁃ Remove old copy form inactive tabs section 3 years ago
Jonathan Almeida 9780dac846 No issue: Always show Make inactive for debug builds 3 years ago
Roger Yang 2b92860966 Close #21917: Update pocket stories card elevation to match other cards 3 years ago
Jonathan Almeida c554152fba Issue #21707: Correct search grouping logic in extensions
At this moment, we have two extension methods that have duplicate
functionality to construct search term groupings. One on `List<Tab>` and
one on `List<TabSessionState>`. The former is used for everything
related to tabs piped through the `TabsFeature` and the latter is for
consumers of `BrowserState` directly.

The bug occurs because our implementation of search groupings was
updated only on the former extension, but the `HeaderBinding`, that
observes the BrowserState and updates the title visibility, was using
the latter.

Ideally, we remove this duplication when we no longer have separate data
classes for consumers of `TabsFeature`, but this intermediary fix should
suffice.
3 years ago
Grisha Kruglov 233f0a8a1d Closes #21871 - Eagerly update UI state after search group removal
Before this patch, this was the behavior - 'remove' button is clicked, we'd ask
the storage to remove metadata (on its IO thread), then navigate to Home
Screen.

This resulted in a race we could end-up on the Home Screen before delete
finishes, so the search groups do not appear to be removed (but,
refreshing the Home Screen again shows that they are removed).

This also resulted in an unnecessary navigation which felt very janky
(screen will "scroll" to the top) and was way more work than necessary.

After this patch, we:
 - dispatch two actions (on browserstore, on homefragmentstore) which
   remove the search groups from any relevant in-memory state; any UI bound to
   this state will be automatically "refreshed"
 - no longer navigate as part of the remove action, so the UI doesn't
   move and removal happens "in-place"
3 years ago
Christian Sadilek 88fbcc05b7 Handle new OptimizedLoadUrlAction in history metadata middleware
Upgrades to A-C 95.0.20211013154351
3 years ago
Jonathan Almeida 722ab9f3ca Issue #21794: Remove rotation; rely on state activated
It seems like we no longer need to use rotation for the chevron, since
we are now using two different icons within the `ic_chevon` that change
depending on the `state_activated`.
3 years ago
sunil9211 05d0bca6a3 For #17393: Dead code removed around Delete downloads 3 years ago
Arturo Mejia 08256ac68c For #21791 Adds tab auto-close prompt 3 years ago
Arturo Mejia 9439a65e1e For #21838 wait until experiments have been completely opt-out on the nimbus SDK. 3 years ago
Elise Richards 4bd140a0f5 For #21522: Wrap section titles on home 3 years ago
Roger Yang 4ad494075a Issue #21686: Stop using internally stored tabs list in adapters 3 years ago
Mugurell abcc9dfc67 For #21806 - Set 1dp elevation for ListItemTabLarge
To get smaller shadows.
3 years ago
Gabriel Luong d0bb77fc2b For #21809 - Adjust the padding between the Pocket section 3 years ago
MickeyMoz 1cbdb6e684 Update Android Components version to 95.0.20211008105820. 3 years ago
codrut.topliceanu 6edd989152 For #20992 - Speculative fix for TopSitesPagerAdapter crash 3 years ago
Jonathan Almeida 74fd043290 Issue #21686: Move submitList calls into TabsAdapter
Co-authored-by: Roger Yang <royang@mozilla.com>
3 years ago
Noah Bond 8c1a64a5e8 For #21773 - Updated "customize homepage" button to go to the new Homepage submenu in Settings 3 years ago
Christian Sadilek 1b463a5c17 Enable pocket stories in CA 3 years ago
Arturo Mejia 3f9d277566 Prepare nimbus features default values for release 95 3 years ago
Rohan Maity a77091dc5b For #20579: Fix the normal browing tab re-used unexpectedly when open links in private tab enabled or same tab is already avaialble in normal browsing mode 3 years ago
Arturo Mejia 5843fafbb6 For #21765 only activate pocket by default for the right audience 3 years ago
Mugurell 507801e5d5 For #21623 - Pocket recommended stories telemetry 3 years ago
Michael Comella 2c528391da Closes #21424: add marker for StrictMode.resetAfter.
This helps identify file IO. Unfortunately, with this marker, it's
difficult to separate code we own from code we don't own. However, I
wasn't sure what the best implementation would be to address that
(e.g. ideally, we would ignore violations in code we don't own rather than
annotate the markers) so I thought we can land it this simple way and
improve it incrementally.
3 years ago
Gabriel Luong 04e75ace19 For #21756 - Refactor TopSites out of home.sessioncontrol 3 years ago
Noah Bond 1f97ca6ce6
For #21437 - Relocated Home-related settings to its dedicated sub screen (#21722)
* For #21437 - Relocated Home-related settings to its dedicated sub screen

* For #21437 - Updated show top sites toggle text

* PR: Fixed lint warning. Reverted preference keys

* PR: added ignore for UI test

* PR: Added ignore for UI test
3 years ago
Roger Yang 3632ed77d5 No issue: Update Pocket categories spacing to 16dp. 3 years ago
Sebastian Kaspari 099e463b4f Issue #21102: Set compileSdkVersion to 31. 3 years ago
Roger Yang 23e51c250a No issue: Small layout update for Pocket Stories 3 years ago
Gabriel Luong dd20d98779 For #21729 - Refactor SectionHeader to use the right font size 3 years ago
Sebastian Kaspari 5208f74cd7 SearchDialogFragment: Start to split consumeFrom() into independent observers that trigger less often 3 years ago
Arturo Mejia 0f07703c3e For #21611: Show the jump back in Contextual Hints independently of the home onboarding dialog. 3 years ago
Arturo Mejia 7e3a2ba89d For #21574: disabled the homescreen onboarding dialog. 3 years ago
Roger Yang fb345a4131 Close #21573: Update design for jump back in section and recently bookmarked section 3 years ago
codrut.topliceanu b1a5025610 For #21708 - Fixes missing header bottom border
The bottom gray border of the header item from the Inactive Tabs section was correctly set when collapsing or expanding said section, but not on init. So if the section was initialized collapsed the gray border would not be present.
3 years ago
Arturo Mejia bd7476cce4 Update feature flags for 94. 3 years ago
Mugurell 6faafe4688 For #21599 - Add UTM parameters for Pocket recommendations links 3 years ago
codrut.topliceanu a53b52b764 For #21565 - Adds inactive tabs onboarding popup 3 years ago
Mugurell 571a2fc88e For #21621 - Add 16dp horizontal spacing to home composables.
Added from the ViewHolders, the same as for XML Views.
3 years ago
Jonathan Almeida f9dd0d9f6f Issue #21582: Use ThumbnailStorage in recent tabs on home 3 years ago
Gabriel Luong a1e6872f6f For #21694 - Remove RoundedCornerShape around the inner Column in RecentlyVisited 3 years ago
Gabriel Luong 5fc979090a For #21694 - Only show the divider line in between items in the Recent Searches 3 years ago
Jonathan Almeida 8c2cbb4e41 Issue #21642: Remove in-progress media tab from homescreen 3 years ago
Christian Sadilek 66e54860bb Move tabs out of search group if direct load occurs
This regressed in our previous fix that made sure child tabs don't
mistakenly get moved out of the group if their parent is navigated
away, or in case the child tabs are redirected.

However, when a subsequent load occurs in any tab in the group the
search terms need to be cleared and the tab removed from the group
to prevent false positives.
3 years ago
Gabriel Luong 6abb2fffa1 For #21658 - Don't pass Client into composable functions 3 years ago
Jonathan Almeida b8946f807a Issue #21671: Remove Recently Closed from Inactive Tabs 3 years ago
Mugurell 16a3b92d34 For #21593 - Refactor the coroutine from PocketStoriesShown to outside the middleware
In so this code will no longer have access to the MiddlewareContext which only
makes sense in the thread of the Middleware itself.
3 years ago
Mugurell e4489b8d7d For #21593 - Persist stories categories selections in a Proto DataStore
A fast and easy solution with all the ACID requirements.
Also supports easy migrations if later the data we need persisted changes.
3 years ago
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.
3 years ago
Jonathan Almeida 061de54291 Issue #21576: Hide 'Other' title when there are no search groups 3 years ago
Mugurell 361673ae3e For #21626 - Avoid showing story invalid properties 3 years ago
Arturo Mejia 2b363b9868 For #21618: Integrate Nimbus with MR2 Home Page to enable experimentation 3 years ago
Arturo Mejia ebd336501b For #21611: Add jump back in Contextual Hints 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
Elise Richards 76c0c4ad14 For #21648: match Pocket sections on home to designs 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 c7067a50cb For #21646: Update section titles and customize button name on home 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
Christian Sadilek fafa72c0ff Allow opening pocket stories when search dialog is active 3 years ago
Roger Yang 920376ee5b Close #21610: Update Strings for Tab Settings 3 years ago
Roger Yang 1092383231 No issue: Make sure jump back in group always have more than one tab 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
Elise Richards c60de0bc6c For #21287: long press menu on recently visited homescreen groups 3 years ago
Arturo Mejia ca30f518d8 For #21608: Update strings for home screen dialog features 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
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
Mugurell 53d4336939 For #21592 - Don't topup with general stories 3 years ago
Mugurell ea6d5e3d38 For #21562 - Snap to next item when scrolling
This works by replacing the fling animation with snapping to the next item in
the scroll direction.
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
codrut.topliceanu 0e88c25df1 For #20762 - Adds grey border to inactive tabs 3 years ago
Elise Richards 02614eb889 For #21574: Move the homescreen onboarding card behind a feature flag 3 years ago
Mugurell e72b7f7cc8 For #21561 - Enable/Disable the feature from the customization menu 3 years ago
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.
3 years ago
Roger Yang ddd472d143 No issue: Improve rendering of jump back in 3 years ago
Roger Yang 53206df9b6 Close #21552: Remove Extra Subtitle In Jump Back In Item 3 years ago
Roger Yang 8193138015
Fix recent tabs intermittent tests (#21557)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
3 years ago
Mugurell c1f0e5a611 For #21275 - Sort items by how many times they were actually shown 3 years ago
Christian Sadilek 4596d4f905
Do not capture search terms when user navigates away via app (#21527)
Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>

Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
3 years ago
Roger Yang 8a15e8a681 Close #21451: Add active search term tab groups on home 3 years ago
Arturo Mejia f15291757b For #21493 show onboarding dialog for home sections 3 years ago
codrut.topliceanu f338d64a4c For #20762 - Fixes NPE crash with nullchecks for binding 3 years ago
Mugurell ba4c44afcf For #21045: Add categories support 3 years ago
Mugurell ccc0f17e4f For #21045: Cleanup
- stick to one naming scheme: rename articles to stories and use this all
throughout the app.
- add some spacing above the new section (as per the current design)
3 years ago
codrut.topliceanu e8c332964d For #21087: Updates Recently Saved design 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 976dd6ebe1 For #21460 - Rename "Delete from history" to "Remove" for recent visit dropdown menu 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
Travis Long ca069a78d2 Fix logic so `isFirstRun` can be called multiple times on first run 3 years ago
Travis Long c9c28b66c8 [SDK-344] Pass in first-run information to Nimbus for targeting 3 years ago
Gabriel Luong 98b218d964 For #21413 - Remove unused OnboardingPrivateBrowsingViewHolder and OnboardingWhatsNewViewHolder 3 years ago
Sebastian Kaspari cd61ef1c1d Issue #21172: Refactor UI tests accessing awesomebar suggestions. 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
Michael Comella 3ab1ca8321 For #21126: process performancetest intent for AC too. 3 years ago
Arturo Mejia 3272de1364 For #21239 add telemetry for Allow users to customize their home screen 3 years ago
Christian Sadilek 6f7f284b55 Make sure to only record view time once for a given tab access
Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
3 years ago
Grisha Kruglov b7b8de1c2f Use UpdateUrlAction to record viewTime observations
We discovered that in a tab restore scenario we were recording view time
observations that were wrong - we'd record time deltas as-if user was
looking at the page while the browser wasn't running.

This happens because when we record a viewTime observation, we compare
current time with lastAccess time of the tab. In a restore scenario,
that lastAccess time happens to be from when the browser was last
running - which could be days ago.

The simplest solution was to not record a viewTime observation if the
url for a tab didn't change during a load event. To achieve this, we
needed to change which action we were using as a proxy for "navigation
events" - UpdateUrlAction contains the new url, allowing us to compare
against the current tab url.

Alternative solutions would be to keep using loading actions, but
dispatch a lastAccess event before performing a metadata update. This
would have worked, but would result in two lastAccess events being
dispatched for each navigation event instead of just one.
3 years ago
Christian Sadilek 16085b9008 Closes #21388: Only parse clipboard content when search fragment is attached 3 years ago
Michael Comella 7232fedb20 For #21296: add ProfilerMarkers.addForDispatchTouchEvent. 3 years ago
Michael Comella bb632c7b3b For #21299: add duration markers for HomeActivity Create/Start.
We only instrument these methods because they're the only ones that
noticeably long running in the current implementation.
3 years ago
Michael Comella d67bd65f19 For #21299: add duration marker for IntentReceiverActivity.onCreate.
We only instrument onCreate because it's the only one with an
implementation.

While declaring this as a function that accepts a lambda is less
fragile, we've previously had issues with it such as suspected memory
leaks when used for telemetry. Therefore, we go with the simpler
approach.
3 years ago
Michael Comella f8a4113271 For #21299: add markers for all activity lifecycle callbacks.
We implement these all in the same track because between it'd create a
lot noise between this and fragment lifecycle callbacks.
3 years ago
Jonathan Almeida bc7f5d80df Issue #21236: Fixes empty tray visibility logic
This is a bug we noticed after landing search term grouping.

An adapter can submit an empty list of items to the `ConcatAdapter`
early. This has the side-effect of triggering our `observeFirstInsert`
too soon and therefore updating the visibility to show the empty tray
placeholder and never switches back.

Our solution is to keep a constant observer on the adapter so we can
perform the visibility check on every insert/remove.

Co-authored-by: Roger Yang <royang@mozilla.com>
3 years ago
Sebastian Kaspari 6ac10d5209 Issue #21291: SearchDialogFragment: Get URL from clipboard once and not for every state update 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
Michael Comella e6560c229d For #21309: add profiler markers on global layout. 3 years ago
Michael Comella cafc23acb1 For #21309: set up HomeActivityBinding the recommended way.
The recommended way is here:
https://developer.android.com/topic/libraries/view-binding

I was concerned with the existing implementation that binding was being
set conditionally.
3 years ago
rxu e6395bff97 Add default topsite 58 for MozillaOnline builds 3 years ago
Arturo Mejia 4e846b3cb6 For #21095 add customize home button on the home screen. 3 years ago
Gabriel Luong 66a31ddbfc Issue #21099 - Update items under "Jump back in" section to the latest designs 3 years ago
Christian Sadilek 2a92bd5942 Sort history metadata on home and allow limiting results 3 years ago
Mugurell a54a4ea20a For #21120 - ImageLoader with a shimmer effect placeholder 3 years ago
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
3 years ago
Arturo Mejia cbb8f808c1 For #18629: add support for SmartBlock exceptions 3 years ago
Arturo Mejia fe914dc964 For #21226 only show the "Customize Home" menu on home screen. 3 years ago
Arturo Mejia de59a3ec48 For #21211 hide the ETP in custom tabs. 3 years ago
bendk 5ba47a90db
Handle breaking changes from a-s 83.0.0 (#21215) 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
mcarare 70247e9456 For #6968: Use close instead of read to close the response stream. 3 years ago
Arturo Mejia d4a212f235 For #21095 allow users to configure their home screen. 3 years ago
Elise Richards 7d481a7836
For #19947: manually add login (#21199)
* [WIP] New Layout for adding login and 'add login' button in 'SavedLoginsListView' to launch it.
Fixed bindings.

* [WIP] Removed "reveal password" button

* [WIP] Added interactor for the add login screen

* [WIP] Trying to check for duplicates

* [WIP] Renaming "addNew..." with "add..."

* [WIP] Check for duplicates

* [WIP] Fixes after merge

* Cleaning up the layout and making edit text for hostname selectable

* Error handling on add login screen. Tests for interactors and controllers

Co-authored-by: Vitaly V. Pinchuk <vetal.978@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
3 years ago
Michael Comella 4fe6a4506d For #21183: remove lazyMonitored wrapper functionality.
We're not using the functionality so there's no sense in doing the work.
However, we keep the wrapper: see the code comments for details.
3 years ago
Arturo Mejia d288502840 For #20892 update connection panel strings 3 years ago
Noah Bond 28b07e7c8b
Issue mozilla-mobile#21140 - Updated recent tab logic to show media tab and second-to-last tab, if the media tab was the last active tab. (#21141)
* Issue mozilla-mobile#21140 - Updated recent tab logic to show media tab and second-to-last tab, if the media tab was the last active tab.

* Fixed RecentTabsListFeatureTest unit test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
3 years ago
Roger Yang 5d22bb4707 Issue #18711: Telemetry for credit card autofill 3 years ago
Arturo Mejia 4357ebb8aa For 20892 Update connection icons in address bar 3 years ago
czlucius cb6741210b For #18727: Exit PiP when launched externally with Intents 3 years ago
Mickey Moz 4c30483c57
Update Android Components version (#21109)
* Update Android Components version to 93.0.20210901143120.

* For #21043 - Integrate AC changes

* Fix breaking API changes of RestoreAction

Co-authored-by: Mugurell <Mugurell@users.noreply.github.com>
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
Gabriel Luong 9bd6d298f1 For #21078 - Remove unused creditCardsFeature feature flag 3 years ago
Elise Richards 6cb872cd98 Remove banner open in app telemetry 3 years ago
Elise Richards c9626019ef Remove search suggestions in private telemetry 3 years ago
Elise Richards 19d8f58b47 Remove user specified search engine telemetry 3 years ago
Elise Richards 7653691d30 Remove private browsing shortcut telemetry 3 years ago
Elise Richards cb9bbd2650 Remove private browsing mode telemetry 3 years ago
Elise Richards d137becd48 Remove tip telemetry 3 years ago
Elise Richards fa811cb244 Remove enable private search suggestions telemetry 3 years ago
Elise Richards de992994de Remove open links in private tab telemetry 3 years ago
Elise Richards f1cf6f4651 Remove find in page telemetry 3 years ago
Elise Richards 1f94dfa59b Remove total uri count telemetry 3 years ago
Elise Richards 87530ab9a4 Remove about page telemetry 3 years ago
Elise Richards 1b066458d5 Remove downloads management telemetry 3 years ago
Elise Richards 8455886ca8 Remove downloads misc telemetry. 3 years ago
Elise Richards c4ec8aa520 Remove download notification telemetry. 3 years ago
Elise Richards 2392c7e565 Remove master password telemetry. 3 years ago
Gabriel Luong 4080eba225 For #21037 - Add a delete history menu item
This removes the existing "Delete history" button in the History in favour of a menu item
3 years ago
Sebastian Kaspari 846274b7cd Enable Android Autofill support in all build types. 3 years ago
Gabriel Luong e4a25f4123 For #21035 - Refactor HistoryViewInteractor from HistoryView into HistoryInteractor 3 years ago
Christian Sadilek 597b73c732 Dedupe history metadata in groups based on url 3 years ago
Arturo Mejia 37c26976ac For #20919 add confirm dialog when turning on/off experiments 3 years ago
Elise Richards 41825022e7
For #19931: Add telemetry probes for recent bookmarks on home screen (#20316)
* Add telemetry probes for recent bookmarks on home screen. Tests for controller.

* Make the events into counters in the metrics ping

Update tests to reflect new metrics

Add data review link for new metrics

Mock new settings for startup metrics tests

Update metrics

Add test for recent bookmark glean events

* Recent bookmarks controller tests
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
Mugurell cb32b1437e For #17917 - Remove the `kotlin-android-extensions` plugin
This means no code will be generated by Kotlin Android Extensions for caching
views and also for @Parcelize annotated classes.

As recommended in the official documentation
https://developer.android.com/topic/libraries/view-binding/migration#gradle
we need to switch on using `kotlinx.parcelize.Parcelize` instead of
`import kotlinx.android.parcel.Parcelize`

For #17917 - Remove the `kotlin-android-extensions` plugin

This means no code will be generated by Kotlin Android Extensions for caching
views and also for @Parcelize annotated classes.

As recommended in the official documentation
https://developer.android.com/topic/libraries/view-binding/migration#gradle
we need to switch on using `kotlinx.parcelize.Parcelize` instead of
`import kotlinx.android.parcel.Parcelize`
3 years ago
Mugurell 621c388c12 For #17917 - Finish migrating all synthetics usages 3 years ago
codrut.topliceanu 5e13ead750 For #20328 - Adds telemetry for recentlyClosed button
...from tabsTray, inactiveTabs section.
3 years ago
Grisha Kruglov 6161dc6e8d Closes 20975: Run metadata cleanup after Megazord.init()
This ensures that we do not attempt places initialization before
Megazord.init() finishes, and that touching BrowserStore does not
kick-off places initialization (due to the `cleanup` call being a
side-effect of creating metadata middleware, used as part of the
BrowserStore).

Glean initialization happens before initialize megazord, and it touches
core.store BrowserStore instance, kicking-off places initialization on
an IO thread (due to the cleanup call), which raced megazord
initialization on the main thread.

App init sequence is a bit of a mine-field, so this patch takes the easy
way out and doesn't attempt to re-order initialization sequence. Also,
initializing places as a side-effect of touching BrowserStore was also,
clearly, a bug.
3 years ago
codrut.topliceanu 7070bb5607 For #17917: Use View binding in add-ons 3 years ago