Commit Graph

6848 Commits (0ebcc72febbcbd95165048bb9220881bb30323e2)
 

Author SHA1 Message Date
MarcLeclair 990bfa7e6d
16900 make navgraph inflation asynchronous (#18889)
* For #16900: implement async navgraph inflation

For #16900: removed nav graph from xml

For #16900: inflate navGraph programatically

For #16900: Made NavGraph inflation asynchronous

For #16900: Changed to block with runBlocking

For #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 #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 #16900: inflateNavGraphAsync now takes navController

For #16900: Pass lifecycleScope to NavGraphProvider

For #16900: removed unused mock

For #16900: Added linter rules for navigate calls

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

For #16900: Added TestRule to help abstract the mocks in the code

For 16900: Fix linting problems

For #16900: Cleaned duplicated code in tests

For #16900: cleaned up NavGraphTestRule for finished test

For #16900: had to revert an accidentally edited file

For #16900: rebased master

* For #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 #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
Mozilla L10n Automation Bot 973c891c5e Import l10n. 3 years ago
MickeyMoz 2d998b2f81 Update to Android-Components 74.0.10. 3 years ago
Michael Comella 5560d7de01 For #18836: rename CreatedActivityLogEntry -> LogEntry.ActivityCreated and similar.
It's too much work to squash "correctly".
3 years ago
Michael Comella 3ae80cda40 For #18836: note refactor in metrics docs. 3 years ago
Michael Comella 000bef020a For #18836: replace StartupActivityStateProvider with StartupStateProvider.
The StartupActivityStateProvider uses an imperative implementation,
driven by callbacks, to set the state of the application. This is hard
to follow as you need to understand which callbacks will be called in
which order. For example, to make sense of an implementation like this,
COLD, WARM, AND HOT would likely need to be implemented in separate
ActivityLifecycleCallbacks.

I feel the StartupStateProvider is an improvement because it leverages
the StartupActivityLog to query a linear state for a more understandable
implementation. Furthermore, it seems accessible to write COLD, WARM,
and HOT in the same class because they can all be approached the same
way.
3 years ago
Michael Comella 0cbedaadb1 For #18836: add StartupStateProvider. 3 years ago
Michael Comella e864e74960 For #18836: prevent StartupActivityLog from growing infinitely.
We do this is as a separate commit over the original implementation
because it's simpler to implement the class without this optimization.
3 years ago
Michael Comella cde954f3a7 For #18836: add StartupActivityLog, tests. 3 years ago
Jonathan Almeida d342aeae48 Close #18931: Implement add to collections in interactor
We moved the collection dialog code out from the old fragment, because it
had nothing to do with tabs tray, and into the collections package to be
re-usable in other parts of the app.

In addition, we also make use of it in the new tabs tray's
NavigationInteractor.
3 years ago
Jonathan Almeida 22e7410e4a Issue #18931: Move dialog adapter to collections package 3 years ago
Jonathan Almeida f1e7c1130b Issue #18931: Rename class to CollectionsListAdapter 3 years ago
Ryan VanderMeulen 033582aeb7
Set version to 88.1.0 3 years ago
Stefan Arentz 5db2f7568f Fixes #18995 - Upgrade the sync-strings action to v1.0.1 3 years ago
Christian Sadilek 72230377f4 Upgrade to Android Components 75.0.20210413143139 3 years ago
github-actions[bot] 4d02f1db8d
Sync Strings from master to releases_88.0 (#18980) 3 years ago
Jonathan Almeida cb60461bdd Close #18934: Remove adapter when deataching from window 3 years ago
Jonathan Almeida 1944a5ef6b Issue #18885: Dismiss FAB icon when tabs tray is closed 3 years ago
mcarare ba218e638b For #18375: Add experiment for set default browser New Tab card. 3 years ago
Elise Richards cbfba4478b Add ignores for intermittent toolbar tests 3 years ago
Adam Novak 77791e5828 Fake Google Play reviews in a way that Kotlin and its management-infested linter will tolerate 3 years ago
Adam Novak d69b053863 Pass linting 3 years ago
Adam Novak 39d40ebcc7 Merge tag 'v88.0.0-beta.6' into upstream-sync 3 years ago
interfect 790673b138
Merge pull request #295 from fork-maintainers/upstream-sync
Sync with Mozilla Firefox 87 Release
3 years ago
Adam Novak 502269ad9f Merge remote-tracking branch 'origin/upstream-sync' into upstream-sync 3 years ago
Stefan Arentz e8d405b48f
Workflow to sync strings (#18965) 3 years ago
Adam Novak ffb46b9430 Fix build failure due to warnings 3 years ago
Mozilla L10n Automation Bot 6036bf035a Import l10n. 3 years ago
Jonathan Almeida 38a7921913 Close #18973: Fix references to info banner 3 years ago
Roger Yang bc90e193a2 Closes #18522: Re-add call to action in tabs tray 3 years ago
Elise Richards 761d6babb9
For #18806: Show sync tabs or sync account sign in based on feature flag (#18859)
* Show sync tabs or sync account sign in based on feature flag. Sign in navigates to account settings on click.

* lint and nits
3 years ago
Dave Hunt b41082ac63 Bug 1670902 - Use WebRender platforms for Raptor performance tests 3 years ago
MickeyMoz 242fb78de1 Update Android Components version to 75.0.20210412143103. 3 years ago
Roger Yang b3f5e557cc
Closes #18899: Update content description string for synced tabs icon (#18963) 3 years ago
Jonathan Almeida f3df2c73d9
Close #18862: Add multi-select banner to tabs tray (#18932)
* Issue #18862: Add new addBookmark BookmarksUseCase

* Issue #18862: Add class for state binding features

* Issue #18862: Add delete multiple tabs to tray interactor

* Issue #18862: Add new actions to navigation interactor

* Issue #18862: Enable select mode from main tray menu

* Issue #18862: Add menu when in select mode

* Close #18862: Add multi-select banner to tabs tray

* Close #18862: Add select support for handle UI

We apply various layout changes to the "handle" UI in the tabs tray when
switching modes. It isn't quite clear to my, why we do this, if it's
really needed to meet the end result, and if there is a better way.

For now, we're simplying moving over that logic that we can re-evaluate
at a later time.
3 years ago
Elise Richards 52209673fb
For #18960: Remove nav in homescreen three dot menu (#18962)
* Remove nav in homescreen three dot menu

* Remove back and forward items
3 years ago
Arturo Mejia fc1739624d For #18608 only show the experiment for set default browser MenuItem when Nightly, Beta, Release are not the default browser 3 years ago
Sören Hentzschel 51df37cde5
For #18898 - implement quit button in page menu (#18942) 3 years ago
Gabriel Luong c5e78f69ed
For #18940 - Remove reserved icon spacing for "Nimbus Experiments" setting preference (#18949)
Co-authored-by: Sören Hentzschel <kontakt@agenedia.com>
3 years ago
Oana Horvath 78f0086b7e For #17979 & #17840: fix and re-enable UI tests affected by main menu changes 3 years ago
Oana Horvath 358a3a3d4c Fix screenshots tests: showDefaultHomeScreen, bookmarksManagementTest 3 years ago
MickeyMoz f50f66a1a4 Update Android Components version to 75.0.20210412114437. 3 years ago
Mozilla L10n Automation Bot d7f7f817c9 Import l10n. 3 years ago
Mozilla Releng Treescript 3e7c6cb6d5 Automatic version bump CLOSED TREE NO BUG a=release 3 years ago
MickeyMoz f6e466175f Update Android Components version to 75.0.20210410143112. 3 years ago
Mozilla L10n Automation Bot 5a2a61330d Import l10n. 3 years ago
MickeyMoz a439894ab1 Update to Android-Components 74.0.9. 3 years ago
Adam Novak ede5b2f873 Accept a language 3 years ago
Adam Novak 29a749f983 Set feature flags 3 years ago
Adam Novak af23310679 Merge tag 'v87.0.0-rc.1' into fork 3 years ago