Sort logins
User Story
As a user, I want to be able to sort my logins, so I can find what I am looking for faster.
Acceptance Criteria
- [x] I can sort my logins alphabetically
- [x] I can sort my logins by last used
┆Issue is synchronized with this Jira Task
I started to work on this and making good progress but I saw in the provided UI specs that:
-
there is no indication for the user that "Saved logins" can be pressed to start an action

-
there is no indication to the user what is the current sorting strategy (once you pressed "Last used", for example, the list will be sorted but the options will disappear and the user will no longer be able to see "Last used" anywhere)

I propose keeping "Saved logins" as the title of the screen, shown in the top toolbar and then
- have a
Spinner(similar to this https://developer.android.com/images/ui/spinner.png "Items sorted"[alphabetically, last used]), element familiar to users as indicator of the current sorting strategy and which would also allow easily choosing a different sorting strategy as the first static element - the list of items below the spinner
What do you think @AmyYLee?
@ValentinTimisica Hi, thanks for pointing that out. I had a drop-down arrow in my original mock. I updated some assets and somehow the arrow was lost. I've updated the mocks with the drop-down arrow. The selected sort order is highlighted in grey when the user opens the menu.

@AmyYLee, can you also give me links(from abstract) with the UX mocks for dark theme and private mode?
@AmyYLee, can you also give me links(from abstract) with the UX mocks for dark theme and private mode? @ValentinTimisica Hi, I've added screens to the original mock. Let me know if you have any questions. It mostly follows what we currently have for Dark/Private theme.
https://share.goabstract.com/33afd8de-f90e-4504-90e3-ee2a3bcb1925?mode=design&sha=5b9a5b4a7dfe6bfd32504d101af0c0b54ee216e9
@AmyYLee, I saw that you added private mode and dark theme mocks for "Edit logins" but I need the mocks for "Sort by" part.

@ValentinTimisica
Hi, the drop-down follows the same styling as all of our menus in app. Please see below. Let me know if you have any questions. Please use below as reference for colours for dark/private theme

Hi, verified as fixed on the latest Nightly Build 200511 from 5/11 using the following devices:
• Google Pixel 3a (Android 10)
• Huawei Mate 20 Lite (Android 9)
• OnePlus A3 (Android 6.0.1)
Hi, I've re-checked this matter on Beta 5.1.0-beta.1 using the following devices:
• Google Pixel 3a (Android 10)
• Huawei Mate 20 Lite (Android 9)
• OnePlus A3 (Android 6.0.1)
It seems that the login credentials aren't properly sorted by default (sorted random)
1st scenario Name (A-Z)
Prerequisite:
Leave the sorting option set to Name (A-Z) (Sort alphabetically)
Steps to reproduce:
- Log in to the following websites in this order: • Twitter • Facebook • Yahoo • Instagram
- Check the saved logins
Expected behavior
The login credentials should be sorted as it follows: • Facebook • Instagram • Yahoo • Twitter
Actual behavior
• Yahoo • Facebook • Twitter • Instagram
Notes
❗ Reproducible on the latest Nightly 200520 from 5/20 ❗ If you select again the Name (A-Z) option the credentials will be properly sorted. On the other hand, if you close and re-open Fenix the credentials will be again sorted randomly (as per the Actual behaviour)
2nd Scenario Last used
Prerequisite:
Clean profile no Login credentials saved. Set the sorting option to Last used
Steps to reproduce:
- Log in to the following websites in this order: • Twitter • Facebook • Yahoo • Instagram
- Check the saved logins
Expected behavior
The login credentials should be sorted as it follows: • Instagram • Yahoo • Facebook • Twitter
Actual behavior
• Yahoo • Facebook • Twitter • Instagram
Notes
❗ Reproducible on the latest Nightly 200520 from 5/20 ❗ If you select again the Last used option the credentials will be properly sorted. On the other hand, if you close and re-open Fenix the credentials will be again sorted randomly (as per the Actual behaviour)
@eliserichards & @ValentinTimisica - Please review and share your thoughts I'll re-open this issue.
Thanks @AndiAJ. Seems like it's a regression from https://github.com/mozilla-mobile/fenix/pull/9693. I'll try to fix it.
Opened #10815 based on your comment. Closing this for now.