From 0756b49a7cfe1fda78d0c6afe116f2fdc4f1531a Mon Sep 17 00:00:00 2001 From: twwu Date: Sat, 8 Feb 2025 10:39:28 +0800 Subject: [PATCH] feat: improve styling and accessibility of dataset components --- .../hit-testing/components/result-item.tsx | 10 +++- .../datasets/hit-testing/textarea.tsx | 6 +- .../settings/permission-selector/index.tsx | 59 +++++++++++-------- 3 files changed, 45 insertions(+), 30 deletions(-) diff --git a/web/app/components/datasets/hit-testing/components/result-item.tsx b/web/app/components/datasets/hit-testing/components/result-item.tsx index 16bc40f67c..4518bfa876 100644 --- a/web/app/components/datasets/hit-testing/components/result-item.tsx +++ b/web/app/components/datasets/hit-testing/components/result-item.tsx @@ -46,10 +46,16 @@ const ResultItem: FC = ({ {/* Main */}
-
{content}
+
{content}
{isParentChildRetrieval && (
-
+
{ + e.stopPropagation() + toggleFold() + }} + >
{t(`${i18nPrefix}.hitChunks`, { num: child_chunks.length })}
diff --git a/web/app/components/datasets/hit-testing/textarea.tsx b/web/app/components/datasets/hit-testing/textarea.tsx index 43366754fe..482ce895b4 100644 --- a/web/app/components/datasets/hit-testing/textarea.tsx +++ b/web/app/components/datasets/hit-testing/textarea.tsx @@ -108,7 +108,7 @@ const TextAreaWithButton = ({ return ( <>
-
+
{t('datasetHitTesting.input.title')} @@ -145,11 +145,11 @@ const TextAreaWithButton = ({ /> ) } -
+