From d8ca1339e46a80682325ab65475b2dbb448a4c04 Mon Sep 17 00:00:00 2001 From: Subina Date: Tue, 26 Dec 2023 16:36:17 +0545 Subject: [PATCH 1/2] Add text zoom in simplified text --- .../LeftPane/SimplifiedTextView/index.tsx | 14 +++- .../LeftPane/SimplifiedTextView/styles.css | 19 +++++ app/views/EntryEdit/LeftPane/index.tsx | 81 ++++++++++++++++--- app/views/EntryEdit/LeftPane/styles.css | 18 ++++- 4 files changed, 116 insertions(+), 16 deletions(-) diff --git a/app/views/EntryEdit/LeftPane/SimplifiedTextView/index.tsx b/app/views/EntryEdit/LeftPane/SimplifiedTextView/index.tsx index 4c644cd819..a3ff8bb538 100644 --- a/app/views/EntryEdit/LeftPane/SimplifiedTextView/index.tsx +++ b/app/views/EntryEdit/LeftPane/SimplifiedTextView/index.tsx @@ -63,6 +63,7 @@ interface Props { assistedTaggingEnabled: boolean; projectId: string | undefined; frameworkDetails?: Framework; + textZoomValue?: number | undefined; } function SimplifiedTextView(props: Props) { @@ -87,6 +88,7 @@ function SimplifiedTextView(props: Props) { disableDiscardButton, disableAddButton, frameworkDetails, + textZoomValue, } = props; const containerRef = React.useRef(null); @@ -328,7 +330,17 @@ function SimplifiedTextView(props: Props) { disableAddButton && styles.disabled, )} > - {children} +
+ {children} +
{(textFromProps?.length ?? 0) > charactersLoaded && (
+
+ +
+ + + + = 5} + > + + +
+
{(leadPreview?.textExtract?.length ?? 0) > 0 ? ( ) : ( Date: Thu, 28 Dec 2023 11:26:00 +0545 Subject: [PATCH 2/2] Use adders to change the font size of simplified texts --- .../LeftPane/SimplifiedTextView/index.tsx | 6 +++-- .../LeftPane/SimplifiedTextView/styles.css | 23 +++++++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/app/views/EntryEdit/LeftPane/SimplifiedTextView/index.tsx b/app/views/EntryEdit/LeftPane/SimplifiedTextView/index.tsx index a3ff8bb538..cae0fc88c8 100644 --- a/app/views/EntryEdit/LeftPane/SimplifiedTextView/index.tsx +++ b/app/views/EntryEdit/LeftPane/SimplifiedTextView/index.tsx @@ -332,11 +332,13 @@ function SimplifiedTextView(props: Props) { >
{children} diff --git a/app/views/EntryEdit/LeftPane/SimplifiedTextView/styles.css b/app/views/EntryEdit/LeftPane/SimplifiedTextView/styles.css index f56f54383a..81e4f71564 100644 --- a/app/views/EntryEdit/LeftPane/SimplifiedTextView/styles.css +++ b/app/views/EntryEdit/LeftPane/SimplifiedTextView/styles.css @@ -14,20 +14,29 @@ .simplified-text { line-height: 1.5; - &.extra-small{ - font-size: var(--dui-font-size-extra-small); + --base-font-size: var(--dui-font-size-medium); + --diff: 2px; + + &.x-small{ + font-size: var(--base-font-size); } &.small{ - font-size: var(--dui-font-size-small); + font-size: calc(var(--base-font-size) + var(--diff)); } &.medium{ - font-size: var(--dui-font-size-medium); + font-size: calc(var(--base-font-size) + 2 * var(--diff)); } &.large{ - font-size: var(--dui-font-size-large); + font-size: calc(var(--base-font-size) + 3 * var(--diff)); + } + &.x-large{ + font-size: calc(var(--base-font-size) + 4 * var(--diff)); + } + &.xx-large{ + font-size: calc(var(--base-font-size) + 5 * var(--diff)); } - &.extra-large{ - font-size: var(--dui-font-size-extra-large); + &.xxx-large{ + font-size: calc(var(--base-font-size) + 6 * var(--diff)); } }