Commit Graph

17 Commits (978871c8590373dd2633f0f94e52b9f334f1c949)

Author SHA1 Message Date
Gabriel Luong 978871c859 Bug 1848527 - Part 1: Enable OutdatedDocumentation detekt rule in Fenix 8 months ago
Mugurell 8d442cd874 Bug 1824379 - When updating a login update it in the shared LoginsFragmentStore
This change comes to use the shared LoginsFragmentStore and help elide a more
expensive read from disk for updated logins by using the in memory data for
instant updates in all Fragments interested in LoginsFragmentStore updates.
1 year ago
Mugurell 116fd648b6 Bug 1824379 - When deleting a login delete it from the shared LoginsFragmentStore
This reverts the recent patch for bug 1799622 and reworks the implementation to
avoid using the Fragment Result API for a simpler functionality using the
already shared LoginsFragmentStore.
1 year ago
Mugurell 52d035c13c Bug 1824379 - When adding a new login add it to the shared LoginsFragmentStore
This brings multiple advantages over the current implementation:
- we're not creating a new instance of SavedLoginsFragment
- we avoid a deeper and more expensive layer of caching the just added login
through SyncableLoginsStorage and use the in memory data.
- we avoid having to intercept the back press to control navigation
1 year ago
gitstart 767f92ebb9 Bug 1818473 - Ignore case when searching through logins 1 year ago
gitstart 56a0958013 Bug 1812447 - Search Logins by Username 1 year ago
mcarare 932823c871 [fenix] For https://github.com/mozilla-mobile/fenix/issues/26844: Fix ktlint issues and remove them from baseline. 2 years ago
Grisha Kruglov 997fd9ba64 [fenix] 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
Ben Dean-Kawamura 204ad8834d [fenix] 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 https://github.com/mozilla-mobile/fenix/pull/24103 and https://github.com/mozilla-mobile/fenix/pull/24104.  I would love to address https://github.com/mozilla-mobile/fenix/issues/24102,
but I'm not sure what the correct behavior is there so I just kept that
the same.
3 years ago
Mugurell 4466a39727 [fenix] For https://github.com/mozilla-mobile/fenix/issues/17917 - Remove the `kotlin-android-extensions` plugin
This means no code will be generated by Kotlin Android Extensions for caching
views and also for @Parcelize annotated classes.

As recommended in the official documentation
https://developer.android.com/topic/libraries/view-binding/migration#gradle
we need to switch on using `kotlinx.parcelize.Parcelize` instead of
`import kotlinx.android.parcel.Parcelize`

For https://github.com/mozilla-mobile/fenix/issues/17917 - Remove the `kotlin-android-extensions` plugin

This means no code will be generated by Kotlin Android Extensions for caching
views and also for @Parcelize annotated classes.

As recommended in the official documentation
https://developer.android.com/topic/libraries/view-binding/migration#gradle
we need to switch on using `kotlinx.parcelize.Parcelize` instead of
`import kotlinx.android.parcel.Parcelize`
3 years ago
Tiger Oakes be11bfd5b4 [fenix] Add test for initial logins list state 4 years ago
Elise Richards 5b46f572df [fenix] For https://github.com/mozilla-mobile/fenix/issues/10173: login duplicates and save (https://github.com/mozilla-mobile/fenix/pull/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 ac85ba0945 [fenix] Ensure logins deletion (https://github.com/mozilla-mobile/fenix/pull/12507)
* For https://github.com/mozilla-mobile/fenix/issues/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 https://github.com/mozilla-mobile/fenix/issues/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 59bab0f4f3 [fenix] Test logins settings 4 years ago
Elise Richards e31e150fd0 [fenix] For 10172: Set edit text listeners (https://github.com/mozilla-mobile/fenix/pull/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
ValentinTimisica 99591d4100 [fenix] Fixes https://github.com/mozilla-mobile/fenix/issues/10815: Sort login items on initial load 4 years ago
Elise Richards 7d3693de38 [fenix] Fixes https://github.com/mozilla-mobile/fenix/issues/9504: Edit logins (https://github.com/mozilla-mobile/fenix/pull/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