Skip to content

fix(adminui): preserve raw Name as the default DisplayName - #1657

Merged
VargaJoe merged 1 commit into
feature/sn-auth-package-extraimprovementsfrom
fix/adminui-preserve-display-name
Nov 4, 2026
Merged

VargaJoe merged 1 commit into
feature/sn-auth-package-extraimprovementsfrom
fix/adminui-preserve-display-name

Conversation

@VargaJoe

@VargaJoe VargaJoe commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

When the AdminUI New content form submits only Name, the repository normalizes that value before an empty DisplayName falls back to it. The displayed title can therefore lose the original accents, casing or non-Latin characters. This also occurs with the existing invalid-character replacement; the optional normalization in SenseNet/sensenet#2248 makes it more visible.

Change

  • Copy the original, unmodified Name into the create payload's DisplayName when DisplayName is missing, empty or null, and Name is present.
  • Preserve explicitly entered DisplayName values exactly, including Unicode and whitespace.
  • Copy the form model instead of mutating it; retain other fields, content type/template selection and completion behavior.

With name normalization enabled, a Name-only input such as árvízTŰRŐ tükörfúrógép 鳥山明 japán és 你好 produces:

  • Name: arvizturo-tukorfurogep-niaoshanming-japan-es-nihao
  • DisplayName: árvízTŰRŐ tükörfúrógép 鳥山明 japán és 你好

Scope and compatibility

This changes only the AdminUI new-content submission. Existing content, edit/rename behavior, repository naming providers and server-side validation are unchanged. No configuration switch or data migration is added.

DisplayName-only distinction: the existing DisplayName-only API behavior is preserved and tested. This PR does not make the Name input optional in the AdminUI, so it does not yet implement a DisplayName-only user-interface flow.

Base: feature/sn-auth-package-extraimprovements at b5a3545f. Fix commit: 2cd2fe26.

Validation

  • 7/7 component regression tests passed, including missing/empty/null DisplayName, explicit Unicode/whitespace values, input immutability, DisplayName-only payloads and unnamed input. The three defaulting cases fail before the fix.
  • 4/4 real local repository integration checks passed through the actual NewView submit callback: Name-only, empty DisplayName, explicit DisplayName and DisplayName-only. Content was created and reloaded over HTTP; the generated Name and retained DisplayName were checked. These test the submit boundary and repository, not a full browser form session.
  • ESLint, Prettier, Git diff checks and commit hooks passed. Independent read-only code review found no actionable issues.

Existing base-branch failures

  • The full AdminUI suite passed 292/293 tests, with zero skipped. The Grid test fails on a React aria-description console warning; the same test also fails with the unmodified base.
  • The application typecheck reported the same 25 errors with the base and fix. Rebuilding workspace type prerequisites also encounters existing picker/MUI TreeItem/TreeView type errors. These broader issues were not changed by this fix.

Manual check

Using an AdminUI built from this branch, create a Folder with the multilingual Name above and leave DisplayName blank. Verify that Name is normalized while DisplayName retains the original text. Repeat under a separate parent with an explicit, different Unicode DisplayName and verify that it remains unchanged.

@VargaJoe VargaJoe changed the title fix(adminui): preserve original display name on content creation fix(adminui): preserve raw Name as the default DisplayName Nov 4, 2026
@VargaJoe
VargaJoe marked this pull request as ready for review November 4, 2026 20:41
@VargaJoe
VargaJoe merged commit de90629 into feature/sn-auth-package-extraimprovements Nov 4, 2026
2 of 6 checks passed
@VargaJoe
VargaJoe deleted the fix/adminui-preserve-display-name branch November 4, 2026 21:16
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.

1 participant