displayname, title, name order of preference for the memberslistcard

Signed-off-by: Peter Macdonald <peterm4c@pm.me>
This commit is contained in:
Peter Macdonald
2026-04-14 10:06:42 +02:00
parent 4d98196561
commit 64c9a20004
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-org': patch
---
The `MembersListCard` now prefers `metadata.title` over `metadata.name` when displaying the group membership card similarly to the rest of the `GroupProfileCards`
@@ -168,12 +168,12 @@ export const MembersListCard = (props: {
const { entity: groupEntity } = useEntity<GroupEntity>();
const {
metadata: { name: groupName, namespace: grpNamespace },
metadata: { name: groupName, namespace: grpNamespace, title: groupTitle },
spec: { profile },
} = groupEntity;
const catalogApi = useApi(catalogApiRef);
const displayName = profile?.displayName ?? groupName;
const displayName = profile?.displayName ?? groupTitle ?? groupName;
const cardTitle =
memberDisplayTitle ??
t('membersListCard.title', { groupName: displayName });