Commit Graph

67 Commits (74c1cc82fb4975f63c20a718f09367149bcc3c70)

Author SHA1 Message Date
Roger Yang 74c1cc82fb Closes #19921: Update appcompat and fragment dependencies to 1.3.x 3 years ago
Elise Richards 279d59897c
For #18264 - Add biometric prompt to credit card settings (#19505) 3 years ago
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
3 years ago
Gabriel Luong 6eb528f912
For #18272 - [Edit card] Display a saved card information in the Edit card screen (#18884) 3 years ago
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
Gabriel Luong a31ce9bf67
For #18241 - Refactor SyncLoginsPreferenceView to SyncPreferenceView for reusability (#18383)
This refactors SyncLoginsPreferenceView to SyncPreferenceView so that it be can be used in the
Credit cards preference for the equivalent "Sync cards across devices" preference.
3 years ago
mcarare 05a14efda7 For #18228: Populate menu options in onResume along with toolbar init. 3 years ago
Gabriel Luong ccbca2cf78 For #18202 - Refactor BiometricPromptFeature out of logins into settings 3 years ago
Victor 2193be27b2 Solves Leaks on SavedLoginFragment
disables options menu to avoid leak
 removes on click listener to avoid leak
3 years ago
Abhinav Gupta 13f5df33a1 Hiding the usernameview if the data item.username is blank. 3 years ago
ekager f5b068a453 For #17785 - Use screenshots setting when adding secure flag 3 years ago
Hakkı Kaan Çalışkan e41cc5a414 For #17303: Move ext fun runIfFragmentIsAttached to utils
move to ext
3 years ago
Jonathan Almeida 78715c3020
For #13477 - Move BiometricPrompt to a separate feature (#16498)
Instead of simply fixing the memory leak for this issue by directly
removing references, it makes more sense to move the whole
BiometricPrompt out of the fragment and into it's own feature to be
re-usable.
4 years ago
Jocelyne Abi Haidar a5de2c0352 For #15675: Disable Save button when editing saved login until something has been changed
set save button state by calling invalidateOptionsMenu, causing onPrepareOptionsMenu to be called which will enable/disable the save button depending on if changes have been made or not
4 years ago
ekager 01eedd159a No issue: Update biometric, core, and recyclerview libraries 4 years ago
Grisha Kruglov 51dab196c4 Closes #15443: Use fragment's lifecycleScope for AlertDialog actions 4 years ago
Tiger Oakes 25f62f1c76 Extract locale settings initial state 4 years ago
Tiger Oakes acbad66f45 Add test for initial logins list state 4 years ago
Grisha Kruglov d98eba1d64 Closes #15432: Invoke UI updates on main thread in response to account events 4 years ago
Jocelyne d45e482373
For #11800: Hide reveal and clear password icons if the password is empty when editing a saved login (#15244)
Co-authored-by: Jocelyne Abi Haidar <jocelyne.abihaidar@gotocme.com>
4 years ago
ekager 83ffcac57e For #13926 - MP migration 4 years ago
Mugurell 75c496f237 For #13037 - Cleanup - have the camera check in just one place
This patch reverts a previous commit for the issue which added the camera check
in two places.
With a new solution to check if the device has camera only in
TurnOnSyncFragment we need to cleanup the previous checks.
4 years ago
bawyap a1a211d6e4 FNX2-15608:Removes unused feature flag import 4 years ago
bawyap 83f6e2ae41 FNX2-15608:Removes unused feature flag 4 years ago
Tiger Oakes f3f470a977
For #13140: Use concept-menu for saved logins menu (#13143) 4 years ago
Mugurell ab2ea8e682 For #13037 - Use email to sign in to fxa if device has no camera
App can be installed on devices with no camera modules. Like Android TV boxes.
Will skip presenting the option to sign in by scanning a qr code in this case
and default to login with email and password.
4 years ago
Tiger Oakes d8ff6179fe
For #7992: Use favicon style from AC (#12608) 4 years ago
Tiger Oakes 1a51b7f874 For #13084 - Use runBlockingTest 4 years ago
mcarare 048f6a49fe For #12565: Pass passwordsStorage instead of context in constructor. 4 years ago
Tiger Oakes d3a07e95c9 For #12565: Don't pass contest to SortingStrategy 4 years ago
Tiger Oakes 51937e73fc
Closes #10924 - Cleanup SavedLoginsAuthFragment (#10930) 4 years ago
Hakkı Kaan Çalışkan 3f25a28cf7 For #12554: Helper class for password reveal on logins 4 years ago
Elise Richards 023a4983fa
For #10173: login duplicates and save (#11208)
* Extract controller into it's own class. Implement find dupes and filter based on username.

Create edit login controller. Add text watchers and check for duplicates.

Edit controller test

* Find duplicates and save to store

* Retrieve duplicates from AC and check list on username text changed

Move duplicates logic into the controller

* Add glean pings for delete and edit. Move logic for login manipulation into the datastore.

* Use correct threads in controller. Enable save button when applicable.

Save enabled in datastore.

Move login data to datastore

Rebase with password error states

Update metrics to be more specific for edit

* Create logins controller for AC calls

* Interactor and controller methods for edit login. Add edit view to separate out some layout manipulation.

Inflate view in edit fragment. Double layout showing up.

Edit view

Controller tests

Controller tests passing

Interactor tests

Lint and detekt cleanup

* Remove datastore and use storage controller for all logins calls to password storage.

Addressed comments

Lint
:

Rebase - 1
4 years ago
Mugurell e1fc0cc038
Ensure logins deletion (#12507)
* For #11227 - Cleanup saved logins list when one is selected

Selecting a saved login will open a detail screen for it from where users can
change details or even delete that particular login.
After the change is made the user is brought back to the list of saved logins
where for a brief moment (< 1s) until we get a new response from
passwordsStorage.list() the user can see and even interact with the old list
of items, which may still contain the just deleted one.

To avoid users seeing obsolete logins or even interacting with them (selecting
a previosuly deleted item will result in a crash) we will clean the list of
logins just before the selected login is opened in the detailed view.
When returning for a brief moment the users may see the "loading" UX until
passwordsStorage.list() returns the up-to-date list of logins to display.

* For #11227 - Refactor SavedLoginsView to be closer to MVI

- Interactors should only get passed other Interactors or Controllers as
dependencies to which they should delegate user actions.
- Controllers should hold most of the business logic and get passed all final
dependencies they need to do their job.
4 years ago
Tiger Oakes d4bb432e24
Add helper for underlining text (#12520) 4 years ago
ekager 9ed85510ae For #7094 - Adds save login exceptions 4 years ago
ekager ad265be672 For #11303 - Change copy login origin to open in browser 4 years ago
Tiger Oakes c99a8f5cfa
Fixes #9832 - Change targetSdkVersion to Android 10 (#11014) 4 years ago
ekager bceb07a05b For #12312 - Disable settings that navigate while authenticating 4 years ago
Tiger Oakes 8e8e5aea36
Extract radio group logic into helper (#11493) 4 years ago
ekager 8533d96ee2 For #11320 - Expose login autofill setting to beta dimension 4 years ago
Tiger Oakes 596c579bbb Replace nullable findPreference 4 years ago
Tiger Oakes 45ef88f6b9 Replace requireNotNull(findPreference()) 4 years ago
Tiger Oakes 294f29768d Test logins settings 4 years ago
Elise Richards 137d66a511
For 10172: Set edit text listeners (#11196)
* Set edit text listeners

* Set clearable icons and change with error states

* Clear text buttons show and hide

* Move error checks to afterTextChanged. Refactor. Remove unused color.
4 years ago
ekager 6d4a673c6f For #8967 - Expose autofill logins setting in nightly 4 years ago
Mihai Eduard Badea 11df3aaca1 For issue#10727 - Logins auth redirect
Added an extension function that pops the backstack of the fragment so the user is redirected to the Logins and passwords screen.
This is done to force the user to re-authenticate if he wants to re-enter the saved logins flow.

Additionally, some UI elements are being hidden on each Fragment since they were remained visible on the Logins and passwords screen's UI.
4 years ago
ValentinTimisica 7974a5c77c Fixes #10815: Sort login items on initial load 4 years ago
Elise Richards edc75c3ad0
Fixes #9504: Edit logins (#9693)
* Create editable view and fragment. Update login info page to display options menu with edit and delete.

* Create feature flag for edit. Check flag in the login detail fragment and default to just delete.

* Add three-dot kebab options menu in login detail fragment. Add title to the login item.

* Nav to and from edit view on save and back pressed.

* Save login through AC login manager. Clear text in editable field on button click.

* Match colors, fonts, dimens to UX specs for edit logins. Enable password reveal/hide and clearing text fields.

* Refactoring logins fragments. Using component Login object for consistency.

Fetch login list when saved logins are opened. Fetch login details when detail view is opened.

Revert "Fetch login list when saved logins are opened. Fetch login details when detail view is opened."

This reverts commit 44fe17166c3332b330229258b2e8982832672e3b.

* Using parcelable login and Login component class to pass ids and items between fragments

* Retrieve login from storage when viewing login details.

Rename login logic for consistency.

Ktlint cleanup

Fix nits and naming consistency.

* UX consistency for login detail and edit login pages

* Rebasing with logins sort - updating logins store.

* Rebasing with logins sort - merging fragments and controllers.

* Lint and removing unused files.

* UX cleanup.

* Update string description
4 years ago
ValentinTimisica 24ba9f2fc8 For #9505: Adds possibility to sort saved logins
Currently we support sorting by name and by last used. Also, the selected
option is saved in shared preferences so that the last option chosen by
the user is properly displayed even after the app was restarted.
4 years ago