Repository navigation
Conversation
Refs nextcloud#5786 Signed-off-by: david <github@djs.gg>
| self::SUBTITLE_ORDER, | ||
| ValueType::ARRAY, | ||
| defaultRaw: SubtitleOrderService::DEFAULT_ORDER, | ||
| definition: 'Order in which the contacts list tries org, email and tel for the line under each name.', |
There was a problem hiding this comment.
Is there a reason this isn't lazy?
There was a problem hiding this comment.
Switched to lazy, matching the other entries in the lexicon.
There was a problem hiding this comment.
Thanks a lot for the contribution!
Blocking until we get design review from @kra-mo
I'm not super sure about adding this much UI for this
Maybe the originally proposed dropdown would be a more simple solution, even though I acknowledge that it would give less control over fallbacks
kra-mo
left a comment
There was a problem hiding this comment.
I'd much more be in favor of having a more flexible solution to this, such as a table view, instead of adding a separate setting for every potential use-case. I'm not a fan of this approach.
📸 Screenshots —
|
@kra-mo I don't quite understand what you mean, so in the sidebar list we would add more than one piece of information about the contact? |
@GVodyanov I mean, instead of changing the current view, we could introduce different layouts. The same way that Mail has Vertical/Horizontal/List, Contacts could have the current Vertical layout, and then also Cards or Table, which could show more information and have a horizontal split. |
…ch name Refs nextcloud#5786 Signed-off-by: david <github@djs.gg>
|
Thanks for the reviews. A smaller version is possible: a single "Show under each name" dropdown with Organization, Email and Phone number. The chosen field is shown first, and the other two keep today's order as fallbacks, so it is one control the size of "Sort contacts by". Alternative layouts such as a table sound useful, but they are beyond the scope of this pull request. |
Yes, but I think they would also solve the problem that this pull request tries to, as well as others, I'm inclined to go ahead with something like that instead. |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
|
I am bit confused. The goal was to be able to scroll through the contact list seeing just each contact's name and a preferred field underneath, as opposed to the pre-configured default field, which may not be equally useful to all users. I am not seeing how the table UI accomplishes this. The intention was to be able to quickly scroll preferred info at a glance. If the table solution is adding additional UI, it does not solve the problem this PR is trying to address. |
This PR adds extra configuration to change how the default UI works, which addressed a very specific problem, and which would have to be configured potentially multiple times by the same user, depending on what they are interested in at a time. With a separate table view, we could keep the default view simple, since it already works for most people, who do not need to necessarily see details right away. But for those that do, they would be able to switch to a more "advanced" table view, which would allow them to see and compare all of this info at once, no matter which field they are currently interested in. |
|
I think it is more fair to say users would "get to" configure the contact list depending on what they are interested in at the time. No one would "have to" configure anything under this proposal, unless the default view specifically does not work for them. The PR also does not address a need to see "more" details, but rather a need to configure what is already available at a glance. I personally do not see why organization should be a preferred field forced upon the user from the default interface, which otherwise feels perfectly intuitive. Just to be clear. My intended use case for this PR was to be able to scroll down my contact list and read off a phone number for a contact without having to break context by expanding a contact or changing views, which costs additional keyboard inputs/clicks. |
|
Thanks for the mockup, it looks much cleaner. Happy to rework it that way. One question. The preferred field is saved to the user's account. The sort order is saved per browser. Side by side in one menu, that would feel odd. Moving the sort order to the account too seems worth it. Fine to include that here? |
|
Not sure, I'd look at how other apps handle similar preferences (such as Talk for sorting and grouping) and go with that approach for both. |





Closes #5786
The line under each name in the contacts list followed a fixed rule: organization, then email, then phone. This adds "Show under each name" to the General settings. It is an ordered list of Organization, Email and Phone number, moved with up and down buttons, and each contact shows the first field in that order that it has. The default is the old order, so no list changes until its user reorders it.
The order is a per-user config value,
subtitle_order, declared in the config lexicon and provided as initial state. A new OCS endpoint saves it,PUT /api/v1/settings/subtitle-order, which accepts only org, email and tel, each exactly once.The ordering replaces the fixed choices proposed in #5786, where "Automatic" and "Organization first" were the same order. An ordering covers the other choices and also sets their fallbacks.
Tests: Jest for picking the line and saving the order, and PHPUnit for the service, the endpoint and the initial state. Tested by hand on Nextcloud 33.0.10 with two users.
🤖 AI (if applicable)