From 8e8e4032c76a1e270ae051f6a3cb4d8ade02e6fa Mon Sep 17 00:00:00 2001 From: yoyoyohamapi <8338436+yoyoyohamapi@users.noreply.github.com> Date: Fri, 23 May 2025 02:50:43 +0000 Subject: [PATCH] feat(core): remove attachment tooltip (#12467) ## Summary by CodeRabbit - **New Features** - Added a tooltip to the delete icon for attachments, displaying a localized description when hovered. - **Documentation** - Updated English localization to include a tooltip label for deleting attachments. --- .../view/attachments.tsx | 18 ++++++++++++------ packages/frontend/i18n/src/i18n.gen.ts | 4 ++++ packages/frontend/i18n/src/resources/en.json | 1 + 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/packages/frontend/core/src/modules/workspace-indexer-embedding/view/attachments.tsx b/packages/frontend/core/src/modules/workspace-indexer-embedding/view/attachments.tsx index 40b9a7dc7..7cdaab67f 100644 --- a/packages/frontend/core/src/modules/workspace-indexer-embedding/view/attachments.tsx +++ b/packages/frontend/core/src/modules/workspace-indexer-embedding/view/attachments.tsx @@ -131,12 +131,18 @@ const AttachmentItem: React.FC = ({ ) : null}
- + + +
); diff --git a/packages/frontend/i18n/src/i18n.gen.ts b/packages/frontend/i18n/src/i18n.gen.ts index 4ad155524..ffc8c9393 100644 --- a/packages/frontend/i18n/src/i18n.gen.ts +++ b/packages/frontend/i18n/src/i18n.gen.ts @@ -6263,6 +6263,10 @@ export function useAFFiNEI18N(): { * `Attachment will be removed. AI will not continue to extract content from this attachment.` */ ["com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.description"](): string; + /** + * `Delete File` + */ + ["com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.tooltip"](): string; /** * `Sharing doc requires AFFiNE Cloud.` */ diff --git a/packages/frontend/i18n/src/resources/en.json b/packages/frontend/i18n/src/resources/en.json index 62ec64b7e..23c4ced4e 100644 --- a/packages/frontend/i18n/src/resources/en.json +++ b/packages/frontend/i18n/src/resources/en.json @@ -1565,6 +1565,7 @@ "com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.description": "The uploaded file will be embedded in the current workspace.", "com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.title": "Remove the attachment from embedding?", "com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.description": "Attachment will be removed. AI will not continue to extract content from this attachment.", + "com.affine.settings.workspace.indexer-embedding.embedding.additional-attachments.remove-attachment.tooltip": "Delete File", "com.affine.share-menu.EnableCloudDescription": "Sharing doc requires AFFiNE Cloud.", "com.affine.share-menu.ShareMode": "Share mode", "com.affine.share-menu.SharePage": "Share doc",