nextcloud / nextcloud/mail

Show email next to name in Search dropdown

Open Beginner friendly
#13,703 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. to triage enhancement
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

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

In the advanced Mail search dialog, the From and To autocomplete dropdowns currently display only the address label/display name.

For example:

John Smith

This becomes ambiguous when:

  • multiple people have the same display name
  • the user does not recognize the display name
  • the same person uses multiple email addresses
  • a collected address contains a useful display name but the actual email address is needed to identify it

The underlying autocomplete result already contains both label and email, but only the label is displayed.

Describe the solution you'd like

Display both the label and email address in the From and To autocomplete dropdown.

For example:

John Smith (john.smith@example.com)

If the label is already identical to the email address, show only the email address:

john.smith@example.com

This should apply both to:

  • dropdown options
  • the selected option

The search/filter value itself should remain the email address, so this would only change presentation and not search semantics.

Example

Current:

John Smith

Suggested:

John Smith (john.smith@example.com)

If no separate display name exists:

john.smith@example.com

Describe alternatives you've considered

No response

Additional context

We tested this locally with Mail 5.12.0 using custom option and selected-option slots on the existing NcSelect components.

A simple formatter was sufficient:

formatRecipient(option) {
    if (!option) {
        return ''
    }

    const label = option.label || option.email || ''

    if (!option.email || option.email === label) {
        return label
    }

    return `${label} (${option.email})`
}```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the From and To autocomplete NcSelect components in the advanced Mail search dialog, then inspect how their options and selected values are rendered. Use the existing option data containing label and email; done means both dropdown options and the selected option show the requested formatted recipient while the search value remains the email address.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.