Skip to content

Commit

Permalink
fix: if we delete contact permanently, we see delete address book but…
Browse files Browse the repository at this point in the history
…ton (#250)

* fix: if we delete contact permanently, we see delete address book button
  • Loading branch information
dhavaldodiya authored Aug 21, 2024
1 parent 7ff1d87 commit ff4878c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/actions/delete-contacts.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("Delete-contacts' actions", () => {
expect(result.current).toEqual<UIAction<unknown, unknown>>(
expect.objectContaining({
icon: 'DeletePermanentlyOutline',
label: 'Delete contacts permanently',
label: 'Delete contact permanently',
id: 'delete-contacts-action'
})
);
Expand Down Expand Up @@ -65,6 +65,6 @@ describe('execute actions', () => {
populateFoldersStore();
const { result } = setupHook(useActionDeleteContacts);
const action = result.current;
expect(action.label).toBe('Delete contacts permanently');
expect(action.label).toBe('Delete contact permanently');
});
});
2 changes: 1 addition & 1 deletion src/actions/delete-contacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const useActionDeleteContacts = (): ActionDeleteContacts => {
return useMemo(
() => ({
id: ACTION_IDS.deleteContacts,
label: t('folder.action.delete_permanently', 'Delete contacts permanently'),
label: t('tooltip.list_trash.deletePermanently', 'Delete contact permanently'),
icon: 'DeletePermanentlyOutline',
execute,
canExecute
Expand Down
2 changes: 1 addition & 1 deletion src/constants/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const CONTACT_ACTIONS_DESCRIPTORS = {
},
deletePermanently: {
id: 'deletePermanently',
desc: 'Delete contacts permanently',
desc: 'Delete contact permanently',
icon: 'DeletePermanentlyOutline'
},
delete: {
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/views/folder/list-item-action-wrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const HoverBarContainer = styled(Container)`
display: none;
position: absolute;
background: linear-gradient(to right, transparent, ${({ theme }) => theme.palette.gray6.hover});
height: 45%;
height: 55%;
& > * {
margin-top: ${({ theme }) => theme.sizes.padding.small};
margin-right: ${({ theme }) => theme.sizes.padding.small};
Expand Down
5 changes: 3 additions & 2 deletions src/legacy/views/preview/contact-preview-content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,9 @@ function ContactPreviewContent({ contact, onEdit, onDelete, onMail, onMove }) {
{showTagIcon && (
<Padding left="small">
<Tooltip label={singleTagLabel} disabled={showMultiTagIcon}>
<IconButton
<Button
data-testid="TagIcon"
type="ghost"
size="large"
onClick={onTagClick}
icon={tagIcon}
Expand Down Expand Up @@ -409,7 +410,7 @@ function ContactPreviewContent({ contact, onEdit, onDelete, onMail, onMove }) {
<Tooltip
label={
isTrash(contact.parent)
? t('folder.action.delete_permanently', 'Delete contacts permanently')
? t('tooltip.list_trash.deletePermanently', 'Delete contact permanently')
: t('label.delete', 'Delete')
}
>
Expand Down

0 comments on commit ff4878c

Please sign in to comment.