Skip to content

[Data Objects] Show the technical field name to admins as a tooltip on field labels - #4255

Draft
sholzer wants to merge 3 commits into
2026.xfrom
claude/issue-platform-version-522-field-name-tooltip
Draft

sholzer wants to merge 3 commits into
2026.xfrom
claude/issue-platform-version-522-field-name-tooltip

Conversation

@sholzer

@sholzer sholzer commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Changes in this pull request

Resolves pimcore/platform-version#522

In the legacy admin UI, hovering a data object field's label showed the field's technical name, which is needed to write queries in the object grid's advanced search. Studio's field labels had no such tooltip.

Studio now shows it the way the legacy UI did (admin-ui-classic-bundle object/helpers/edit.js): for admins only, the plain field name as a tooltip on the label text.

  • FieldLabel wraps the label text in Studio's Tooltip when a technical name is provided through the new FieldLabelTechnicalNameProvider context. Without the provider it renders exactly as before, so document editables and every other caller are unchanged.
  • The provider is set by the data object form item (DataComponentFormItem) and by the grid's inline-edit modal (DataObjectAdapterCell). It passes the name only when the current user is an admin (useUser().isAdmin).
  • Nested fields show their plain definition key, never the form path: fields in localized fields, object bricks, field collections and blocks, and classification store keys (their key name, not the numeric key id).
  • The existing help icon keeps the class-definition tooltip; the batch-edit modal is unchanged (its field titles are tags, as in legacy, where the batch window had no name tooltip either).

For reviewers to weigh:

  • The issue argues for data-maintenance users without access to the class editor; this follows the legacy behaviour (admins only) instead.
  • FieldLabel and the SDK-exported DataObjectAdapterCell gain opt-in behaviour; no signatures change.

Additional info

Tests

  • field-label.test.tsx: an admin sees the technical name on the label text; a non-admin does not; a document editable label gets no tooltip.
  • form-item.test.tsx, data-component.test.tsx: the plain key for top-level fields, block items, localized fields and classification store keys.
  • data-object-adapter-cell.test.tsx: the grid edit modal's label gets the column's plain key.
  • The new tests fail without the change.

Verified

  • check-types, lint, npm test (1932 tests) and build-app pass.
  • In a browser against a demo instance, with this branch's build served and writes blocked, as an admin: top-level, localized and nested fields (brick, field collection, block, classification store keys) show their plain key; the help icon keeps its help text; the grid inline-edit modal shows the column's key; the batch-edit modal and a document's switch editable labels show no tooltip.
  • Non-admin, simulated in the test browser by returning the current-user response with isAdmin: false: no tooltip on the labels.

Not verified

  • A real non-admin login (only simulated, see above).
  • A classification store column in the grid inline-edit modal (the demo's grid does not support those columns), and a localized or brick column there.

The build output is not part of this PR.

🤖 Generated with Claude Code

sholzer and others added 3 commits October 22, 2026 16:33
…oltip on data object field labels

Hovering a data object field label in the edit view and in the grid edit modal
shows the field's class-definition key, as in the legacy admin UI. The data object
form item and the grid edit modal provide the plain definition name (the key name
for classification store keys) to FieldLabel through a context; document editables
render FieldLabel without it and stay unchanged. The help icon keeps its tooltip.

Co-Authored-By: Claude <noreply@anthropic.com>
…nder an element

Sonar's function-name rule reads mocked components that return null as plain functions.

Co-Authored-By: Claude <noreply@anthropic.com>
…mins only

Co-Authored-By: Claude <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

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.

Studio - Show technical field name as tooltip on field labels

1 participant