Skip to content

Improvement: Rename "Display name" → "Name" and auto-derive Name from email #1941

Closed

Description

@yannickmonney

Problem

The profile label reads "Display name" everywhere; it should simply be "Name". Users also have to type their name manually even though the email usually implies it.

Current behavior

  • Label account.profile.name = "Display name" at services/platform/messages/en.json:5223; description at :5220.
  • Field rendered in ProfileSection, services/platform/app/features/settings/account/components/account-form.tsx:90-198 (input id="display-name", :171-182).
  • No email→name derivation exists anywhere.

Proposed change

  1. Rename "Display name" → "Name" in all locales (en.json, de.json, …) and any packages/ui shared namespaces; update the field id/aria-label accordingly. Grep both services/platform/messages/* and component literals for "Display name"/"display name".
  2. Add a shared, well-tested deriveNameFromEmail(email): string util (e.g. services/platform/lib/utils/derive-name-from-email.ts). Advanced heuristic:
    • Take the local-part before @; drop any +tag alias suffix.
    • Tokenize on ., _, -.
    • Per token: strip leading/trailing digits; drop tokens that become empty.
    • If ≥1 token has length ≥2 → Title-Case those tokens, drop single-char tokens (initials), join with space. (marcel.jan.kurbeck98→Marcel Jan Kurbeck; marcel.k→Marcel; j.smith→Smith; john.doe→John Doe)
    • If no token has length ≥2 or there were no separators → keep the raw local-part verbatim, unchanged case (mk→mk).
    • Optionally split camelCase handles (johnDoe→John Doe) and normalize accents/locale casing.
    • Cover edge cases: numeric-only, empty, very long, unicode, repeated separators, trailing dots.
  3. Apply the suggestion in: signup, first-user/owner onboarding, invited-member default, and the profile form. In every name-capturing form, order email first, then Name — and pre-fill Name with the derived suggestion as an editable value (not a locked field).

Acceptance criteria

  • No "Display name" string remains in any locale or component.
  • deriveNameFromEmail has unit tests covering all cases above (co-located *.test.ts).
  • Creating an account / inviting a member / editing profile shows the derived Name, editable, with the email field positioned before the Name field.

Ripple

All locale files; new util + tests; signup / invite / profile forms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featimprovementservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions