Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed workflow detail page UX bugs #457

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions public/pages/workflow_detail/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,15 +336,13 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) {
<>
{dataSourceEnabled && DataSourceComponent}
<EuiPageHeader
style={{ marginTop: '-8px' }}
pageTitle={
<EuiFlexGroup direction="row" alignItems="flexEnd" gutterSize="m">
<EuiFlexItem grow={false}>{workflowName}</EuiFlexItem>
</EuiFlexGroup>
}
rightSideItems={[
<EuiSmallButton
style={{ marginTop: '8px' }}
fill={true}
onClick={() => {
setIsExportModalOpen(true);
Expand All @@ -354,7 +352,6 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) {
Export
</EuiSmallButton>,
<EuiSmallButtonEmpty
style={{ marginTop: '8px' }}
onClick={() => {
history.replace(
constructUrlWithParams(
Expand All @@ -369,7 +366,6 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) {
Close
</EuiSmallButtonEmpty>,
<EuiSmallButtonEmpty
style={{ marginTop: '8px' }}
disabled={saveDisabled}
isLoading={isRunningSave}
onClick={() => {
Expand All @@ -379,19 +375,22 @@ export function WorkflowDetailHeader(props: WorkflowDetailHeaderProps) {
{`Save`}
</EuiSmallButtonEmpty>,
<EuiSmallButtonIcon
style={{ marginTop: '8px' }}
iconType="editorUndo"
aria-label="undo changes"
isDisabled={undoDisabled}
onClick={() => {
revertUnsavedChanges();
}}
/>,
<EuiText style={{ marginTop: '14px' }} color="subdued" size="s">
<EuiText color="subdued" size="s">
{`Last updated: ${workflowLastUpdated}`}
</EuiText>,
]}
bottomBorder={false}
rightSideGroupProps={{
alignItems: 'center',
}}
paddingSize="s"
/>
</>
)}
Expand Down
29 changes: 13 additions & 16 deletions public/pages/workflow_detail/resizable_workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
direction="horizontal"
className="stretch-absolute"
style={{
marginLeft: '-8px',
marginTop: SHOW_ACTIONS_IN_HEADER ? '-8px' : '40px',
marginTop: SHOW_ACTIONS_IN_HEADER ? '0' : '58px',
height: SHOW_ACTIONS_IN_HEADER ? '100%' : 'calc(100% - 58px)',
gap: '4px',
}}
>
{(EuiResizablePanel, EuiResizableButton, { togglePanel }) => {
Expand All @@ -112,7 +113,8 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
mode="main"
initialSize={60}
minSize="25%"
paddingSize="s"
paddingSize="none"
scrollable={false}
>
<WorkflowInputs
workflow={props.workflow}
Expand All @@ -135,23 +137,18 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
<EuiResizableButton />
<EuiResizablePanel
id={PREVIEW_PANEL_ID}
style={{
marginRight: isPreviewPanelOpen ? '-32px' : '0px',
marginBottom: isToolsPanelOpen ? '0px' : '24px',
}}
mode="collapsible"
initialSize={60}
minSize="25%"
paddingSize="s"
paddingSize="none"
borderRadius="l"
onToggleCollapsedInternal={() => onTogglePreviewChange()}
>
<EuiResizableContainer
className="workspace-panel"
direction="vertical"
style={{
marginLeft: '-8px',
marginTop: '-8px',
padding: 'none',
gap: '4px',
}}
>
{(EuiResizablePanel, EuiResizableButton, { togglePanel }) => {
Expand All @@ -171,12 +168,12 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
mode="main"
initialSize={60}
minSize="25%"
paddingSize="s"
style={{ marginBottom: '-8px' }}
paddingSize="none"
borderRadius="l"
>
<EuiFlexGroup
direction="column"
gutterSize="s"
gutterSize="none"
style={{ height: '100%' }}
>
<EuiFlexItem>
Expand All @@ -193,9 +190,9 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
mode="collapsible"
initialSize={50}
minSize="25%"
paddingSize="s"
paddingSize="none"
borderRadius="l"
onToggleCollapsedInternal={() => onToggleToolsChange()}
style={{ marginBottom: '-16px' }}
>
<Tools
workflow={props.workflow}
Expand Down
7 changes: 6 additions & 1 deletion public/pages/workflow_detail/tools/tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ export function Tools(props: ToolsProps) {
}, [props.queryResponse]);

return (
<EuiPanel paddingSize="m" grow={true} style={{ height: '100%' }}>
<EuiPanel
paddingSize="m"
borderRadius="l"
grow={true}
style={{ height: '100%' }}
>
<EuiFlexGroup
direction="column"
style={{
Expand Down
2 changes: 1 addition & 1 deletion public/pages/workflow_detail/workflow_detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export function WorkflowDetail(props: WorkflowDetailProps) {
validate={(values) => {}}
>
<ReactFlowProvider>
<EuiPage>
<EuiPage paddingSize="s">
<EuiPageBody className="workflow-detail stretch-relative">
<WorkflowDetailHeader
workflow={workflow}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,18 +555,25 @@ export function WorkflowInputs(props: WorkflowInputsProps) {
}

return (
<EuiPanel paddingSize="m" grow={true} className="workspace-panel">
<EuiPanel
paddingSize="s"
grow={true}
className="workspace-panel"
borderRadius="l"
>
{props.uiConfig === undefined ? (
<EuiLoadingSpinner size="xl" />
) : (
<EuiFlexGroup
direction="column"
justifyContent="spaceBetween"
gutterSize="none"
style={{
height: '100%',
gap: '16px',
}}
>
<EuiFlexItem grow={false} style={{ marginBottom: '-8px' }}>
<EuiFlexItem grow={false}>
<EuiStepsHorizontal
steps={[
{
Expand Down Expand Up @@ -734,10 +741,7 @@ export function WorkflowInputs(props: WorkflowInputsProps) {
/>
)}
</EuiFlexItem>
<EuiFlexItem
grow={false}
style={{ marginBottom: '-10px', marginTop: '-24px' }}
>
<EuiFlexItem grow={false}>
<EuiFlexGroup direction="column" gutterSize="none">
<EuiFlexItem>
<EuiHorizontalRule margin="m" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.workspace-panel {
height: 95%;
height: 100%;
}
2 changes: 1 addition & 1 deletion public/pages/workflow_detail/workspace/workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export function Workspace(props: WorkspaceProps) {
justifyContent="spaceBetween"
>
<EuiFlexItem
className="euiPanel euiPanel--hasShadow euiPanel--borderRadiusMedium"
className="euiPanel euiPanel--hasShadow euiPanel--borderRadiusLarge"
style={{ overflowX: 'hidden' }}
>
{/**
Expand Down
Loading