Skip to content

Commit 79eece1

Browse files
authored
Merge pull request #2795 from devtron-labs/chore/empty-workflows
chore: enhance navbar animation and workflow editor empty states
2 parents b9a3487 + 6c2f543 commit 79eece1

File tree

4 files changed

+19
-38
lines changed

4 files changed

+19
-38
lines changed

src/components/common/navigation/NavigationRoutes.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ const NavigationRoutes = ({ reloadVersionConfig }: Readonly<NavigationRoutesType
171171
const controls = animate(navBarWidth, NAVBAR_WIDTH, {
172172
duration: 0.3,
173173
ease: 'easeOut',
174+
delay: 1,
174175
})
175176
return controls.stop
176177
}

src/components/v2/appDetails/k8Resource/nodeType/Node.component.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ const NodeComponent = ({
444444
className="dc__mxw-250--imp"
445445
followCursor="horizontal"
446446
plugins={[followCursor]}
447+
placement="bottom"
447448
>
448449
<span className="dc__truncate">
449450
{node.health.message.toLowerCase()}

src/components/workflowEditor/workflowEditor.scss

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,7 @@
3939
animation-fill-mode: forwards;
4040
}
4141
}
42-
.create-here {
43-
display: flex;
44-
align-items: center;
45-
text-align: center;
46-
flex-direction: column;
47-
margin: auto;
48-
margin-top: 125px;
49-
width: 300px;
50-
border-radius: 4px;
51-
margin-bottom: 20px;
52-
}
53-
.form__title {
54-
&.form__title--workflow-editor {
55-
margin-top: 20px;
56-
}
57-
}
58-
.form__subtitle {
59-
&.form__subtitle--workflow-editor {
60-
margin-top: 4px;
61-
}
62-
}
42+
6343
.pipeline-select-container {
6444
width: 320px;
6545
box-shadow: 0 6px 12px -3px rgba(0, 56, 112, 0.3);

src/components/workflowEditor/workflowEditor.tsx

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import {
4343
ButtonVariantType,
4444
ButtonStyleType,
4545
handleAnalyticsEvent,
46+
GenericEmptyState,
4647
} from '@devtron-labs/devtron-fe-common-lib'
4748
import { PipelineContext, WorkflowEditProps, WorkflowEditState } from './types'
4849
import { URLS, AppConfigStatus, ViewType } from '../../config'
@@ -832,28 +833,26 @@ class WorkflowEdit extends Component<WorkflowEditProps, WorkflowEditState> {
832833

833834
renderEmptyState() {
834835
return (
835-
<div className="create-here">
836-
{this.props.isJobView ? (
837-
<img src={nojobs} width="250" height="200" alt="create-job-workflow" />
838-
) : (
839-
<img src={emptyWorkflow} alt="create-app-workflow" height="200" />
840-
)}
841-
<h1 className="form__title form__title--workflow-editor">Workflows</h1>
842-
<p className="form__subtitle form__subtitle--workflow-editor">
843-
{this.props.isJobView
844-
? 'Configure job pipelines to be executed. Pipelines can be configured to be triggered automatically based on code change or time.'
845-
: 'Workflows consist of pipelines from build to deployment stages of an application.'}
846-
<br />
847-
{!this.props.isJobView && (
836+
<GenericEmptyState
837+
title="Workflows"
838+
subTitle={
839+
<div className="flexbox-col dc__gap-4">
840+
<span>
841+
{this.props.isJobView
842+
? 'Configure job pipelines to be executed. Pipelines can be configured to be triggered automatically based on code change or time.'
843+
: 'Workflows consist of pipelines from build to deployment stages of an application.'}
844+
</span>
848845
<DocLink
849846
text="Learn about creating workflows"
850847
docLinkKey="APP_CREATE_WORKFLOW"
851848
dataTestId="learn-more-about-creating-workflow-link"
852849
/>
853-
)}
854-
</p>
855-
{this.renderWorkflowControlButton()}
856-
</div>
850+
</div>
851+
}
852+
image={this.props.isJobView ? nojobs : emptyWorkflow}
853+
isButtonAvailable
854+
renderButton={this.renderWorkflowControlButton}
855+
/>
857856
)
858857
}
859858

0 commit comments

Comments
 (0)