From a099e0a7e6243aec302cca015fd75726d2093246 Mon Sep 17 00:00:00 2001 From: twwu Date: Tue, 17 Dec 2024 16:42:11 +0800 Subject: [PATCH 1/5] fix: Adjust layout and prevent default behavior in action buttons --- .../datasets/documents/detail/completed/child-segment-list.tsx | 2 +- .../documents/detail/completed/common/action-buttons.tsx | 2 +- .../components/datasets/documents/detail/completed/index.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx b/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx index 8efdccbffc..fd35c0c81e 100644 --- a/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx +++ b/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx @@ -135,7 +135,7 @@ const ChildSegmentList: FC = ({ {isLoading ? : null} {((isFullDocMode && !isLoading) || !collapsed) - ?
+ ?
{isParagraphMode && (
diff --git a/web/app/components/datasets/documents/detail/completed/common/action-buttons.tsx b/web/app/components/datasets/documents/detail/completed/common/action-buttons.tsx index 5ade8267c2..15bff500b5 100644 --- a/web/app/components/datasets/documents/detail/completed/common/action-buttons.tsx +++ b/web/app/components/datasets/documents/detail/completed/common/action-buttons.tsx @@ -31,9 +31,9 @@ const ActionButtons: FC = ({ }) useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.s`, (e) => { + e.preventDefault() if (loading) return - e.preventDefault() handleSave() } , { exactMatch: true, useCapture: true }) diff --git a/web/app/components/datasets/documents/detail/completed/index.tsx b/web/app/components/datasets/documents/detail/completed/index.tsx index 7e99db4f55..91697db5ce 100644 --- a/web/app/components/datasets/documents/detail/completed/index.tsx +++ b/web/app/components/datasets/documents/detail/completed/index.tsx @@ -538,7 +538,7 @@ const Completed: FC = ({ { isFullDocMode ?
Date: Tue, 17 Dec 2024 17:35:42 +0800 Subject: [PATCH 2/5] chore: use qa language --- web/app/components/datasets/create/step-two/index.tsx | 4 ++-- web/i18n/en-US/dataset-creation.ts | 1 + web/i18n/zh-Hans/dataset-creation.ts | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsx index 81fe80f67d..dd33167cb2 100644 --- a/web/app/components/datasets/create/step-two/index.tsx +++ b/web/app/components/datasets/create/step-two/index.tsx @@ -550,7 +550,7 @@ const StepTwo = ({ getRulesFromDetail() getDefaultMode() } - // eslint-disable-next-line react-hooks/exhaustive-deps + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) useEffect(() => { @@ -658,7 +658,7 @@ const StepTwo = ({ />
- {t('datasetCreation.stepTwo.QALanguage')} + {t('datasetCreation.stepTwo.useQALanguage')}
Date: Tue, 17 Dec 2024 17:46:43 +0800 Subject: [PATCH 3/5] chore: fix chunk detail spacing --- .../datasets/hit-testing/components/chunk-detail-modal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/components/datasets/hit-testing/components/chunk-detail-modal.tsx b/web/app/components/datasets/hit-testing/components/chunk-detail-modal.tsx index 53fb468001..e3b0bef766 100644 --- a/web/app/components/datasets/hit-testing/components/chunk-detail-modal.tsx +++ b/web/app/components/datasets/hit-testing/components/chunk-detail-modal.tsx @@ -38,7 +38,7 @@ const ChunkDetailModal: FC = ({ onClose={onHide} className={cn(isParentChildRetrieval ? '!min-w-[1200px]' : '!min-w-[720px]')} > -
+
{/* Meta info */}
From de6b0670a363b09f656490a9f3688f4084054ba8 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 17 Dec 2024 17:53:25 +0800 Subject: [PATCH 4/5] chore: detail ui --- .../datasets/hit-testing/components/chunk-detail-modal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/components/datasets/hit-testing/components/chunk-detail-modal.tsx b/web/app/components/datasets/hit-testing/components/chunk-detail-modal.tsx index e3b0bef766..c1e2e41406 100644 --- a/web/app/components/datasets/hit-testing/components/chunk-detail-modal.tsx +++ b/web/app/components/datasets/hit-testing/components/chunk-detail-modal.tsx @@ -39,7 +39,7 @@ const ChunkDetailModal: FC = ({ className={cn(isParentChildRetrieval ? '!min-w-[1200px]' : '!min-w-[720px]')} >
-
+
{/* Meta info */}
From 8ee7e0a787a587d1a9ea1be886b614f25c9629ee Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 17 Dec 2024 18:10:44 +0800 Subject: [PATCH 5/5] fix: text size --- .../datasets/hit-testing/components/child-chunks-item.tsx | 6 +++--- .../components/datasets/hit-testing/components/score.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/app/components/datasets/hit-testing/components/child-chunks-item.tsx b/web/app/components/datasets/hit-testing/components/child-chunks-item.tsx index 0d9b178a63..043aa3cea7 100644 --- a/web/app/components/datasets/hit-testing/components/child-chunks-item.tsx +++ b/web/app/components/datasets/hit-testing/components/child-chunks-item.tsx @@ -19,11 +19,11 @@ const ChildChunks: FC = ({
-
-
C-{position}
+
+
C-{position}
- {content} + {content}
) } diff --git a/web/app/components/datasets/hit-testing/components/score.tsx b/web/app/components/datasets/hit-testing/components/score.tsx index 6f48edd4bd..115141eaaa 100644 --- a/web/app/components/datasets/hit-testing/components/score.tsx +++ b/web/app/components/datasets/hit-testing/components/score.tsx @@ -13,7 +13,7 @@ const Score: FC = ({ besideChunkName, }) => { return ( -
+
score