Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show status instead of email in contacts/people menu #40559

Closed
2 of 3 tasks
Tracked by #22329 ...
ChristophWurst opened this issue Sep 21, 2023 · 12 comments · Fixed by #41266
Closed
2 of 3 tasks
Tracked by #22329 ...

Show status instead of email in contacts/people menu #40559

ChristophWurst opened this issue Sep 21, 2023 · 12 comments · Fixed by #41266
Assignees
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement feature: contacts menu feature: status

Comments

@ChristophWurst
Copy link
Member

ChristophWurst commented Sep 21, 2023

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.

As a Nextcloud user I want to see what other people are doing. If I click the people menu (formerly known as contacts menu) in the top right I see the first x contacts sorted by their name. For each contact I see the email address.

Describe the solution you'd like

Remove the email address subline and show the user status instead. Sort the contacts by their last status update.

Work packages

Additional context

N/a

@ChristophWurst
Copy link
Member Author

@jancborchardt @marcoambrosini @nimishavijay could you create a mockup for this? Should the menu also show the user online status (green dot etc)?

@jancborchardt jancborchardt self-assigned this Sep 26, 2023
@jancborchardt
Copy link
Member

  • We can pretty much have it look the same as the "Participants" tab in Talk, except with the "(moderator)" indicator removed. That is also very similar to the "Recent statuses" dashboard widget (which should ideally also be adjusted to include the online status).
  • Click events and menu items would still stay the same for now, this step is only about the subline, online status indicator and sorting.
  • Currently the list is very short at 4 entries (and also not clear one can scroll). We can make it larger to 6½ entries so that there are more entries and the half cut off entry suggests scrollability more.
    image

@ChristophWurst ChristophWurst added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels Sep 29, 2023
@ChristophWurst ChristophWurst self-assigned this Sep 29, 2023
@ChristophWurst
Copy link
Member Author

Medium-size technical barrier for this feature: https://github.com/nextcloud/server/blob/master/core/src/views/ContactsMenu.vue smells like a Vue components but the internals are still jquery and backbone

this.contactsMenu = new OC.ContactsMenu({
el: '#contactsmenu-menu',
})
.

To not increase technical debt further I should probably rewrite the menu in Vue first.

@ChristophWurst
Copy link
Member Author

This will revert the changes of #28822. cc @kesselb

@ChristophWurst
Copy link
Member Author

Currently the list is very short at 4 entries (and also not clear one can scroll). We can make it larger to 6½ entries so that there are more entries and the half cut off entry suggests scrollability more.

@jancborchardt I have looked into this problem already with my work on #40749. Unfortunately the height of the contact entries is not static. E.g. some entries have an email address, others have none. We'll have to see how that changes when we show the status. In the future we also want to show the latest message so there is another optional element :/

@jancborchardt
Copy link
Member

Unfortunately the height of the contact entries is not static. E.g. some entries have an email address, others have none.

This can be handled just like in Contacts – the entries are the same height no matter whether there is a subline or not. The only difference is that if there is no subline, the main text is vertically centered.

@ChristophWurst
Copy link
Member Author

Alright, I'll add a minimum height.

@ChristophWurst
Copy link
Member Author

Just dumping my thoughts here.

Adding status to contacts menu entries is doable with a small backwards-compatible API change. What's tricky is the change of sorting. Right now we read contacts from the contacts manager, which searches on the DB and knows a way to limit the number of results. We can't take that data, enhance it with status messages and sort again. We have to factor in status update time in the initial search. But that is not easy because of the identification mismatch between contacts (based on UUIDs, UID may be in the serialized vcf data) and statuses (based on Nextcloud user IDs). The two sources can't be joined on a database level.

Maybe we can first ask user status to give us the x latest user ids. Then we use this UID array to make a contacts search on UID (\OCP\IAddressBook::search supports it down to oc_cards_properties having UID indices). This should work, albeit with poor performance because it has the n+1 problem and requires 21 database queries to get 20 contacts.

@ChristophWurst
Copy link
Member Author

@jancborchardt do you have any requirements for the handling of contacts with statuses (aka system contacts) and other contacts? say on a small instance there are only three other family members and users. Should the contacts menu only show these three or should the rest of the contacts menu be filled with people from your personal address book?

@ChristophWurst
Copy link
Member Author

@jancborchardt would you say that emails should always be hidden or only if the contact is a user (system contact) and has a status?

@jancborchardt
Copy link
Member

@ChristophWurst it would be nice if there is always a relevant subline, also to distinguish possible different people with the same name. And yes the email seems good for that for people from Contacts. :)

@jancborchardt
Copy link
Member

Should the contacts menu only show these three or should the rest of the contacts menu be filled with people from your personal address book?

Not sure if this is resolved already but we talked about this when we defined it, no? The contacts menu should show both, but prioritize system accounts.

@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 2. developing Work in progress 3. to review Waiting for reviews labels Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement feature: contacts menu feature: status
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants