the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
1.01k stars 122 forks source link

Display Simplified Contact Names (First and Last Name Only) #1811

Open mstolf opened 1 week ago

mstolf commented 1 week ago

Is your feature request related to a problem? Please describe. Currently, the system displays the full contact name (FN) as retrieved from the CardDAV server. This can be frustrating when the full name includes middle names, titles, or other information, making the contact list longer and more cluttered. Users may find it difficult to quickly identify contacts at a glance, especially when they only need to see the first and last names.

Describe the solution you'd like I would like to have an option in the contact settings that allows users to display only the first and last names of contacts, instead of the full name (FN). This setting would parse the FN field and extract just the first and last name for display, simplifying the contact list view.

Describe alternatives you've considered An alternative could be a more customizable display option where users can choose which parts of the name (e.g., first, middle, last, title) they want to see. However, a simple first and last name toggle would likely cover the needs of most users without overcomplicating the UI.

Additional context The setting could be added to the existing contact settings menu (as shown in the attached screenshot). When enabled, the contacts list will show only the first and last name, helping users to quickly identify individuals while keeping the display clean and concise.

image

the-djmaze commented 6 days ago

Currently it uses https://github.com/the-djmaze/snappymail/blob/f877b849eb935407e16be78a343ac8d55db51e29/dev/Model/Contact.js#L119-L126

But changing line 125 into the below might be better?

return c || a || b;

In this case the Nickname becomes first and you can put anything in there. This also solves the issue where some people have the same first and last name (yes, i know a few)