Commit Graph

14 Commits

Author SHA1 Message Date
Sebastian Kaspari 170fa9705e Update Kotlin and Jetpack Compose versions. 2021-10-25 17:59:17 +02:00
Roger Yang 74c1cc82fb Closes #19921: Update appcompat and fragment dependencies to 1.3.x 2021-06-22 01:39:52 +00:00
Elise Richards 279d59897c
For #18264 - Add biometric prompt to credit card settings (#19505) 2021-05-27 03:45:35 -04:00
Mugurell bd8facb025 For #18263 - Allow dynamically toggling credit cards autofill 2021-05-26 19:38:16 +03:00
mcarare a862824697 For #19600: Change manage cards preference UI dynamically. 2021-05-24 11:09:59 +03:00
mcarare bcf6b901ee For #19600: Change manage cards preference UI dynamically. 2021-05-24 11:09:59 +03:00
Elise Richards 6459a859b9
For #17537: Add preferences for syncing credit cards and addresses (#19471)
* Add preferences for enable/disable sync for cc and addresses

* Set pref visibility based on feature flags

* Helper function for pin warning preferences and set default values for cc and addresses to false.

* Kdocs for relevant sync functions in account settings

* Default visibility to false for credit cards and addresses in account settings
2021-05-13 14:08:46 -05:00
Codrut Topliceanu 277034546f
For #18262 - [Credit cards] Turn the "Sync cards across devices" button into a "Sync cards" toggle (#19207)
* For #18262 - Turns "Sync cards/logins" into toggle
2021-05-06 14:43:27 +03:00
mcarare 00744fa9e5 For #18267: Updates preferences visibility depending on creditCardsStore 2021-04-22 10:45:57 +03:00
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>
2021-04-13 20:48:45 -04:00
Gabriel Luong 37b6079d83
For #18268, #18269 - [Saved cards] Display a list of Saved cards fetched from the credit card storage (#18808) 2021-04-08 12:09:57 -04:00
Gabriel Luong 46a267a494 For #18243 - Add a credit card editor screen 2021-03-29 21:37:03 -04:00
Gabriel Luong 3b11b9a700
For #18242 - Wire up "Sync cards across devices" preference with SyncPreferenceView (#18605) 2021-03-23 16:00:41 -04:00
Gabriel Luong 578d6b5205
For #18240 - Add a Credit Card preference screen (#18410)
- Removes an unused preference key "pref_key_credit_cards_addresses"
2021-03-23 11:59:32 -04:00