diff --git a/.changeset/plain-avatar-actions.md b/.changeset/plain-avatar-actions.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/plain-avatar-actions.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/mosaic/src/features/user-profile/user-profile-profile-section/__tests__/user-profile-profile-section.feature.test.tsx b/packages/mosaic/src/features/user-profile/user-profile-profile-section/__tests__/user-profile-profile-section.feature.test.tsx index eb499a0da20..48470e427db 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-profile-section/__tests__/user-profile-profile-section.feature.test.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-profile-section/__tests__/user-profile-profile-section.feature.test.tsx @@ -101,6 +101,9 @@ describe('the user profile profile section', () => { await openMenu(actor, await screen.findByRole('button', { name: 'Manage profile picture' })); expect(screen.getByRole('menuitem', { name: 'Remove avatar' })).toBeInTheDocument(); + expect(screen.getByRole('menuitem', { name: 'Change avatar' }).querySelector('svg')).toBeNull(); + expect(screen.getByRole('menuitem', { name: 'Remove avatar' }).querySelector('svg')).toBeNull(); + expect(screen.getByRole('menuitem', { name: 'Remove avatar' })).toHaveAttribute('data-color', 'negative'); }); it('says why an upload was refused', async () => { diff --git a/packages/mosaic/src/features/user-profile/user-profile-profile-section/user-profile-picture-row.view.tsx b/packages/mosaic/src/features/user-profile/user-profile-profile-section/user-profile-picture-row.view.tsx index 28e1badf490..f8c05774bb1 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-profile-section/user-profile-picture-row.view.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-profile-section/user-profile-picture-row.view.tsx @@ -3,8 +3,6 @@ import { ActionMenu } from '../../../components/action-menu'; import { Avatar } from '../../../components/avatar'; import { Button } from '../../../components/button'; import { Section } from '../../../components/section'; -import { Pen } from '../../../icons/glyphs/pen'; -import { X } from '../../../icons/glyphs/x'; import { useMessages } from '../../../localization'; import { FileUpload } from '../../../primitives/file-upload'; import type { UserProfilePictureController } from './user-profile-picture.controller'; @@ -92,11 +90,11 @@ function ProfilePictureActions({ const actions: ActionMenuAction[] = []; if (hasImage && canChange) { - actions.push({ label: m.picture.change, icon: Pen, onClick: openFilePicker }); + actions.push({ label: m.picture.change, onClick: openFilePicker }); } if (hasImage && onRemove) { - actions.push({ label: m.picture.remove, icon: X, onClick: onRemove }); + actions.push({ label: m.picture.remove, color: 'negative', onClick: onRemove }); } if (actions.length > 0) {