Skip to content

Commit

Permalink
UX fit-n-finish updates I (#549) (#551)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9025d1b)

Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent ed192a5 commit 8ee7843
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 23 deletions.
28 changes: 15 additions & 13 deletions public/pages/workflow_detail/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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: (
<EuiSmallButton
fill={true}
onClick={() => {
setIsExportModalOpen(true);
}}
data-testid="exportButton"
>
Export
</EuiSmallButton>
),
},
]}
/>
</>
Expand Down Expand Up @@ -411,7 +413,7 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) {
}}
/>,
<EuiText color="subdued" size="s">
{`Last updated: ${workflowLastUpdated}`}
{`Last saved: ${workflowLastUpdated}`}
</EuiText>,
<ExperimentalBadge
popoverEnabled={true}
Expand Down
4 changes: 2 additions & 2 deletions public/pages/workflow_detail/tools/tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ interface ToolsProps {
selectedStep: CONFIG_STEP;
}

const PANEL_TITLE = 'Inspector';
const PANEL_TITLE = 'Inspect pipeline';

/**
* The base Tools component for performing ingest and search, viewing resources, and debugging.
Expand Down Expand Up @@ -98,7 +98,7 @@ export function Tools(props: ToolsProps) {
>
<EuiFlexItem grow={false} style={{ marginBottom: '0px' }}>
<EuiText size="s">
<h2>{PANEL_TITLE}</h2>
<h3>{PANEL_TITLE}</h3>
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
Expand Down
6 changes: 3 additions & 3 deletions public/pages/workflow_detail/workflow_detail.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
EuiSpacer,
EuiIconTip,
EuiPopover,
EuiBadge,
} from '@elastic/eui';
import {
customStringify,
Expand Down Expand Up @@ -562,7 +563,20 @@ export function ConfigureExpressionModal(props: ConfigureExpressionModalProps) {
</EuiFlexItem>
)}
<EuiFlexItem grow={false}>
<EuiText size="s">Source data</EuiText>
<EuiFlexGroup
direction="row"
gutterSize="s"
justifyContent="flexStart"
>
<EuiFlexItem grow={false}>
<EuiText size="s">Sample of source data</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiBadge>{`${
oneToOne ? 'One' : 'Many'
} to one processing`}</EuiBadge>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiCodeEditor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ export function ConfigureMultiExpressionModal(
</EuiFlexItem>
)}
<EuiFlexItem grow={false}>
<EuiText size="s">Source data</EuiText>
<EuiText size="s">Sample of model output</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiCodeEditor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
EuiSmallButtonIcon,
EuiSpacer,
EuiIconTip,
EuiBadge,
} from '@elastic/eui';
import {
customStringify,
Expand Down Expand Up @@ -622,7 +623,7 @@ export function ConfigureTemplateModal(props: ConfigureTemplateModalProps) {
justifyContent="spaceBetween"
>
<EuiFlexItem grow={false}>
<EuiText size="m">Prompt preview</EuiText>
<EuiText size="m">Preview</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiSmallButton
Expand Down Expand Up @@ -793,7 +794,20 @@ export function ConfigureTemplateModal(props: ConfigureTemplateModalProps) {
</EuiFlexItem>
)}
<EuiFlexItem grow={false}>
<EuiText size="s">Source data</EuiText>
<EuiFlexGroup
direction="row"
gutterSize="s"
justifyContent="flexStart"
>
<EuiFlexItem grow={false}>
<EuiText size="s">Sample of source data</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiBadge>{`${
oneToOne ? 'One' : 'Many'
} to one processing`}</EuiBadge>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiCodeEditor
Expand Down
4 changes: 3 additions & 1 deletion public/pages/workflow_detail/workspace/workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ interface WorkspaceProps {
uiConfig?: WorkflowConfig;
}

const PANEL_TITLE = 'Preview pipeline';

const nodeTypes = {
custom: WorkspaceComponent,
ingestGroup: IngestGroupComponent,
Expand Down Expand Up @@ -140,7 +142,7 @@ export function Workspace(props: WorkspaceProps) {
<EuiFlexGroup direction="row" style={{ padding: '12px' }}>
<EuiFlexItem grow={false}>
<EuiText size="s">
<h2>Preview</h2>
<h3>{PANEL_TITLE}</h3>
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
Expand Down

0 comments on commit 8ee7843

Please sign in to comment.