From e0189a2d269f1cbbf4775422f1d229af6fcef51b Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:30:01 +0300 Subject: [PATCH] M: Improve RSForm stats UI --- rsconcept/frontend/src/components/Icons.tsx | 3 +- .../frontend/src/components/ui/IconValue.tsx | 2 +- .../pages/ManualsPage/items/HelpThesaurus.tsx | 134 +++++++++++++--- .../EditorRSFormCard/RSFormStats.tsx | 148 ++++++++++++++---- rsconcept/frontend/src/styling/setup.css | 2 +- 5 files changed, 230 insertions(+), 59 deletions(-) diff --git a/rsconcept/frontend/src/components/Icons.tsx b/rsconcept/frontend/src/components/Icons.tsx index 7bffbdf3..cdd95dbf 100644 --- a/rsconcept/frontend/src/components/Icons.tsx +++ b/rsconcept/frontend/src/components/Icons.tsx @@ -95,7 +95,8 @@ export { RiShieldKeyholeLine as IconPrivate } from 'react-icons/ri'; export { BiBug as IconStatusError } from 'react-icons/bi'; export { BiCheckCircle as IconStatusOK } from 'react-icons/bi'; export { BiHelpCircle as IconStatusUnknown } from 'react-icons/bi'; -export { BiPauseCircle as IconStatusIncalculable } from 'react-icons/bi'; +export { BiStopCircle as IconStatusIncalculable } from 'react-icons/bi'; +export { BiPauseCircle as IconStatusProperty } from 'react-icons/bi'; export { LuPower as IconKeepAliasOn } from 'react-icons/lu'; export { LuPowerOff as IconKeepAliasOff } from 'react-icons/lu'; diff --git a/rsconcept/frontend/src/components/ui/IconValue.tsx b/rsconcept/frontend/src/components/ui/IconValue.tsx index cc76fc1a..2e24da63 100644 --- a/rsconcept/frontend/src/components/ui/IconValue.tsx +++ b/rsconcept/frontend/src/components/ui/IconValue.tsx @@ -27,7 +27,7 @@ function IconValue({ }: IconValueProps) { return (
.

+

+ Граф термов – ориентированный граф, узлами которого являются конституенты КС, а связи задаются на основе + вхождения имени конституенты в определение другой конституенты. +

+ +

+ Ядро концептуальной схемы – совокупность базовых понятий, аксиом и промежуточных производных понятий, + необходимых для формирования выражений аксиом. Остальные конституенты относят к Телу концептуальной схемы. +

Конституента

@@ -37,13 +59,73 @@ function HelpThesaurus() { являются Термин, Конвенция, Типизация (Структура), Формальное определение, Текстовое определение, Комментарий.

+ +
+ + + +
+ +
@@ -63,6 +145,30 @@ function HelpThesaurus() {
+ + +
+ -
- - -

Операционная схема синтеза

Раздел в разработке...

diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorRSFormCard/RSFormStats.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorRSFormCard/RSFormStats.tsx index a4fb09ac..1d0ae24d 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorRSFormCard/RSFormStats.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorRSFormCard/RSFormStats.tsx @@ -1,4 +1,13 @@ +import { + IconChild, + IconPredecessor, + IconStatusError, + IconStatusIncalculable, + IconStatusOK, + IconStatusProperty +} from '@/components/Icons'; import Divider from '@/components/ui/Divider'; +import IconValue from '@/components/ui/IconValue'; import LabeledValue from '@/components/ui/LabeledValue'; import { type IRSFormStats } from '@/models/rsform'; @@ -11,49 +20,120 @@ function RSFormStats({ stats }: RSFormStatsProps) { return null; } return ( -
+
- {stats.count_inherited !== 0 ? ( - - ) : null} - - {stats.count_property !== 0 ? ( - - ) : null} - {stats.count_incalculable !== 0 ? ( - - ) : null} +
+ } + value={stats.count_all - stats.count_inherited} + title='Собственные' + /> + } + value={stats.count_inherited} + title='Наследованные' + /> +
+
+ } + value={stats.count_all - stats.count_errors - stats.count_property - stats.count_incalculable} + title='Корректные' + /> + } + value={stats.count_errors} + title='Неразмерные' + /> + } + value={stats.count_incalculable} + title='Невычислимые' + /> + } + value={stats.count_errors} + title='Некорректные' + /> +
+
+ X#} + value={stats.count_base} + title='Базисные множества' + /> + C#} + value={stats.count_constant} + title='Константные множества' + /> + S#} + value={stats.count_structured} + title='Родовые структуры' + /> + A#} + value={stats.count_axiom} + title='Аксиомы' + /> + D#} + value={stats.count_term} + title='Термы' + /> + F#} + value={stats.count_function} + title='Терм-функции' + /> + P#} + value={stats.count_predicate} + title='Предикат-функции' + /> + T#} + value={stats.count_theorem} + title='Теоремы' + /> +
- - - - {stats.count_base !== 0 ? ( - - ) : null} - {stats.count_constant !== 0 ? ( - - ) : null} - {stats.count_structured !== 0 ? ( - - ) : null} - {stats.count_axiom !== 0 ? : null} - {stats.count_term !== 0 ? : null} - {stats.count_function !== 0 ? ( - - ) : null} - {stats.count_predicate !== 0 ? ( - - ) : null} - {stats.count_theorem !== 0 ? ( - - ) : null}
); } diff --git a/rsconcept/frontend/src/styling/setup.css b/rsconcept/frontend/src/styling/setup.css index 64fb2ce5..f6fab3f5 100644 --- a/rsconcept/frontend/src/styling/setup.css +++ b/rsconcept/frontend/src/styling/setup.css @@ -134,7 +134,7 @@ div:not(.dense) > p { } li::marker { - content: '– '; + content: '–\2009'; } .border {