Skip to content

Commit 959e6a7

Browse files
authored
Merge pull request #2740 from devtron-labs/feat/profile-menu
feat: SidePanelDocumentation updates, ActionMenu - story updates, DocLink - instances update
2 parents 27bc622 + dd87939 commit 959e6a7

File tree

39 files changed

+394
-325
lines changed

39 files changed

+394
-325
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "1.14.2-pre-1",
7+
"@devtron-labs/devtron-fe-common-lib": "1.14.2-pre-2",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",
@@ -119,6 +119,7 @@
119119
"patch-package": "^8.0.0",
120120
"postinstall-postinstall": "^2.1.0",
121121
"prettier": "^3.1.1",
122+
"react-draggable": "^4.4.5",
122123
"react-test-render": "^1.1.2",
123124
"sass": "^1.69.7",
124125
"sharp": "^0.33.5",

src/Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig.types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
AppEnvDeploymentConfigType,
2020
AppEnvironment,
2121
CollapsibleListItem,
22+
DocLinkProps,
2223
EnvResourceType,
2324
ResourceIdToResourceApprovalPolicyConfigMapType,
2425
ResourceKindType,
@@ -108,7 +109,7 @@ export interface CustomNavItemsType {
108109
href?: string
109110
stage?: string
110111
isLocked?: boolean
111-
supportDocumentURL?: string
112+
supportDocumentURL?: DocLinkProps['docLinkKey']
112113
flowCompletionPercent?: number
113114
currentStep?: number
114115
required?: boolean

src/Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig.utils.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
AppConfigProps,
2121
BASE_CONFIGURATION_ENV_ID,
2222
ConfigResourceType,
23-
getDocumentationUrl,
2423
ResourceKindType,
2524
stringComparatorBySortOrder,
2625
URLS as CommonURLS,
@@ -138,7 +137,7 @@ export const getNavItems = ({
138137
href: `/job/${appId}/edit/materials`,
139138
stage: STAGE_NAME.GIT_MATERIAL,
140139
isLocked: !_isUnlocked.material,
141-
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'JOB_SOURCE_CODE' }),
140+
supportDocumentURL: 'JOB_SOURCE_CODE',
142141
flowCompletionPercent: completedPercent,
143142
currentStep: completedSteps,
144143
required: true,
@@ -148,7 +147,7 @@ export const getNavItems = ({
148147
href: `/job/${appId}/edit/workflow`,
149148
stage: STAGE_NAME.WORKFLOW,
150149
isLocked: !_isUnlocked.workflowEditor,
151-
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'JOB_WORKFLOW_EDITOR' }),
150+
supportDocumentURL: 'JOB_WORKFLOW_EDITOR',
152151
flowCompletionPercent: completedPercent,
153152
currentStep: completedSteps,
154153
required: true,
@@ -166,7 +165,7 @@ export const getNavItems = ({
166165
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.CONFIG_MAPS, true, isTemplateView),
167166
stage: STAGE_NAME.CONFIGMAP,
168167
isLocked: !_isUnlocked.configmap,
169-
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_CONFIG_MAP' }),
168+
supportDocumentURL: 'APP_CREATE_CONFIG_MAP',
170169
flowCompletionPercent: completedPercent,
171170
currentStep: completedSteps,
172171
isProtectionAllowed: true,
@@ -178,7 +177,7 @@ export const getNavItems = ({
178177
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.SECRETS, true, isTemplateView),
179178
stage: STAGE_NAME.SECRETS,
180179
isLocked: !_isUnlocked.secret,
181-
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_SECRET' }),
180+
supportDocumentURL: 'APP_CREATE_SECRET',
182181
flowCompletionPercent: completedPercent,
183182
currentStep: completedSteps,
184183
isProtectionAllowed: true,
@@ -204,7 +203,7 @@ export const getNavItems = ({
204203
href: `${basePath}/edit/materials`,
205204
stage: STAGE_NAME.GIT_MATERIAL,
206205
isLocked: !_isUnlocked.material,
207-
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_MATERIAL' }),
206+
supportDocumentURL: 'APP_CREATE_MATERIAL',
208207
flowCompletionPercent: completedPercent,
209208
currentStep: completedSteps,
210209
required: true,
@@ -214,7 +213,7 @@ export const getNavItems = ({
214213
href: `${basePath}/edit/docker-build-config`,
215214
stage: STAGE_NAME.CI_CONFIG,
216215
isLocked: !_isUnlocked.dockerBuildConfig,
217-
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_CI_CONFIG' }),
216+
supportDocumentURL: 'APP_CREATE_CI_CONFIG',
218217
flowCompletionPercent: completedPercent,
219218
currentStep: completedSteps,
220219
required: true,
@@ -233,7 +232,7 @@ export const getNavItems = ({
233232
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.DEPLOYMENT_TEMPLATE, null, isTemplateView),
234233
stage: STAGE_NAME.DEPLOYMENT_TEMPLATE,
235234
isLocked: !_isUnlocked.deploymentTemplate,
236-
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_DEPLOYMENT_TEMPLATE' }),
235+
supportDocumentURL: 'APP_DEPLOYMENT_TEMPLATE',
237236
flowCompletionPercent: completedPercent,
238237
currentStep: completedSteps,
239238
isProtectionAllowed: true,
@@ -255,7 +254,7 @@ export const getNavItems = ({
255254
href: `${basePath}/edit/workflow`,
256255
stage: STAGE_NAME.WORKFLOW,
257256
isLocked: !_isUnlocked.workflowEditor,
258-
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_WORKFLOW' }),
257+
supportDocumentURL: 'APP_CREATE_WORKFLOW',
259258
flowCompletionPercent: completedPercent,
260259
currentStep: completedSteps,
261260
required: true,
@@ -265,7 +264,7 @@ export const getNavItems = ({
265264
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.CONFIG_MAPS, null, isTemplateView),
266265
stage: STAGE_NAME.CONFIGMAP,
267266
isLocked: !_isUnlocked.configmap,
268-
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_CONFIG_MAP' }),
267+
supportDocumentURL: 'APP_CREATE_CONFIG_MAP',
269268
flowCompletionPercent: completedPercent,
270269
currentStep: completedSteps,
271270
isProtectionAllowed: true,
@@ -277,7 +276,7 @@ export const getNavItems = ({
277276
href: getAppComposeURL(appId, APP_COMPOSE_STAGE.SECRETS, null, isTemplateView),
278277
stage: STAGE_NAME.SECRETS,
279278
isLocked: !_isUnlocked.secret,
280-
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'APP_CREATE_SECRET' }),
279+
supportDocumentURL: 'APP_CREATE_SECRET',
281280
flowCompletionPercent: completedPercent,
282281
currentStep: completedSteps,
283282
isProtectionAllowed: true,
@@ -292,7 +291,7 @@ export const getNavItems = ({
292291
href: `${basePath}/edit/external-links`,
293292
stage: STAGE_NAME.EXTERNAL_LINKS,
294293
isLocked: false,
295-
supportDocumentURL: getDocumentationUrl({ docLinkKey: 'EXTERNAL_LINKS' }),
294+
supportDocumentURL: 'EXTERNAL_LINKS' as const,
296295
flowCompletionPercent: completedPercent,
297296
currentStep: completedSteps,
298297
},

src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/AppConfigurationCheckBox.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { ComponentSizeType, DocLink } from '@devtron-labs/devtron-fe-common-lib'
18+
1719
import { CustomNavItemsType } from '../AppConfig.types'
1820

1921
interface HelpBoxType {
@@ -30,12 +32,13 @@ const HelpBox = ({ selectedNav, isJobView, totalSteps }: HelpBoxType) => (
3032
<div className="progress-container">
3133
<div className="progress-tracker" style={{ width: `${selectedNav?.flowCompletionPercent}%` }} />
3234
</div>
33-
<div className="fs-13 font-weight-600">{selectedNav?.title}</div>
34-
<div className="need-help font-weight-600">
35-
<a className="dc__link" href={selectedNav?.supportDocumentURL} target="_blank" rel="noreferrer noopener">
36-
Need help?
37-
</a>
38-
</div>
35+
<div className="fs-13 fw-6">{selectedNav?.title}</div>
36+
<DocLink
37+
dataTestId="app-configuration-help"
38+
docLinkKey={selectedNav?.supportDocumentURL}
39+
text="Need help?"
40+
size={ComponentSizeType.small}
41+
/>
3942
</div>
4043
)
4144

src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvConfigurationsNav.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ export const EnvConfigurationsNav = ({
466466
linkProps={{ to: compareWithHref }}
467467
text="Compare with..."
468468
onClick={onClickCompareWith}
469+
fullWidth
469470
/>
470471
</div>
471472
)

src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvironmentOverrideRouter.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const EnvOverridesHelpNote = () => (
5555
docLinkKey="APP_CREATE_ENVIRONMENT_OVERRIDE"
5656
dataTestId="env-overrides-learn-more"
5757
size={ComponentSizeType.xs}
58+
fontWeight="normal"
5859
/>
5960
</div>
6061
)

src/Pages/Applications/DevtronApps/Details/AppConfigurations/appConfig.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@
5656
width: 1%;
5757
}
5858
}
59-
60-
.font-weight-600 {
61-
font-weight: 600;
62-
}
63-
64-
.need-help {
65-
color: var(--B500);
66-
}
6759
}
6860
}
6961

src/Pages/GlobalConfigurations/ClustersAndEnvironments/CreateCluster/EnterpriseTrialDialog.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {
22
Button,
3+
ButtonComponentType,
34
ComponentSizeType,
4-
DOCUMENTATION,
5-
getHandleOpenURL,
65
Icon,
6+
LICENSE_DASHBOARD_HOME_PAGE,
77
TESTIMONIAL_CARD_DATA,
88
TestimonialContent,
99
} from '@devtron-labs/devtron-fe-common-lib'
@@ -31,8 +31,11 @@ const EnterpriseTrialDialog = ({ featureTitle, featureDescription }: EnterpriseT
3131
dataTestId="get-free-trial"
3232
text="Get free trial"
3333
endIcon={<Icon name="ic-arrow-right" color={null} />}
34-
onClick={getHandleOpenURL(DOCUMENTATION.ENTERPRISE_LICENSE)}
34+
component={ButtonComponentType.anchor}
3535
size={ComponentSizeType.medium}
36+
anchorProps={{
37+
href: LICENSE_DASHBOARD_HOME_PAGE,
38+
}}
3639
/>
3740
</div>
3841
<div className="p-24 flexbox dc__gap-12 br-8 border__primary bg__primary">

src/Pages/License/ActivateLicense.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import {
55
ActivateLicenseDialog,
66
API_STATUS_CODES,
77
Button,
8+
ButtonComponentType,
89
ButtonVariantType,
910
CONTACT_SUPPORT_LINK,
1011
DevtronLicenseCard,
1112
DevtronProgressing,
1213
ENTERPRISE_SUPPORT_LINK,
1314
ErrorScreenManager,
14-
getHandleOpenURL,
1515
ICDevtronWithBorder,
1616
Icon,
1717
InfoBlock,
@@ -93,9 +93,10 @@ const ActivateLicense = () => {
9393
buttonProps={{
9494
text: 'Contact Support',
9595
variant: ButtonVariantType.text,
96-
onClick: getHandleOpenURL(CONTACT_SUPPORT_LINK),
96+
component: ButtonComponentType.anchor,
9797
dataTestId: 'contact-support',
9898
startIcon: <Icon name="ic-chat-circle-dots" color="B500" size={16} />,
99+
anchorProps: { href: CONTACT_SUPPORT_LINK },
99100
}}
100101
layout="column"
101102
/>

src/Pages/Shared/ConfigMapSecret/ConfigMapSecretContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ export const ConfigMapSecretContainer = ({
12441244
return (
12451245
<>
12461246
<Prompt when={shouldPrompt} message={checkIfPathIsMatching(location.pathname)} />
1247-
<div className="configmap-secret-container flexbox w-100 dc__content-space h-100 dc__position-rel">
1247+
<div className="configmap-secret-container flexbox w-100 dc__content-space h-100">
12481248
<div className="p-8 flexbox flex-grow-1 mw-none">
12491249
<div
12501250
className={`br-4 dc__overflow-hidden h-100 bg__primary flex-grow-1 ${isExpressEditView ? 'border__primary-warning' : 'border__primary'}`}

0 commit comments

Comments
 (0)