Skip to content

Add configurable name format preferences for user display and sorting#77

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/fix-18512424-4ecb-495d-b632-597cf441e400
Draft

Add configurable name format preferences for user display and sorting#77
Copilot wants to merge 4 commits intomasterfrom
copilot/fix-18512424-4ecb-495d-b632-597cf441e400

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 30, 2025

Overview

Implements user-configurable name display and sorting formats to support different cultural naming conventions and user preferences.

Changes

Users can now choose from three name format options in their settings:

  • First Last (e.g., "John Smith") - Western style with given name first
  • Last, First (e.g., "Smith, John") - Formal style with comma separator (default)
  • Last First (e.g., "Smith John") - Eastern style for Chinese and other cultures

Implementation Details

Backend

  • Created NameFormat enum with three format options
  • Extended UserSettingsEntity and UserSettings to store the preference
  • Added GetDisplayName(NameFormat) and GetSortName(NameFormat) methods to UserModel
  • Updated UserSettingsService to persist and retrieve the name format preference
  • Maintained backward compatibility by defaulting to LastCommaFirst format

Frontend

  • Added name format dropdown to the user settings page (/Account/Settings)
  • Added internationalized resource strings for all UI labels and format descriptions
  • Updated AccountController to handle the new setting in both GET and POST actions

Database

  • Created migrations for both SQLite and SQL Server databases
  • Added PreferredNameFormat column to UserSettings table with default value 1 (LastCommaFirst)

Testing

  • All 260 existing tests continue to pass
  • Added 6 comprehensive test methods covering all three name formats
  • Tests verify both display name and sort name formatting with various edge cases

Breaking Changes

None. The feature is fully backward compatible with existing data and code.

Migration Notes

When deploying this change, the database migration will automatically add the PreferredNameFormat column with a default value. Existing users will maintain the current "Last, First" format until they change their preference.

Fixes #[issue-number]

Original prompt

This section details on the original issue you should resolve

<issue_title>DisplayName and SortingName</issue_title>
<issue_description>Users should have a displayname and a sortingname. Also this should be configurable by the user what is the preferred way on each:

  • firstName lastName
  • lastName, firstName
  • lastName firstName (support chinese consumers)

</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #38

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits September 30, 2025 13:27
…tting

Co-authored-by: Matt-17 <11333169+Matt-17@users.noreply.github.com>
Co-authored-by: Matt-17 <11333169+Matt-17@users.noreply.github.com>
Co-authored-by: Matt-17 <11333169+Matt-17@users.noreply.github.com>
Copilot AI changed the title [WIP] DisplayName and SortingName Add configurable name format preferences for user display and sorting Sep 30, 2025
Copilot AI requested a review from Matt-17 September 30, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DisplayName and SortingName

2 participants