From ffa44d258b79c949057660ac370105dbc76c0d34 Mon Sep 17 00:00:00 2001 From: Jos Poortvliet Date: Wed, 16 Sep 2026 12:08:41 +0200 Subject: [PATCH] fix(teams): show email to tell apart members with the same name The member pickers already use the files_sharing sharee API, but threw away shareWithDisplayNameUnique and had no second line to render it. Compute a subname with the same rules as the Files sharing input (respecting the always_show_unique capability) and show it in both the team page picker and the team creation wizard. The team page picker now renders NcListItem instead of NcUserBubble, whose #title slot no longer exists in @nextcloud/vue 9, so the selected checkmark was not shown either. Also drops the duplicate display name block, which counted a field that was never set. Fixes #1047 Assisted-by: Claude Opus 5 Signed-off-by: Jos Poortvliet --- package-lock.json | 1 + package.json | 1 + src/teams/api.ts | 2 + src/teams/components/TeamCreationWizard.vue | 3 + .../EntityPicker/EntitySearchResult.vue | 114 +++++------------- .../services/collaborationAutocompletion.js | 53 ++++---- .../collaborationAutocompletion.spec.ts | 78 ++++++++++++ src/teams/types.ts | 2 + 8 files changed, 149 insertions(+), 105 deletions(-) create mode 100644 src/teams/team-page/services/collaborationAutocompletion.spec.ts diff --git a/package-lock.json b/package-lock.json index f688fa42f..7801f2511 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@mdi/js": "^7.4.47", "@nextcloud/axios": "^2.5.1", + "@nextcloud/capabilities": "^1.2.1", "@nextcloud/cdav-library": "^2.6.2", "@nextcloud/dialogs": "^7.4.0", "@nextcloud/files": "^4.0.0", diff --git a/package.json b/package.json index d5f6e827f..7483b2bd4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "dependencies": { "@mdi/js": "^7.4.47", "@nextcloud/axios": "^2.5.1", + "@nextcloud/capabilities": "^1.2.1", "@nextcloud/cdav-library": "^2.6.2", "@nextcloud/dialogs": "^7.4.0", "@nextcloud/files": "^4.0.0", diff --git a/src/teams/api.ts b/src/teams/api.ts index 90bf1915f..75fa948dd 100644 --- a/src/teams/api.ts +++ b/src/teams/api.ts @@ -65,6 +65,7 @@ interface RawSuggestion { shareWith: string shareType: number user?: string | null + subname: string } /** @@ -585,6 +586,7 @@ export async function searchMemberCandidates(term: string): Promise + diff --git a/src/teams/team-page/components/EntityPicker/EntitySearchResult.vue b/src/teams/team-page/components/EntityPicker/EntitySearchResult.vue index 9f34acaef..664e2d0a8 100644 --- a/src/teams/team-page/components/EntityPicker/EntitySearchResult.vue +++ b/src/teams/team-page/components/EntityPicker/EntitySearchResult.vue @@ -8,32 +8,39 @@ {{ t('circles', 'Add {type}', { type: source.label.toLowerCase() }) }} - -