From 930ec5ef864b58e4409c7bb422c775e8b2f453d2 Mon Sep 17 00:00:00 2001 From: Lin Wang Date: Fri, 23 Aug 2024 14:29:01 +0800 Subject: [PATCH] Address PR comments and fix use case scroll Signed-off-by: Lin Wang --- .../workspace_creator_form.tsx | 14 ++-- .../workspace_form_summary_panel.tsx | 64 ++++++++----------- 2 files changed, 36 insertions(+), 42 deletions(-) diff --git a/src/plugins/workspace/public/components/workspace_creator/workspace_creator_form.tsx b/src/plugins/workspace/public/components/workspace_creator/workspace_creator_form.tsx index 4873a61540a1..c4b4045b75dd 100644 --- a/src/plugins/workspace/public/components/workspace_creator/workspace_creator_form.tsx +++ b/src/plugins/workspace/public/components/workspace_creator/workspace_creator_form.tsx @@ -93,12 +93,14 @@ export const WorkspaceCreatorForm = (props: WorkspaceCreatorFormProps) => { })} - +
+ +
{ - return { - [RightSidebarScrollField.UseCase]: i18n.translate( - 'workspace.form.summary.panel.useCase.title', - { - defaultMessage: 'Use case', - } - ), - [RightSidebarScrollField.Name]: i18n.translate('workspace.form.summary.panel.name.title', { - defaultMessage: 'Name', - }), - [RightSidebarScrollField.Description]: i18n.translate( - 'workspace.form.summary.panel.description.title', - { - defaultMessage: 'Description', - } - ), - [RightSidebarScrollField.Color]: i18n.translate('workspace.form.summary.panel.color.title', { - defaultMessage: 'Accent color', - }), - [RightSidebarScrollField.DataSource]: i18n.translate( - 'workspace.form.summary.panel.dataSources.title', - { - defaultMessage: 'Data sources', - } - ), - [RightSidebarScrollField.Member]: i18n.translate( - 'workspace.form.summary.panel.members.title', - { - defaultMessage: 'Members', - } - ), - }[field]; - }; - return ( <>
- {renderTitle()} + {SCROLL_FIELDS[field]}