From 8ee784303fd1af9c8ea680833d016ade6074430b Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 08:24:54 -0800 Subject: [PATCH] UX fit-n-finish updates I (#549) (#551) (cherry picked from commit 9025d1bc036cce136e6e6e2194f8af6efde4aacf) Signed-off-by: Tyler Ohlsen Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../workflow_detail/components/header.tsx | 28 ++++++++++--------- public/pages/workflow_detail/tools/tools.tsx | 4 +-- .../workflow_detail/workflow_detail.test.tsx | 6 ++-- .../modals/configure_expression_modal.tsx | 16 ++++++++++- .../configure_multi_expression_modal.tsx | 2 +- .../modals/configure_template_modal.tsx | 18 ++++++++++-- .../workflow_detail/workspace/workspace.tsx | 4 ++- 7 files changed, 55 insertions(+), 23 deletions(-) diff --git a/public/pages/workflow_detail/components/header.tsx b/public/pages/workflow_detail/components/header.tsx index e319a458..4f6e4952 100644 --- a/public/pages/workflow_detail/components/header.tsx +++ b/public/pages/workflow_detail/components/header.tsx @@ -108,10 +108,6 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) { }; }, [setHeaderVariant, USE_NEW_HOME_PAGE]); - const onExportButtonClick = () => { - setIsExportModalOpen(true); - }; - const onExitButtonClick = () => { history.replace( constructUrlWithParams(APP_PATH.WORKFLOWS, undefined, dataSourceId) @@ -302,13 +298,6 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) { controlType: 'icon', disabled: saveDisabled, } as TopNavMenuIconData, - { - iconType: 'exportAction', - tooltip: 'Export', - ariaLabel: 'Export', - run: onExportButtonClick, - controlType: 'icon', - } as TopNavMenuIconData, { iconType: 'exit', tooltip: 'Return to projects', @@ -353,10 +342,23 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) { ), }, { - text: `Last updated: ${workflowLastUpdated}`, + text: `Last saved: ${workflowLastUpdated}`, color: 'subdued', className: 'workflow-detail-last-updated', } as TopNavControlData, + { + renderComponent: ( + { + setIsExportModalOpen(true); + }} + data-testid="exportButton" + > + Export + + ), + }, ]} /> @@ -411,7 +413,7 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) { }} />, - {`Last updated: ${workflowLastUpdated}`} + {`Last saved: ${workflowLastUpdated}`} , -

{PANEL_TITLE}

+

{PANEL_TITLE}

diff --git a/public/pages/workflow_detail/workflow_detail.test.tsx b/public/pages/workflow_detail/workflow_detail.test.tsx index 34fc1c81..3e7bd535 100644 --- a/public/pages/workflow_detail/workflow_detail.test.tsx +++ b/public/pages/workflow_detail/workflow_detail.test.tsx @@ -78,10 +78,10 @@ describe('WorkflowDetail Page with create ingestion option', () => { } = renderWithRouter(workflowId, workflowName, type); expect(getAllByText(workflowName).length).toBeGreaterThan(0); - expect(getAllByText('Inspector').length).toBeGreaterThan(0); - expect(getAllByText('Preview').length).toBeGreaterThan(0); + expect(getAllByText('Inspect pipeline').length).toBeGreaterThan(0); + expect(getAllByText('Preview pipeline').length).toBeGreaterThan(0); expect( - getAllByText((content) => content.startsWith('Last updated:')).length + getAllByText((content) => content.startsWith('Last saved:')).length ).toBeGreaterThan(0); expect(getByText('Close')).toBeInTheDocument(); expect(getByText('Export')).toBeInTheDocument(); diff --git a/public/pages/workflow_detail/workflow_inputs/processor_inputs/ml_processor_inputs/modals/configure_expression_modal.tsx b/public/pages/workflow_detail/workflow_inputs/processor_inputs/ml_processor_inputs/modals/configure_expression_modal.tsx index 9dbad4da..fb2fcfd2 100644 --- a/public/pages/workflow_detail/workflow_inputs/processor_inputs/ml_processor_inputs/modals/configure_expression_modal.tsx +++ b/public/pages/workflow_detail/workflow_inputs/processor_inputs/ml_processor_inputs/modals/configure_expression_modal.tsx @@ -23,6 +23,7 @@ import { EuiSpacer, EuiIconTip, EuiPopover, + EuiBadge, } from '@elastic/eui'; import { customStringify, @@ -562,7 +563,20 @@ export function ConfigureExpressionModal(props: ConfigureExpressionModalProps) { )} - Source data + + + Sample of source data + + + {`${ + oneToOne ? 'One' : 'Many' + } to one processing`} + + )} - Source data + Sample of model output - Prompt preview + Preview )} - Source data + + + Sample of source data + + + {`${ + oneToOne ? 'One' : 'Many' + } to one processing`} + + -

Preview

+

{PANEL_TITLE}