Commit Graph

1295 Commits (1f633edd7d4436f20ead4ba657b1284b94cca0c6)

Author SHA1 Message Date
mcarare 0cb4059b12 For #17130: Replace hardcoded strings with string resources. 3 years ago
aime Soriano Pastor 9bfc94b793 For #9294: Add option to clear current site data in quick settings dialog. 3 years ago
MickeyMoz 07d43971c0 Update Android Components version to 97.0.20211208143435. 3 years ago
Christian Sadilek 229c410437 Introduce timeout for capturing thumbnail in BrowserAnimator 3 years ago
Christian Sadilek ae0dba29b1 Prevent flash when navigating to home 3 years ago
Christian Sadilek 26713a58c8 Refactor: Move historymetadata classes in separate package 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 7c2d9bd8a8 For #22595 - Remove unused OnboardingAutomaticSignInViewHolder 3 years ago
Gabriel Luong 91da5318e3 For #22211 - Use Hero images for Recent Bookmarks 3 years ago
Arturo Mejia a49f80d5e8 Update Android Components version to 96.0.20211125162700. 3 years ago
Arturo Mejia 3f86a5d6f9 Improve loading URLs 3 years ago
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.
3 years ago
Mugurell 685da115c9 For #22442 - Don't display history group if already in Jump back in 3 years ago
Gabriel Luong dc15ee2415 For #22488 - Fix intermittent test failure with InactiveTabsControllerTest 3 years ago
Gabriel Luong 749da13516 For #22250 - Convert Recent Bookmarks to Jetpack Compose 3 years ago
Arturo Mejia 74406bef59 For issue #5298 the same page appears in the History section multiple times 3 years ago
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.
3 years ago
Grisha Kruglov 45d4807bfe Closes #22472: Filter out redirects from History search groups 3 years ago
Roger Yang 24e4452cb5 Close #22402: Add top placeholder for home 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
Arturo Mejia 94a543a403 For #22271 Improve URL accessing from the clipboard for Android 12 and above. 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
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
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
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
Arturo Mejia 5a11985d22 No issue: Address tracking protection exceptions breaking changes 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
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
Christian Sadilek 687209fee8 Introduce test rule to work around intermittent mockk failures 3 years ago
Mugurell 018fe15072 For #22138 - Install source metrics probe 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
Christian Sadilek 3e6cd7d821 Closes #21355: Fix intermittent test failures in BookmarkItemMenuTest 3 years ago
Christian Sadilek 75c70ff814 Closes #21952: Ignore intermittently failing FenixSnackbarKtTest 3 years ago
Christian Sadilek f4be38dafc Closes #21438: Ignore intermittently failing ExceptionsListItemViewHolderTest 3 years ago
Christian Sadilek 5d7bb70f55 Closes #22081: Ignore intermittently failing DefaultBrowsingModeManagerTest 3 years ago
Christian Sadilek 99f0aaa834 Closes #21332: Ignore intermittently failing WebPushEngineIntegrationTest 3 years ago
Christian Sadilek 3ffb11fd3b Closes #21952: Ignore intermittently failing FenixSnackbarDelegateTest 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
MickeyMoz a4bcecf8c5 Update Android Components version to 95.0.20211026143215.
Co-authored-by: Gabriel Luong <gabriel.luong@gmail.com>
3 years ago
Gabriel Luong b04bf99b7d For #21776 - Remove unused symbols 3 years ago
Gabriel Luong da395d1038 For #21776 - Local 'var' is never modified and can be declared as 'val' 3 years ago
Gabriel Luong 76c746b982 For #21776 - Remove unnecessary type argument 3 years ago
Gabriel Luong 272d31b2b4 For #21776 - Remove unnecessary parentheses from function call with lambda 3 years ago
Gabriel Luong 6d1d4bea93 For #21776 - Remove redundant qualifier name 3 years ago
Jonathan Almeida 7666f0e4c2 No issue: Replace TabsTray.Tab with TabSessionState
Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
3 years ago
Jonathan Almeida b2a7877c83 No issue: Disable FenixSnackbarDelegateTest intermittents 3 years ago
Sebastian Kaspari 170fa9705e Update Kotlin and Jetpack Compose versions. 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
Michael Comella a1ace964de No issue - post: fix ProfilerMarkerFactProcessor tests. 3 years ago
Gabriel Luong 64ca94b8fa For #22022 - Composify Customize Home Button and update the background color 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
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
Jonathan Almeida 625233f664 Close #21910: Fix intermittent failures in SelectTabUseCaseWrapperTest 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 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
Grisha Kruglov 2967513083 Fix up HistoryMetadataController tests 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
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
Mugurell 79a4873843 For #21733 - Simplify test to not depend on store updates. 3 years ago
Mugurell 4d5bd9eca4 For #21733 - Replace mock of an interface with mock of a fake. 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
Mugurell 507801e5d5 For #21623 - Pocket recommended stories telemetry 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
Arturo Mejia 7e3a2ba89d For #21574: disabled the homescreen onboarding dialog. 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
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
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
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
Christian Sadilek fafa72c0ff Allow opening pocket stories when search dialog is active 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
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
Michael Comella 4c33b1b75c For #21294: add partial test for existing factToEvent code.
When we refactor, this will help ensure we've done it correctly.
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
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
Mugurell ba4c44afcf For #21045: Add categories support 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
Jonathan Almeida 26dc3ea47e Issue #21366: Speculative fix for failing test in TitleHeaderBindingTest 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
Gabriel Luong 98b218d964 For #21413 - Remove unused OnboardingPrivateBrowsingViewHolder and OnboardingWhatsNewViewHolder 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
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
Elise Richards b56d8ff545 For #21337: rename recently saved section on home 3 years ago
Jonathan Almeida e9434a5b11 Close #21366: Fix intermittent test failure in TitleHeaderBindingTest 3 years ago
Michael Comella a3d3519e68 Closes #21335: return self instead of mock in FenixSnackbarKtTest.
This is a speculative fix for the intermittent issue. Typically, these
intermittents are caused by mocked lambdas but there is no mocked lambda
here. If this doesn't work, one `any()` argument fills in for a lambda:
it's possible that's causing the failure.

Unfortunately, I can't verify this fix easily because the "run test until
failure" option was removed from Android Studio.

See b3f5c87585 for a prior attempt to
address the intermittents in this class.
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 83bd2f2254 Closes #18102: remove intermittent failing App onCreate duration measurement test.
The test as it exists relies on the robolectric lifecycle, which is hard
to predict, so it doesn't seem worth fixing the test. Writing the test
any other way would require excessive mocking, which also seems
impractical.
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
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
Christian Sadilek c1289f657d Fix history metadata API breakage in unit tests 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
bendk 5ba47a90db
Handle breaking changes from a-s 83.0.0 (#21215) 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
Christian Sadilek 5cc5a3438c Remove mocked lambdas from AccountSettingsInteractorTest 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
Elise Richards 6cb872cd98 Remove banner open in app telemetry 3 years ago