From 8d5ce8b0cf24c5f587145143769b40736f9eeefa Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:06:43 +0300 Subject: [PATCH] F: Improve Help UI for dialogs --- rsconcept/frontend/src/components/Icons.tsx | 2 +- .../src/components/info/BadgeHelp.tsx | 6 ++-- .../components/select/PickConstituenta.tsx | 2 +- .../frontend/src/components/ui/Modal.tsx | 31 ++++++++++++++----- .../DlgConstituentaTemplate.tsx | 11 +------ .../DlgCreateOperation/DlgCreateOperation.tsx | 8 +---- .../src/dialogs/DlgDeleteOperation.tsx | 12 +------ .../DlgEditOperation/DlgEditOperation.tsx | 9 ++---- .../DlgEditReference/DlgEditReference.tsx | 12 +------ .../DlgEditWordForms/DlgEditWordForms.tsx | 12 +------ .../src/dialogs/DlgRelocateConstituents.tsx | 4 ++- .../frontend/src/dialogs/DlgRenameCst.tsx | 8 +---- rsconcept/frontend/src/dialogs/DlgShowAST.tsx | 7 ++--- .../frontend/src/dialogs/DlgSubstituteCst.tsx | 2 ++ .../frontend/src/models/miscellaneous.ts | 4 +++ .../src/pages/ManualsPage/TopicPage.tsx | 4 +++ .../ManualsPage/items/ui/HelpRelocateCst.tsx | 10 ++++++ .../items/ui/HelpSubstitutions.tsx | 10 ++++++ .../EditorOssGraph/NodeContextMenu.tsx | 2 +- .../src/pages/OssPage/MenuOssTabs.tsx | 2 +- rsconcept/frontend/src/utils/labels.ts | 6 +++- 21 files changed, 78 insertions(+), 86 deletions(-) create mode 100644 rsconcept/frontend/src/pages/ManualsPage/items/ui/HelpRelocateCst.tsx create mode 100644 rsconcept/frontend/src/pages/ManualsPage/items/ui/HelpSubstitutions.tsx diff --git a/rsconcept/frontend/src/components/Icons.tsx b/rsconcept/frontend/src/components/Icons.tsx index 9ce4274e..d70cd122 100644 --- a/rsconcept/frontend/src/components/Icons.tsx +++ b/rsconcept/frontend/src/components/Icons.tsx @@ -40,7 +40,7 @@ export { LuFolderEdit as IconFolderEdit } from 'react-icons/lu'; export { LuFolderOpen as IconFolderOpened } from 'react-icons/lu'; export { LuFolderClosed as IconFolderClosed } from 'react-icons/lu'; export { LuFolderDot as IconFolderEmpty } from 'react-icons/lu'; -export { LuLightbulb as IconHelp } from 'react-icons/lu'; +export { TbHelpOctagon as IconHelp } from 'react-icons/tb'; export { LuLightbulbOff as IconHelpOff } from 'react-icons/lu'; export { RiPushpinFill as IconPin } from 'react-icons/ri'; export { RiUnpinLine as IconUnpin } from 'react-icons/ri'; diff --git a/rsconcept/frontend/src/components/info/BadgeHelp.tsx b/rsconcept/frontend/src/components/info/BadgeHelp.tsx index 16bafee4..74ff106c 100644 --- a/rsconcept/frontend/src/components/info/BadgeHelp.tsx +++ b/rsconcept/frontend/src/components/info/BadgeHelp.tsx @@ -1,5 +1,3 @@ -import clsx from 'clsx'; - import TextURL from '@/components/ui/TextURL'; import Tooltip, { PlacesType } from '@/components/ui/Tooltip'; import { useConceptOptions } from '@/context/ConceptOptionsContext'; @@ -16,14 +14,14 @@ interface BadgeHelpProps extends CProps.Styling { place?: PlacesType; } -function BadgeHelp({ topic, padding, ...restProps }: BadgeHelpProps) { +function BadgeHelp({ topic, padding = 'p-1', ...restProps }: BadgeHelpProps) { const { showHelp } = useConceptOptions(); if (!showHelp) { return null; } return ( -