Skip to content

UFM: Add umbMemberName component (closes #22147) - #23165

Merged
AndyButland merged 3 commits into
v17/devfrom
v17/feature/ufm-member-name
Jun 19, 2026
Merged

UFM: Add umbMemberName component (closes #22147)#23165
AndyButland merged 3 commits into
v17/devfrom
v17/feature/ufm-member-name

Conversation

@leekelleher

@leekelleher leekelleher commented Jun 18, 2026

Copy link
Copy Markdown
Member

Description

Fixes #22147.

Adds a new {umbMemberName:alias} UFM (Umbraco Flavored Markdown) component that resolves a Member Picker property value to the member's display name.

Why a dedicated component? {umbContentName} already imports UmbMemberItemRepository but defaults to the document entity type when the value has no type/mediaKey discriminator. A Member Picker persists a bare GUID — ambiguous without the marker to signal intent — so a separate marker is the correct design.

Value structure support

The component resolves member references regardless of how they are stored, handling each of the following (as a single value or an array):

  • Bare GUID: "3f2504e0-4f89-11d3-9a0c-0305e82c3301"
  • Comma-separated GUIDs: "guid1,guid2"
  • UDI: umb://member/{GUID}
  • Content Picker object: { type, unique } (where unique may itself be a GUID or UDI)

Names are joined by , when multiple members resolve.

Known duplication (intentional)

The observe/alias-extraction logic is structurally similar to content-name.element.ts. A shared base was considered and deferred — if a third name-resolving UFM component appears, that's the moment to extract it.

Steps to test

  1. Add a Member Picker property (alias: memberPicker) to a document type.
  2. Set the property's label or description to {umbMemberName:memberPicker}.
  3. Open a content node, pick a member, and confirm the member's name renders in the label/description.
  4. To test multi-value support, temporarily point the marker at a custom value containing two comma-separated member GUIDs and confirm both names render.

This is to support the standalone Member Picker values.
@leekelleher leekelleher changed the title UFM: Add umbMemberName component (closes #) UFM: Add umbMemberName component (closes #22147) Jun 18, 2026
@leekelleher
leekelleher marked this pull request as ready for review June 18, 2026 14:01
Copilot AI review requested due to automatic review settings June 18, 2026 14:01
@leekelleher leekelleher linked an issue Jun 18, 2026 that may be closed by this pull request
@claude

This comment was marked as resolved.

This comment was marked as resolved.

@claude claude Bot added the category/ui User interface label Jun 18, 2026

@AndyButland AndyButland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests out as expected @leekelleher:

Image

I've also verified:

  • Multiple members
  • UDI syntax
  • MNTP output

As per the other PR - looks like we have marked-ufm.test.ts used to test various components, including umbContentName. Should a test for this be added there too?

I added the "needs docs" label as this component should be documented here (and for 18).

@leekelleher leekelleher added the status/needs-docs Requires new or updated documentation label Jun 19, 2026
@leekelleher

leekelleher commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

Thanks @AndyButland! Added two parsing tests for umbMemberName to marked-ufm.test.ts (commit 1792eac).

re: docs. I'll follow-up with a docs PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UFM umbContentName getting member data

3 participants