From c6328b1029a6ebe98e87f84662d69b6071634403 Mon Sep 17 00:00:00 2001 From: Wolfgang Haupt Date: Wed, 23 Sep 2026 17:36:18 +0200 Subject: [PATCH] feat(usergroup): show the avatar menu for users in a user column Renders users in a user column with NcAvatar and its built-in menu next to the display name, so the profile of a referenced user can be viewed without leaving the table. A click on an avatar with a menu opens the menu instead of starting inline editing, the current user is highlighted as before, and the menu is disabled on public shares. Groups and teams keep the user bubble. Assisted-by: ClaudeCode:claude-fable-5-1 Signed-off-by: Wolfgang Haupt --- playwright/e2e/column-usergroup.spec.ts | 12 ++--- .../ncTable/partials/TableCellUsergroup.vue | 49 +++++++++++++++++-- src/shared/mixins/searchUserGroup.js | 2 +- 3 files changed, 53 insertions(+), 10 deletions(-) diff --git a/playwright/e2e/column-usergroup.spec.ts b/playwright/e2e/column-usergroup.spec.ts index 61057286c0..ae9eb846da 100644 --- a/playwright/e2e/column-usergroup.spec.ts +++ b/playwright/e2e/column-usergroup.spec.ts @@ -33,8 +33,8 @@ test.describe('Test column ' + columnTitle, () => { await page.locator('[data-cy="createRowSaveButton"]').waitFor({ state: 'visible' }) await page.locator('[data-cy="createRowSaveButton"]').click() - await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: user.userId }).first()).toBeVisible() - await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: nonLocalUser.userId }).first()).toBeVisible() + await expect(page.locator('[data-cy="ncTable"] table tr td .usergroup-entry').filter({ hasText: user.userId }).first()).toBeVisible() + await expect(page.locator('[data-cy="ncTable"] table tr td .usergroup-entry').filter({ hasText: nonLocalUser.userId }).first()).toBeVisible() }) test('Create column and rows without default values', async ({ userPage: { page }, request }) => { @@ -51,7 +51,7 @@ test.describe('Test column ' + columnTitle, () => { await page.locator('.vs__dropdown-menu li').filter({ hasText: nonLocalUser.userId }).first().click() await page.locator('[data-cy="createRowSaveButton"]').click() - await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: nonLocalUser.userId }).first()).toBeVisible() + await expect(page.locator('[data-cy="ncTable"] table tr td .usergroup-entry').filter({ hasText: nonLocalUser.userId }).first()).toBeVisible() }) test('Create and edit rows', async ({ userPage: { page, user }, request }) => { @@ -65,7 +65,7 @@ test.describe('Test column ' + columnTitle, () => { await page.locator('button').filter({ hasText: 'Create row' }).click() await page.locator('[data-cy="createRowSaveButton"]').click() - await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: user.userId }).first()).toBeVisible() + await expect(page.locator('[data-cy="ncTable"] table tr td .usergroup-entry').filter({ hasText: user.userId }).first()).toBeVisible() const firstRow = page.locator('[data-cy="ncTable"] [data-cy="customTableRow"]').first() await openRowActionMenu(page, firstRow) @@ -85,7 +85,7 @@ test.describe('Test column ' + columnTitle, () => { await saveEditRow(page) - await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name', { hasText: user.userId })).toBeHidden() - await expect(page.locator('[data-cy="ncTable"] table tr td .user-bubble__name').filter({ hasText: nonLocalUser.userId }).first()).toBeVisible() + await expect(page.locator('[data-cy="ncTable"] table tr td .usergroup-entry', { hasText: user.userId })).toBeHidden() + await expect(page.locator('[data-cy="ncTable"] table tr td .usergroup-entry').filter({ hasText: nonLocalUser.userId }).first()).toBeVisible() }) }) diff --git a/src/shared/components/ncTable/partials/TableCellUsergroup.vue b/src/shared/components/ncTable/partials/TableCellUsergroup.vue index 514bd08645..4c4b1f6093 100644 --- a/src/shared/components/ncTable/partials/TableCellUsergroup.vue +++ b/src/shared/components/ncTable/partials/TableCellUsergroup.vue @@ -7,7 +7,16 @@
- + + + + + {{ item.displayName ?? item.id }} + +
@@ -45,7 +54,8 @@