Commit Graph

32 Commits (b668769eb40a4ab6dd87a285376090d8d3d8d488)

Author SHA1 Message Date
Gabriel Luong 714a443893 Bug 1853065
(cherry picked from commit c793b0e1b4ca3177b8586c65265b2802ce540cc7)

# Conflicts:
#	android-components/components/feature/tabs/src/test/java/mozilla/components/feature/tabs/TabsUseCasesTest.kt
8 months ago
mike a 9a4ba51e85 Bug 1817519 – force search for not default engines 1 year ago
Mugurell d9074aaa2c [fenix] For https://github.com/mozilla-mobile/fenix/issues/25816: Ensure the "show search suggestions" user option is followed
Previously the check for the "Search -> Show search suggestions" user setting
was only used in the default SearchFragmentState but not again if users change
the current search engine as part of the unified search feature.
This comes to ensure that that check is always made when needing to configure
new search engine results.
1 year ago
Alexandru2909 03493f4eaf [fenix] Bug 1807727 - Dismiss SearchDialogFragment on editing cancelled 1 year ago
Alexandru2909 e8ea437ec0 [fenix] For https://github.com/mozilla-mobile/fenix/issues/25814 - Hide "Show search engines" toggle from search settings when unified search is enabled 2 years ago
mcarare 932823c871 [fenix] For https://github.com/mozilla-mobile/fenix/issues/26844: Fix ktlint issues and remove them from baseline. 2 years ago
Jan-Erik Rediger 7565361ae6 [fenix] Adjust all telemetry tests to follow new Glean APIs
These are mostly mechanical changes to replace usage of `testHasValue`
with `testGetValue`.
`testGetValue` will now return `null` instead of throwing an exception
if no data is available.
2 years ago
Roger Yang d1c8951434 [fenix] Issue https://github.com/mozilla-mobile/fenix/issues/24522: Add telemetry for unified search 2 years ago
Gabriel Luong 397f1ffbb2 [fenix] For https://github.com/mozilla-mobile/fenix/issues/24300 - Add Tabs to the search engine menu 2 years ago
Roger Yang bd2263d32d [fenix] Issue https://github.com/mozilla-mobile/fenix/issues/24301: Add Bookmarks to the search engine menu 2 years ago
Roger Yang 2609047630 [fenix] Issue https://github.com/mozilla-mobile/fenix/issues/24299: Add history to the search engine menu 2 years ago
Mugurell c6bb6c247e [fenix] For https://github.com/mozilla-mobile/fenix/issues/23876 - Update kotlinx-coroutines to 1.6.1. Refactor runBlocking in tests.
After the update `TestCoroutineDispatcher`, `TestCoroutineScope` and
`runBlockingTest` are deprecated.
Instead of these new `TestDispatcher`, `TestScope` and `runTest` APIs are used.

Took the oportunity to also replace most of the `runBlocking` calls with the
new `runTest` specially designed for running coroutines in tests API.
2 years ago
mcarare 969a5f0b0b [fenix] For https://github.com/mozilla-mobile/fenix/issues/21292: Remove unused MetricController parameters. 2 years ago
Gabriel Luong 976ce08079 [fenix] For https://github.com/mozilla-mobile/fenix/issues/24297 - Add a search engine menu that shows the search engine and search settings 2 years ago
mcarare 37f60284d2 [fenix] For https://github.com/mozilla-mobile/fenix/issues/24211: Remove wrapper from search related metrics.
Removes wrapper from search labeled counter and performed search event.
2 years ago
mcarare d5016f5e9b [fenix] For https://github.com/mozilla-mobile/fenix/issues/24210: Remove wrapper from "url entered" event. 2 years ago
Alexandru2909 0ff07369de [fenix] For https://github.com/mozilla-mobile/fenix/issues/24204 - Remove Event.wrapper for Search_shortcuts telemetry 2 years ago
Brais Gabín 26a4ec05d3 [fenix] For https://github.com/mozilla-mobile/fenix/issues/23142 - Fix license formatting in tests 2 years ago
Arturo Mejia 4cc4e1c67d [fenix] Improve loading URLs 3 years ago
Sebastian Kaspari 6f4c47613a [fenix] Update Kotlin and Jetpack Compose versions. 3 years ago
Sebastian Kaspari 6ea19d4b17 [fenix] Run ktlintFormat to adapt to latest formatting rules. 3 years ago
Christian Sadilek 9ed161ff27 [fenix] Issue https://github.com/mozilla-mobile/fenix/issues/20533: Fix intermittent test failures in SearchDialogControllerTest 3 years ago
Roger Yang 63775af142 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/19921: Update appcompat and fragment dependencies to 1.3.x 3 years ago
Jonathan Almeida 8764e7dcec [fenix] Close https://github.com/mozilla-mobile/fenix/issues/19950: Fix intermittent failure in SearchDialogControllerTest 3 years ago
Sebastian Kaspari e25cfcdc48 [fenix] Complete browser-state migration and remove browser-session dependency.
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
MarcLeclair 4c45f615bb [fenix] 16900 make navgraph inflation asynchronous (https://github.com/mozilla-mobile/fenix/pull/18889)
* For https://github.com/mozilla-mobile/fenix/issues/16900: implement async navgraph inflation

For https://github.com/mozilla-mobile/fenix/issues/16900: removed nav graph from xml

For https://github.com/mozilla-mobile/fenix/issues/16900: inflate navGraph programatically

For https://github.com/mozilla-mobile/fenix/issues/16900: Made NavGraph inflation asynchronous

For https://github.com/mozilla-mobile/fenix/issues/16900: Changed to block with runBlocking

For https://github.com/mozilla-mobile/fenix/issues/16900: Refactored blocking call into a function

For 16900: NavGraph inflation is now async

We now attach the nav graph (or check if its attached) on every nav call ( an extension function for NavController).
This is done by checking the value of the job stored in PerfNavController.map which keeps track of the job with the NavController as a Key.
If the job hasn't been completed, it will block the main thread until the job is done. The job itself is responsible for attaching the navgraph
to the navcontroller (and the inflation of the latter too)

For 16900: rebased upstream master

For 16900: Rebase on master

For https://github.com/mozilla-mobile/fenix/issues/16900: Fixed Async Navgraph navigation per review comments.

1)The Asynchronous method is now found in NavGraphProvider.kt. It creates a job on the IO dispatcher
2)The Job is tracked through a WeakHashMap from Controller --> NavGraph
3)The Coroutine scope doesn't use MainScope() anymore
4)The Coroutine is cancelled if the Activity is destroyed
5)The tests mockk the blockForNavGraphInflation method through the FenixReoboelectricTestApplication instead of calling the mock every setup()

For https://github.com/mozilla-mobile/fenix/issues/16900: inflateNavGraphAsync now takes navController

For https://github.com/mozilla-mobile/fenix/issues/16900: Pass lifecycleScope to NavGraphProvider

For https://github.com/mozilla-mobile/fenix/issues/16900: removed unused mock

For https://github.com/mozilla-mobile/fenix/issues/16900: Added linter rules for navigate calls

We need linting rules to make sure no one calls the NavController.navigate() methods

For https://github.com/mozilla-mobile/fenix/issues/16900: Added TestRule to help abstract the mocks in the code

For 16900: Fix linting problems

For https://github.com/mozilla-mobile/fenix/issues/16900: Cleaned duplicated code in tests

For https://github.com/mozilla-mobile/fenix/issues/16900: cleaned up NavGraphTestRule for finished test

For https://github.com/mozilla-mobile/fenix/issues/16900: had to revert an accidentally edited file

For https://github.com/mozilla-mobile/fenix/issues/16900: rebased master

* For https://github.com/mozilla-mobile/fenix/issues/16900: Review nits for async navgraph

This is composed of squash commits, the original messages can be found below:

-> DisableNavGraphProviderAssertionRule + kdoc.

Use test rule in RobolectricApplication.

Fix failing CrashReporterControllerTest

Fix blame by -> navigate in tests.

This commit was generated by the following commands only:
```
find app/src/test -type f -exec sed -i '' "/import org.mozilla.fenix.ext.navigateBlockingForAsyncNavGraph/d" {} \;
find app/src/test -type f -exec sed -i "" "s/navigateBlockingForAsyncNavGraph/navigate/g" {} \;
git checkout app/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
```

Fix various blame

This is expected to be squashed into the first commit so, if so, it'd
fix the blame.

Move test rule to helpers pkg.

add missing license header

Add import change I missed

fix unused imports

Replace robolectricTestrunner with test rule.

Improve navGraphProvider docs

Remove unnecessary rule as defined by robolectric.

add clarifying comment to robolectric

remove unnecessary space

* For https://github.com/mozilla-mobile/fenix/issues/16900: nit fixes for MozillaNavigateCheck and lint fixes

3 squash commits:
 *Changed violation message and fixed the lint rule for MozillaNavigateCheck
 *Added suppression to NavController.kt
 *Fixed detekt violations

* For 16900: Fixed failing tests

Co-authored-by: Michael Comella <michael.l.comella@gmail.com>
3 years ago
mcarare 507b4aaf8b [fenix] For https://github.com/mozilla-mobile/fenix/issues/16044: Suggest search engines based on typed text. 3 years ago
Sebastian Kaspari 4e676267b7 [fenix] SearchDialogController: Pass tab ID instead of Session instance. 3 years ago
Michael Debertol 82bc38f76b [fenix] For https://github.com/mozilla-mobile/fenix/issues/4333: Open the keyboard when a search engine is selected (https://github.com/mozilla-mobile/fenix/pull/14353)
Co-authored-by: Elise Richards <erichards@mozilla.com>
3 years ago
Sebastian Kaspari d50140272a [fenix] Integrate new search code from Android Components into Fenix. 4 years ago
Mihai Adrian Carare 5fb5471df1 [fenix] For # 15929: Remove the search widget discoverability experiment. (https://github.com/mozilla-mobile/fenix/pull/16081)
* For https://github.com/mozilla-mobile/fenix/issues/15929: Remove SearchWidgetCFR telemetry.

* For https://github.com/mozilla-mobile/fenix/issues/15929: Remove SearchWidgetCFR and search widget experiment.

* For https://github.com/mozilla-mobile/fenix/issues/15929: Remove unit tests references to search widget experiment.
4 years ago
Elise Richards 609857c5f1 [fenix] For https://github.com/mozilla-mobile/fenix/issues/14280, https://github.com/mozilla-mobile/fenix/issues/14743: Remove old search fragment (https://github.com/mozilla-mobile/fenix/pull/15169)
* Remove search fragment

* Use new folder to search dialog

* Rebase and lint

* Update tests with search dialog nav directions

* Rename interactor to match naming convention. Remove old controller and point everything to the dialog controller.
4 years ago