Skip to content

Commit 041c682

Browse files
authored
Merge branch 'develop' into chore/revamp-manifest-component-header
2 parents 633efc6 + 6f49458 commit 041c682

File tree

252 files changed

+8386
-5738
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

252 files changed

+8386
-5738
lines changed

.eslintignore

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ src/components/charts/list/DeployedChartFilters.tsx
207207
src/components/charts/list/DiscoverCharts.tsx
208208
src/components/charts/modal/ChartGroupBasicDeploy.tsx
209209
src/components/charts/modal/CreateChartGroup.tsx
210-
src/components/charts/modal/DeployChart.tsx
211210
src/components/charts/useChartGroup.ts
212211
src/components/charts/util/ChartGroupCard.tsx
213212
src/components/charts/util/ChartSelect.tsx
@@ -282,7 +281,6 @@ src/components/common/HiddenInput/HiddenInput.tsx
282281
src/components/common/List/List.tsx
283282
src/components/common/MultiSelect/MultiSelect.tsx
284283
src/components/common/Select/Select.tsx
285-
src/components/common/ToastBody.tsx
286284
src/components/common/ValidateForm/ValidateForm.tsx
287285
src/components/common/eaEmptyState/EAEmptyState.tsx
288286
src/components/common/edge/rectangularEdge.tsx
@@ -298,7 +296,7 @@ src/components/common/helpers/Helpers.tsx
298296
src/components/common/helpers/compareVersion.ts
299297
src/components/common/helpers/isSubset.ts
300298
src/components/common/helpers/time.ts
301-
src/components/common/helpers/util.ts
299+
src/components/common/helpers/utils.tsx
302300
src/components/common/helpers/workflowURL.ts
303301
src/components/common/hooks/FileReader.ts
304302
src/components/common/hooks/__tests__/FileReader.test.tsx
@@ -463,7 +461,7 @@ src/components/v2/common/ReactSelectCustomization.tsx
463461
src/components/v2/common/message.ui.tsx
464462
src/components/v2/devtronStackManager/AboutDevtronView.tsx
465463
src/components/v2/devtronStackManager/DevtronStackManager.component.tsx
466-
src/components/v2/devtronStackManager/DevtronStackManager.service.ts
464+
src/components/v2/devtronStackManager/DevtronStackManager.service.tsx
467465
src/components/v2/devtronStackManager/DevtronStackManager.tsx
468466
src/components/v2/devtronStackManager/DevtronStackManager.utils.ts
469467
src/components/v2/devtronStackManager/SuccessModalComponent.tsx
@@ -483,7 +481,6 @@ src/components/v2/values/chartValuesDiff/ChartValuesView.reducer.ts
483481
src/components/v2/values/chartValuesDiff/ChartValuesView.tsx
484482
src/components/v2/values/chartValuesDiff/ChartValuesView.utils.ts
485483
src/components/v2/values/chartValuesDiff/ProjectUpdateModal.tsx
486-
src/components/v2/values/common/ReadmeColumn.component.tsx
487484
src/components/v2/values/common/chartValues.api.ts
488485
src/components/workflowEditor/CDSuccessModal.tsx
489486
src/components/workflowEditor/CreateWorkflow.tsx

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ module.exports = {
4040
'airbnb',
4141
'airbnb/hooks',
4242
'prettier',
43+
'plugin:storybook/recommended',
4344
],
4445
rules: {
4546
'prettier/prettier': ['error'],

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ playwright/.auth/
3636
.npmrc
3737

3838
package-lock.json
39+
40+
*storybook.log
41+
storybook-static

.storybook/main.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import type { StorybookConfig } from '@storybook/react-vite'
2+
3+
const config: StorybookConfig = {
4+
stories: [
5+
{
6+
directory: '../src/stories',
7+
files: '*.stories.@(ts|tsx)',
8+
titlePrefix: 'Design System/',
9+
},
10+
],
11+
addons: [
12+
'@storybook/addon-links',
13+
'@storybook/addon-essentials',
14+
'@chromatic-com/storybook',
15+
'@storybook/addon-interactions',
16+
'@storybook/addon-a11y',
17+
],
18+
framework: {
19+
name: '@storybook/react-vite',
20+
options: {},
21+
},
22+
typescript: {
23+
// Disabled to prevent connection lost issue while linking common lib locally
24+
reactDocgen: false,
25+
},
26+
core: {
27+
disableTelemetry: true,
28+
},
29+
}
30+
export default config

.storybook/preview-head.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<link
2+
href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap"
3+
rel="stylesheet"
4+
/>
5+
<link href="https://fonts.googleapis.com/css2?family=Inconsolata&display=swap" rel="stylesheet" />
6+
<link href="https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700;900&display=swap" rel="stylesheet" />

.storybook/preview.tsx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from 'react'
2+
import type { Preview } from '@storybook/react'
3+
import '../src/css/application.scss'
4+
import { BrowserRouter } from 'react-router-dom'
5+
import { ToastManagerContainer } from '@devtron-labs/devtron-fe-common-lib'
6+
7+
const preview: Preview = {
8+
parameters: {
9+
controls: {
10+
matchers: {
11+
color: /(background|color)$/i,
12+
date: /Date$/i,
13+
},
14+
},
15+
backgrounds: {
16+
values: [
17+
{
18+
name: 'Light',
19+
value: 'var(--N0)',
20+
},
21+
{
22+
name: 'Dark',
23+
value: 'var(--N700)',
24+
},
25+
],
26+
default: 'Light',
27+
},
28+
},
29+
tags: ['autodocs'],
30+
decorators: (Story) => (
31+
<>
32+
<BrowserRouter>
33+
<Story />
34+
</BrowserRouter>
35+
<ToastManagerContainer />
36+
</>
37+
),
38+
}
39+
40+
export default preview

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN yarn install --network-timeout 600000
99
COPY src/ src
1010
COPY nginx.conf .
1111
COPY tsconfig.json .
12-
COPY vite.config.ts .
12+
COPY vite.config.mts .
1313
COPY . .
1414

1515
RUN echo `git rev-parse --short HEAD` > health.html

Dockerfile.storybook

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM node:20-alpine AS builder
2+
3+
WORKDIR /app
4+
COPY package.json .
5+
COPY yarn.lock .
6+
7+
RUN yarn install --network-timeout 600000
8+
9+
COPY . .
10+
11+
RUN yarn build-storybook
12+
13+
FROM nginx:stable
14+
15+
COPY --from=builder /app/storybook-static/ /usr/share/nginx/html
16+
WORKDIR /usr/share/nginx/html
17+
18+
CMD ["/bin/bash", "-c", "nginx -g \"daemon off;\""]
19+
EXPOSE 80

package.json

Lines changed: 16 additions & 9 deletions
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": "0.2.24",
7+
"@devtron-labs/devtron-fe-common-lib": "0.3.6",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",
@@ -40,7 +40,6 @@
4040
"react-monaco-editor": "^0.55.0",
4141
"react-router-dom": "^5.3.4",
4242
"react-select": "5.8.0",
43-
"react-toastify": "^8.2.0",
4443
"react-virtualized": "^9.22.5",
4544
"recharts": "^2.1.9",
4645
"rollup-plugin-node-polyfills": "0.2.1",
@@ -70,7 +69,9 @@
7069
"test-coverage": "npm run test -- --coverage --watchAll=false",
7170
"test:ci": "jest --watchAll=false --ci --json --coverage --testLocationInResults --outputFile=report.json",
7271
"jest": "jest",
73-
"lint-staged": "lint-staged"
72+
"lint-staged": "lint-staged",
73+
"storybook": "IS_STORYBOOK=true storybook dev -p 6006",
74+
"build-storybook": "IS_STORYBOOK=true storybook build"
7475
},
7576
"browserslist": [
7677
">0.2%",
@@ -79,8 +80,18 @@
7980
"not op_mini all"
8081
],
8182
"devDependencies": {
83+
"@chromatic-com/storybook": "^1.8.0",
8284
"@playwright/test": "^1.32.1",
8385
"@sentry/cli": "^2.2.0",
86+
"@storybook/addon-a11y": "^8.2.9",
87+
"@storybook/addon-actions": "^8.2.9",
88+
"@storybook/addon-essentials": "^8.2.9",
89+
"@storybook/addon-interactions": "^8.2.9",
90+
"@storybook/addon-links": "^8.2.9",
91+
"@storybook/blocks": "^8.2.9",
92+
"@storybook/react": "^8.2.9",
93+
"@storybook/react-vite": "^8.2.9",
94+
"@storybook/test": "^8.2.9",
8495
"@testing-library/jest-dom": "^5.16.2",
8596
"@testing-library/react": "^12.1.4",
8697
"@types/jest": "^27.4.1",
@@ -104,6 +115,7 @@
104115
"eslint-plugin-prettier": "^5.1.2",
105116
"eslint-plugin-react": "^7.33.2",
106117
"eslint-plugin-react-hooks": "^4.6.0",
118+
"eslint-plugin-storybook": "^0.8.0",
107119
"husky": "^7.0.4",
108120
"jest-extended": "^2.0.0",
109121
"jest-junit": "^13.0.0",
@@ -113,6 +125,7 @@
113125
"prettier": "^3.1.1",
114126
"react-test-render": "^1.1.2",
115127
"sass": "^1.69.7",
128+
"storybook": "^8.2.9",
116129
"ts-jest": "29.2.5",
117130
"ts-node": "10.9.2",
118131
"typescript": "5.5.4",
@@ -144,11 +157,5 @@
144157
"monaco-editor": "<rootDir>/node_modules/react-monaco-editor",
145158
"monaco-yaml": "<rootDir>/node_modules/react-monaco-editor"
146159
}
147-
},
148-
"resolutions": {
149-
"**/@typescript-eslint/eslint-plugin": "^4.33.0",
150-
"**/@typescript-eslint/parser": "^4.33.0",
151-
"react": "^17.0.2",
152-
"@types/react": "17.0.39"
153160
}
154161
}

0 commit comments

Comments
 (0)