From da7af6f8dc1bf51562fc4fb0befa634656e473e2 Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Wed, 6 Mar 2024 21:33:59 +0300 Subject: [PATCH] Small UI fixes --- rsconcept/frontend/src/components/RSInput/RSInput.tsx | 3 ++- rsconcept/frontend/src/components/RefsInput/RefsInput.tsx | 3 ++- .../RSFormPage/EditorConstituenta/FormConstituenta.tsx | 8 +++++++- .../src/pages/RSFormPage/EditorRSForm/FormRSForm.tsx | 1 + .../src/pages/RSFormPage/EditorTermGraph/TermGraph.tsx | 2 +- rsconcept/frontend/src/pages/RSFormPage/RSTabs.tsx | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/rsconcept/frontend/src/components/RSInput/RSInput.tsx b/rsconcept/frontend/src/components/RSInput/RSInput.tsx index 4ab468bb..e405b7d5 100644 --- a/rsconcept/frontend/src/components/RSInput/RSInput.tsx +++ b/rsconcept/frontend/src/components/RSInput/RSInput.tsx @@ -76,7 +76,8 @@ const RSInput = forwardRef( fontFamily: 'inherit', background: !disabled ? colors.bgInput : colors.bgDefault, foreground: colors.fgDefault, - selection: colors.bgHover + selection: colors.bgHover, + caret: colors.fgDefault }, styles: [ { tag: tags.name, color: colors.fgPurple, cursor: 'default' }, // GlobalID diff --git a/rsconcept/frontend/src/components/RefsInput/RefsInput.tsx b/rsconcept/frontend/src/components/RefsInput/RefsInput.tsx index b4b239dd..da88c6f1 100644 --- a/rsconcept/frontend/src/components/RefsInput/RefsInput.tsx +++ b/rsconcept/frontend/src/components/RefsInput/RefsInput.tsx @@ -87,7 +87,8 @@ const RefsInput = forwardRef( fontFamily: 'inherit', background: !disabled ? colors.bgInput : colors.bgDefault, foreground: colors.fgDefault, - selection: colors.bgHover + selection: colors.bgHover, + caret: colors.fgDefault }, styles: [ { tag: tags.name, color: colors.fgPurple, cursor: 'default' }, // EntityReference diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx index 75feb01a..706a6be2 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/FormConstituenta.tsx @@ -16,6 +16,11 @@ import { labelCstTypification } from '@/utils/labels'; import EditorRSExpression from '../EditorRSExpression'; import ControlsOverlay from './ControlsOverlay'; +/** + * Characters limit to start increasing number of rows. + */ +export const ROW_SIZE_IN_CHARACTERS = 70; + interface FormConstituentaProps { disabled?: boolean; showList: boolean; @@ -130,7 +135,7 @@ function FormConstituenta({ noBorder disabled label='Типизация' - rows={typification.length > 70 ? 2 : 1} + rows={typification.length > ROW_SIZE_IN_CHARACTERS ? 2 : 1} value={typification} colors='clr-app' style={{ @@ -166,6 +171,7 @@ function FormConstituenta({ placeholder='Договоренность об интерпретации или пояснение' value={convention} disabled={disabled} + rows={convention.length > ROW_SIZE_IN_CHARACTERS ? 3 : 2} onChange={event => setConvention(event.target.value)} />