From 07b2c64c57446b136e0d20994c51f1f93a4a2c3b Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:15:55 +0800 Subject: [PATCH 1/3] fix(ArticleDetail): fix unit test --- .../CommentBeta/Content/Content.test.tsx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/components/CommentBeta/Content/Content.test.tsx b/src/components/CommentBeta/Content/Content.test.tsx index d3b21f86ce..397645e5ea 100644 --- a/src/components/CommentBeta/Content/Content.test.tsx +++ b/src/components/CommentBeta/Content/Content.test.tsx @@ -26,9 +26,7 @@ describe('', () => { type="article" /> ) - expect( - screen.getByText('This comment has been collapsed by the author') - ).toBeInTheDocument() + expect(screen.getByText('Comment has been hidden')).toBeInTheDocument() // blocked by user cleanup() @@ -42,12 +40,10 @@ describe('', () => { type="article" /> ) - expect( - screen.getByText('This comment has been collapsed by the author') - ).toBeInTheDocument() - }) + expect(screen.getByText('Comment has been hidden')).toBeInTheDocument() - it('should render a banned Comment.Content', () => { + // banned by user + cleanup() render( ', () => { type="article" /> ) - expect( - screen.getByText( - 'This comment has been archived due to a violation of the user agreement' - ) - ).toBeInTheDocument() + expect(screen.getByText('Comment has been hidden')).toBeInTheDocument() }) it('should render an archived Comment.Content', () => { From 1e9d827ac105d486c42106b32735d415e57cdceb Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:36:58 +0800 Subject: [PATCH 2/3] fix(lang): fix copy --- lang/default.json | 4 ++++ lang/en.json | 4 ++++ lang/zh-Hans.json | 4 ++++ lang/zh-Hant.json | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/lang/default.json b/lang/default.json index 98a5ef35e7..d09c5a7a38 100644 --- a/lang/default.json +++ b/lang/default.json @@ -2388,6 +2388,10 @@ "defaultMessage": "left a comment in {circleName}", "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx" }, + "zn83cE": { + "defaultMessage": "Preview", + "description": "src/components/Editor/ToggleAccess/SupportSettingDialog/Content.tsx" + }, "zvNfwL": { "defaultMessage": "Operation too frequent, please try again later.", "description": "ACTION_LIMIT_EXCEEDED" diff --git a/lang/en.json b/lang/en.json index fa9d9f4301..e559f41b3d 100644 --- a/lang/en.json +++ b/lang/en.json @@ -2388,6 +2388,10 @@ "defaultMessage": "left a comment in {circleName}", "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx" }, + "zn83cE": { + "defaultMessage": "Preview", + "description": "src/components/Editor/ToggleAccess/SupportSettingDialog/Content.tsx" + }, "zvNfwL": { "defaultMessage": "Operation too frequent, please try again later.", "description": "ACTION_LIMIT_EXCEEDED" diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json index b869161377..efcbcd9d6f 100644 --- a/lang/zh-Hans.json +++ b/lang/zh-Hans.json @@ -2388,6 +2388,10 @@ "defaultMessage": "在 {circleName} 中留言", "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx" }, + "zn83cE": { + "defaultMessage": "效果预览", + "description": "src/components/Editor/ToggleAccess/SupportSettingDialog/Content.tsx" + }, "zvNfwL": { "defaultMessage": "操作过于频繁,请稍候重试", "description": "ACTION_LIMIT_EXCEEDED" diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json index 0fecc5a9fc..263fdff88e 100644 --- a/lang/zh-Hant.json +++ b/lang/zh-Hant.json @@ -2388,6 +2388,10 @@ "defaultMessage": "在 {circleName} 中留言", "description": "src/components/Notice/CircleNotice/CircleNewDiscussionComments.tsx" }, + "zn83cE": { + "defaultMessage": "效果預覽", + "description": "src/components/Editor/ToggleAccess/SupportSettingDialog/Content.tsx" + }, "zvNfwL": { "defaultMessage": "操作過於頻繁,請稍候重試", "description": "ACTION_LIMIT_EXCEEDED" From 7b4ab35ce775cb014a714cd47cfab3bbd13ad9d6 Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:38:06 +0800 Subject: [PATCH 3/3] fix(ArticleDetail): fix css --- src/views/ArticleDetail/AuthorSidebar/Author/styles.module.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/ArticleDetail/AuthorSidebar/Author/styles.module.css b/src/views/ArticleDetail/AuthorSidebar/Author/styles.module.css index 1a2acd195d..49a9efb64f 100644 --- a/src/views/ArticleDetail/AuthorSidebar/Author/styles.module.css +++ b/src/views/ArticleDetail/AuthorSidebar/Author/styles.module.css @@ -1,7 +1,7 @@ .container { display: flex; gap: var(--spacing-loose); - align-items: start; + align-items: flex-start; margin-top: var(--spacing-x-loose); & > a {