Skip to content

Commit 9025d1b

Browse files
authored
UX fit-n-finish updates I (opensearch-project#549)
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
1 parent efba45f commit 9025d1b

File tree

7 files changed

+55
-23
lines changed

7 files changed

+55
-23
lines changed

public/pages/workflow_detail/components/header.tsx

+15-13
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) {
108108
};
109109
}, [setHeaderVariant, USE_NEW_HOME_PAGE]);
110110

111-
const onExportButtonClick = () => {
112-
setIsExportModalOpen(true);
113-
};
114-
115111
const onExitButtonClick = () => {
116112
history.replace(
117113
constructUrlWithParams(APP_PATH.WORKFLOWS, undefined, dataSourceId)
@@ -302,13 +298,6 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) {
302298
controlType: 'icon',
303299
disabled: saveDisabled,
304300
} as TopNavMenuIconData,
305-
{
306-
iconType: 'exportAction',
307-
tooltip: 'Export',
308-
ariaLabel: 'Export',
309-
run: onExportButtonClick,
310-
controlType: 'icon',
311-
} as TopNavMenuIconData,
312301
{
313302
iconType: 'exit',
314303
tooltip: 'Return to projects',
@@ -353,10 +342,23 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) {
353342
),
354343
},
355344
{
356-
text: `Last updated: ${workflowLastUpdated}`,
345+
text: `Last saved: ${workflowLastUpdated}`,
357346
color: 'subdued',
358347
className: 'workflow-detail-last-updated',
359348
} as TopNavControlData,
349+
{
350+
renderComponent: (
351+
<EuiSmallButton
352+
fill={true}
353+
onClick={() => {
354+
setIsExportModalOpen(true);
355+
}}
356+
data-testid="exportButton"
357+
>
358+
Export
359+
</EuiSmallButton>
360+
),
361+
},
360362
]}
361363
/>
362364
</>
@@ -411,7 +413,7 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) {
411413
}}
412414
/>,
413415
<EuiText color="subdued" size="s">
414-
{`Last updated: ${workflowLastUpdated}`}
416+
{`Last saved: ${workflowLastUpdated}`}
415417
</EuiText>,
416418
<ExperimentalBadge
417419
popoverEnabled={true}

public/pages/workflow_detail/tools/tools.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ interface ToolsProps {
3838
selectedStep: CONFIG_STEP;
3939
}
4040

41-
const PANEL_TITLE = 'Inspector';
41+
const PANEL_TITLE = 'Inspect pipeline';
4242

4343
/**
4444
* The base Tools component for performing ingest and search, viewing resources, and debugging.
@@ -98,7 +98,7 @@ export function Tools(props: ToolsProps) {
9898
>
9999
<EuiFlexItem grow={false} style={{ marginBottom: '0px' }}>
100100
<EuiText size="s">
101-
<h2>{PANEL_TITLE}</h2>
101+
<h3>{PANEL_TITLE}</h3>
102102
</EuiText>
103103
</EuiFlexItem>
104104
<EuiFlexItem grow={false}>

public/pages/workflow_detail/workflow_detail.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ describe('WorkflowDetail Page with create ingestion option', () => {
7878
} = renderWithRouter(workflowId, workflowName, type);
7979

8080
expect(getAllByText(workflowName).length).toBeGreaterThan(0);
81-
expect(getAllByText('Inspector').length).toBeGreaterThan(0);
82-
expect(getAllByText('Preview').length).toBeGreaterThan(0);
81+
expect(getAllByText('Inspect pipeline').length).toBeGreaterThan(0);
82+
expect(getAllByText('Preview pipeline').length).toBeGreaterThan(0);
8383
expect(
84-
getAllByText((content) => content.startsWith('Last updated:')).length
84+
getAllByText((content) => content.startsWith('Last saved:')).length
8585
).toBeGreaterThan(0);
8686
expect(getByText('Close')).toBeInTheDocument();
8787
expect(getByText('Export')).toBeInTheDocument();

public/pages/workflow_detail/workflow_inputs/processor_inputs/ml_processor_inputs/modals/configure_expression_modal.tsx

+15-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
EuiSpacer,
2424
EuiIconTip,
2525
EuiPopover,
26+
EuiBadge,
2627
} from '@elastic/eui';
2728
import {
2829
customStringify,
@@ -562,7 +563,20 @@ export function ConfigureExpressionModal(props: ConfigureExpressionModalProps) {
562563
</EuiFlexItem>
563564
)}
564565
<EuiFlexItem grow={false}>
565-
<EuiText size="s">Source data</EuiText>
566+
<EuiFlexGroup
567+
direction="row"
568+
gutterSize="s"
569+
justifyContent="flexStart"
570+
>
571+
<EuiFlexItem grow={false}>
572+
<EuiText size="s">Sample of source data</EuiText>
573+
</EuiFlexItem>
574+
<EuiFlexItem grow={false}>
575+
<EuiBadge>{`${
576+
oneToOne ? 'One' : 'Many'
577+
} to one processing`}</EuiBadge>
578+
</EuiFlexItem>
579+
</EuiFlexGroup>
566580
</EuiFlexItem>
567581
<EuiFlexItem grow={false}>
568582
<EuiCodeEditor

public/pages/workflow_detail/workflow_inputs/processor_inputs/ml_processor_inputs/modals/configure_multi_expression_modal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ export function ConfigureMultiExpressionModal(
573573
</EuiFlexItem>
574574
)}
575575
<EuiFlexItem grow={false}>
576-
<EuiText size="s">Source data</EuiText>
576+
<EuiText size="s">Sample of model output</EuiText>
577577
</EuiFlexItem>
578578
<EuiFlexItem grow={false}>
579579
<EuiCodeEditor

public/pages/workflow_detail/workflow_inputs/processor_inputs/ml_processor_inputs/modals/configure_template_modal.tsx

+16-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
EuiSmallButtonIcon,
2525
EuiSpacer,
2626
EuiIconTip,
27+
EuiBadge,
2728
} from '@elastic/eui';
2829
import {
2930
customStringify,
@@ -622,7 +623,7 @@ export function ConfigureTemplateModal(props: ConfigureTemplateModalProps) {
622623
justifyContent="spaceBetween"
623624
>
624625
<EuiFlexItem grow={false}>
625-
<EuiText size="m">Prompt preview</EuiText>
626+
<EuiText size="m">Preview</EuiText>
626627
</EuiFlexItem>
627628
<EuiFlexItem grow={false}>
628629
<EuiSmallButton
@@ -793,7 +794,20 @@ export function ConfigureTemplateModal(props: ConfigureTemplateModalProps) {
793794
</EuiFlexItem>
794795
)}
795796
<EuiFlexItem grow={false}>
796-
<EuiText size="s">Source data</EuiText>
797+
<EuiFlexGroup
798+
direction="row"
799+
gutterSize="s"
800+
justifyContent="flexStart"
801+
>
802+
<EuiFlexItem grow={false}>
803+
<EuiText size="s">Sample of source data</EuiText>
804+
</EuiFlexItem>
805+
<EuiFlexItem grow={false}>
806+
<EuiBadge>{`${
807+
oneToOne ? 'One' : 'Many'
808+
} to one processing`}</EuiBadge>
809+
</EuiFlexItem>
810+
</EuiFlexGroup>
797811
</EuiFlexItem>
798812
<EuiFlexItem grow={false}>
799813
<EuiCodeEditor

public/pages/workflow_detail/workspace/workspace.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ interface WorkspaceProps {
4747
uiConfig?: WorkflowConfig;
4848
}
4949

50+
const PANEL_TITLE = 'Preview pipeline';
51+
5052
const nodeTypes = {
5153
custom: WorkspaceComponent,
5254
ingestGroup: IngestGroupComponent,
@@ -140,7 +142,7 @@ export function Workspace(props: WorkspaceProps) {
140142
<EuiFlexGroup direction="row" style={{ padding: '12px' }}>
141143
<EuiFlexItem grow={false}>
142144
<EuiText size="s">
143-
<h2>Preview</h2>
145+
<h3>{PANEL_TITLE}</h3>
144146
</EuiText>
145147
</EuiFlexItem>
146148
<EuiFlexItem grow={false}>

0 commit comments

Comments
 (0)