Skip to content

Commit f343b7c

Browse files
committed
fix: css modification around icon
1 parent 81a20ad commit f343b7c

File tree

8 files changed

+45
-23
lines changed

8 files changed

+45
-23
lines changed

src/Pages/App/CreateAppModal/AppClone/AppCloneList.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useState } from 'react'
22

33
import {
4+
Button,
45
ComponentSizeType,
56
DetectBottom,
67
GenericInfoCardBorderVariant,
@@ -36,6 +37,18 @@ export const AppCloneList = ({ handleCloneAppClick, isJobView }: AppCloneListPro
3637
}
3738
}
3839

40+
const handleCreateFromScratch = () => {
41+
// TODO: Implement create from scratch functionality
42+
}
43+
44+
const renderCreateFromScratchButton = () => (
45+
<Button
46+
dataTestId="create-app-modal-create-from-scratch-btn"
47+
text="Create from scratch"
48+
onClick={handleCreateFromScratch}
49+
/>
50+
)
51+
3952
return (
4053
<div className="flex-grow-1 flexbox-col dc__overflow-auto">
4154
<div className="flexbox-col dc__gap-12 pt-20 px-20">
@@ -46,6 +59,9 @@ export const AppCloneList = ({ handleCloneAppClick, isJobView }: AppCloneListPro
4659
initialSearchText={searchKey}
4760
size={ComponentSizeType.medium}
4861
handleEnter={handleSearch}
62+
inputProps={{
63+
placeholder: `Search ${isJobView ? 'job' : 'application'}`,
64+
}}
4965
/>
5066
</div>
5167
<div className="flex-grow-1 flexbox-col dc__gap-12 p-20 dc__overflow-auto">
@@ -59,7 +75,8 @@ export const AppCloneList = ({ handleCloneAppClick, isJobView }: AppCloneListPro
5975
handleClearFilters={clearFilters}
6076
emptyStateConfig={{
6177
title: 'Nothing to Clone… Yet!',
62-
subTitle: `Looks like you haven’t created any ${isJobView ? 'job' : 'application'} to clone. Go ahead and start fresh — your first app awaits!`,
78+
subTitle: `You haven’t created any ${isJobView ? 'job' : 'application'} to clone. Kick things off by crafting one from scratch—it’s quick and easy!`,
79+
renderButton: renderCreateFromScratchButton,
6380
}}
6481
/>
6582
{hasMoreData && isLoadingMoreJobList && <GenericInfoListSkeleton />}

src/Pages/App/CreateAppModal/AppClone/useDevtronCloneList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const useDevtronCloneList = ({ handleCloneAppClick, isJobView }: AppClone
117117
title: jobName,
118118
description: description.description,
119119
author: description.createdBy,
120-
Icon: getAppIconWithBackground(APP_TYPE.JOB, 20),
120+
Icon: getAppIconWithBackground(APP_TYPE.JOB, 40),
121121
onClick: () => handleCloneAppClick({ appId: jobId, appName: jobName }),
122122
}
123123
})
@@ -130,7 +130,7 @@ export const useDevtronCloneList = ({ handleCloneAppClick, isJobView }: AppClone
130130
return {
131131
id: String(id),
132132
title: name,
133-
Icon: getAppIconWithBackground(APP_TYPE.DEVTRON_APPS, 20),
133+
Icon: getAppIconWithBackground(APP_TYPE.DEVTRON_APPS, 40),
134134
onClick: () => handleCloneAppClick({ appId: id, appName: name }),
135135
author: createdBy,
136136
description,

src/Pages/App/CreateAppModal/ApplicationInfoForm.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ const ApplicationInfoForm = ({
6969
})
7070
}
7171

72+
const isMandatoryTag = formState.tags.some((tag) => tag.data.tagKey.required)
73+
7274
return (
7375
// key is required for ensuring autoFocus on name on creation method change
7476
<div className="flexbox-col dc__gap-16 p-20 br-8 border__secondary bg__primary" key={selectedCreationMethod}>
@@ -113,7 +115,9 @@ const ApplicationInfoForm = ({
113115
<ICCaretLeftSmall
114116
className={`scn-7 dc__no-shrink dc__transition--transform ${isTagsAccordionExpanded ? 'dc__flip-270' : 'dc__flip-180'}`}
115117
/>
116-
<span className="fs-13 fw-6 lh-20 cn-9">Add tags to {isJobView ? 'job' : 'application'}</span>
118+
<span className={`fs-13 fw-6 lh-20 cn-9 ${isMandatoryTag ? 'dc__required-field' : ''}`}>
119+
Add tags to {isJobView ? 'job' : 'application'}
120+
</span>
117121
</button>
118122
<div className={!isTagsAccordionExpanded ? 'dc__hide-section' : ''}>
119123
{MandatoryTagsContainer ? (

src/Pages/App/CreateAppModal/ApplicationSelectionList.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
CreationMethodType,
2222
} from './types'
2323
import UpdateTemplateConfig from './UpdateTemplateConfig'
24-
import { getBreadcrumbText } from './utils'
2524

2625
const TemplateList = importComponentFromFELibrary('TemplateList', null, 'function')
2726

@@ -80,9 +79,21 @@ export const ApplicationSelectionList = ({
8079
}
8180
}
8281

82+
const getBreadcrumbText = () => {
83+
if (isCreationMethodTemplate) {
84+
return 'Templates'
85+
}
86+
87+
if (isJobView) {
88+
return 'Clone Job'
89+
}
90+
91+
return 'Clone Application'
92+
}
93+
8394
const renderAppInfoForm = () => {
8495
const goBack = isCreationMethodTemplate ? goBackToTemplatesList : goBackToAppCloneList
85-
const breadcrumbText = getBreadcrumbText(selectedCreationMethod)
96+
const breadcrumbText = getBreadcrumbText()
8697
const breadcrumbDataTestId = isCreationMethodTemplate ? 'template-list-breadcrumb' : 'clone-list-breadcrumb'
8798
const icon = isCreationMethodTemplate ? (
8899
<Icon name="ic-app-template" color={null} />
@@ -108,14 +119,14 @@ export const ApplicationSelectionList = ({
108119
showAriaLabelInTippy={false}
109120
onClick={goBack}
110121
/>
111-
<div className="flex left dc__gap-4">
122+
<div className="flex left dc__gap-6">
112123
<Button
113124
dataTestId={breadcrumbDataTestId}
114125
variant={ButtonVariantType.text}
115126
text={breadcrumbText}
116127
onClick={goBack}
117128
/>
118-
<span>/</span>
129+
<span className="fs-13">/</span>
119130
<p className="m-0 flex left dc__gap-6">
120131
{icon}
121132
<span className="fs-13 lh-20 fw-6 cn-9 dc__truncate">{name}</span>

src/Pages/App/CreateAppModal/HeaderSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { HeaderSectionProps } from './types'
2222

2323
const HeaderSection = ({ isJobView, handleClose, isCloseDisabled }: HeaderSectionProps) => (
2424
<div className="flex flex-align-center flex-justify border__primary--bottom py-12 px-20">
25-
<h2 className="fs-16 fw-6 lh-1-43 m-0">Create {isJobView ? 'Job' : 'Devtron Application'}</h2>
25+
<h2 className="fs-16 fw-6 lh-1-43 m-0 cn-9">Create {isJobView ? 'Job' : 'Devtron Application'}</h2>
2626
<Button
2727
onClick={handleClose}
2828
dataTestId={`close-create-custom${isJobView ? 'job' : 'app'}-wing`}

src/Pages/App/CreateAppModal/Sidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const Sidebar = ({
3232

3333
const renderAppContent = () => (
3434
<div className="flexbox-col dc__gap-24">
35-
<p className="m-0" />
35+
<p className="m-0">In Devtron, an &quot;Application&quot; represents your software project or service.</p>
3636
<p className="m-0">
3737
It serves as a container for your deployment configurations, environments, and other settings. Define
3838
your application to start managing and monitoring its deployment efficiently.
@@ -80,7 +80,7 @@ const Sidebar = ({
8080
<div className="divider__secondary--horizontal" />
8181
<ModalSidebarPanel
8282
heading={null}
83-
documentationLink={isJobView ? DOCUMENTATION.JOB_CRONJOB : DOCUMENTATION.APP_CREATE}
83+
documentationLink={isJobView ? DOCUMENTATION.JOBS : DOCUMENTATION.APP_CREATE}
8484
rootClassName="w-100 dc__no-background-imp"
8585
>
8686
{isJobView ? renderJobContent() : renderAppContent()}

src/Pages/App/CreateAppModal/utils.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const getCreateMethodConfig = (
7676

7777
return [
7878
{
79-
label: `Blank ${labelSuffix}`,
79+
label: 'Create from Scratch',
8080
value: CreationMethodType.blank,
8181
startIcon: (
8282
<Icon
@@ -116,17 +116,6 @@ export const getCreateMethodConfig = (
116116
]
117117
}
118118

119-
export const getBreadcrumbText = (selectedCreationMethod: CreationMethodType) => {
120-
switch (selectedCreationMethod) {
121-
case CreationMethodType.template:
122-
return 'Templates'
123-
case CreationMethodType.clone:
124-
return 'Clone Application'
125-
default:
126-
return 'Clone Job'
127-
}
128-
}
129-
130119
export const getNoItemSelectToastText = (selectedCreationMethod: CreationMethodType) => {
131120
if (selectedCreationMethod === CreationMethodType.template) {
132121
return 'Please select a template to create app'

src/config/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ export const DOCUMENTATION = {
380380
GLOBAL_CONFIG_USER: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/getting-started/global-configurations/authorization/user-access`,
381381
HOME_PAGE: DOCUMENTATION_HOME_PAGE,
382382
HYPERION: `${DOCUMENTATION_HOME_PAGE}/#hyperion`,
383+
JOBS: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/jobs`,
383384
JOB_CRONJOB: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/applications/creating-application/deployment-template/job-and-cronjob`,
384385
JOB_SOURCE_CODE: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/jobs/configuration-job`,
385386
JOB_WORKFLOW_EDITOR: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/jobs/workflow-editor-job`,

0 commit comments

Comments
 (0)