Skip to content

feat(contactsmenu): Sort by user status - #41266

Merged
ChristophWurst merged 1 commit into
masterfrom
feat/contactsmenu/user-status-sorting
Nov 8, 2023
Merged

feat(contactsmenu): Sort by user status#41266
ChristophWurst merged 1 commit into
masterfrom
feat/contactsmenu/user-status-sorting

Conversation

@ChristophWurst

@ChristophWurstChristophWurst commented Nov 3, 2023

Copy link
Copy Markdown
Member

Summary

List system contacts with a recent custom status message first sorted descending by the status change time, then all other contacts sorted ascending by their name.

If user_status is not enabled or nobody set their custom status recently, fall back to sorting by contact name ascending only.

TODO

  • Make it work
  • Fix usage of \OCP\Contacts\ContactsMenu\IContactsStore::getContacts with pagination Not used anyway. API now falls back to old behavior if offset is supplied.

image

(avatars are only broken because automated tests deleted them …)

Follow-up

  • Make it fast

Checklist

@ChristophWurstChristophWurst added the 2. developing Work in progress label Nov 3, 2023
@ChristophWurstChristophWurst self-assigned this Nov 3, 2023
Comment threadlib/private/Contacts/ContactsMenu/Manager.php Fixed
Comment threadlib/private/Contacts/ContactsMenu/Manager.php Fixed
Comment threadlib/private/Contacts/ContactsMenu/Manager.php Fixed
@miaulalala

Copy link
Copy Markdown
Contributor

Something's weird with the name resolution:

image

This is supposed to be "Anna Admin"

@miaulalala

Copy link
Copy Markdown
Contributor

Otherwise it looks good:

image

@ChristophWurst

Copy link
Copy Markdown
MemberAuthor

This is supposed to be "Anna Admin"

Fixed. It's a remote user overlapping with a local UID.

@miaulalalamiaulalala left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it, works great!

@ChristophWurst
ChristophWurstforce-pushed the feat/contactsmenu/user-status-sorting branch from ab9bbe2 to 13685e6CompareNovember 8, 2023 18:50
@ChristophWurstChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Nov 8, 2023
If user_status is not enabled, fall back to sorting by contact name.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst
ChristophWurstforce-pushed the feat/contactsmenu/user-status-sorting branch from 13685e6 to 71080a8CompareNovember 8, 2023 20:53
@ChristophWurst
ChristophWurst merged commit 734b11d into masterNov 8, 2023
@ChristophWurst
ChristophWurst deleted the feat/contactsmenu/user-status-sorting branch November 8, 2023 21:21
@blizzzblizzz mentioned this pull request Nov 9, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishenhancementfeature: contacts menu

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show status instead of email in contacts/people menu

4 participants

@ChristophWurst@miaulalala@Pytal@github-advanced-security