Skip to content

Commit 044dd1d

Browse files
committed
Merge branch 'develop' into feat/cluster-env-categories
2 parents 1d007cf + 92b6081 commit 044dd1d

Some content is hidden

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

43 files changed

+272
-482
lines changed

package-lock.json

Lines changed: 27 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.14.1-pre-3",
3+
"version": "1.14.1-pre-5",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",
@@ -122,7 +122,6 @@
122122
"qrcode.react": "^4.2.0",
123123
"react-canvas-confetti": "^2.0.7",
124124
"react-dates": "^21.8.0",
125-
"react-diff-viewer-continued": "^3.4.0",
126125
"react-draggable": "^4.4.5",
127126
"react-international-phone": "^4.5.0",
128127
"react-virtualized-sticky-tree": "^3.0.0-beta18",

src/Common/CustomTagSelector/PropagateTagInfo.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export default function PropagateTagInfo({ isCreateApp }: { isCreateApp: boolean
4747
interactive
4848
documentationLink={isCreateApp ? "APP_TAGS" : "APP_OVERVIEW_TAGS"}
4949
documentationLinkText="View Documentation"
50+
openInNewTab
5051
>
5152
<div className="flexbox cursor">
5253
<InjectTag className="icon-dim-16 mt-2 mr-4" />

src/Common/CustomTagSelector/ResizableTagTextArea.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ export const ResizableTagTextArea = ({
8989
}
9090

9191
useEffect(() => {
92-
reInitHeight()
92+
setTimeout(() => {
93+
reInitHeight()
94+
}, 100)
9395
}, [])
9496

9597
useThrottledEffect(reInitHeight, 500, [value])

src/Common/TippyCustomized.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import 'tippy.js/animations/shift-toward-subtle.css'
2323
import 'tippy.js/animations/shift-toward.css'
2424
import { TippyCustomizedProps, TippyTheme } from './Types'
2525
import { not, stopPropagation } from './Helper'
26-
import { DocLink } from '../Shared/DocLink'
26+
import { DocLink } from '@Shared/Components'
2727

2828
// This component will handle some of the new tippy designs and interactions
2929
// So this can be updated to support further for new features or interactions
@@ -79,8 +79,8 @@ export const TippyCustomized = <T extends boolean = false>(props: TippyCustomize
7979
additionalContent,
8080
documentationLink,
8181
documentationLinkText,
82-
isEnterprise,
8382
isExternalLink,
83+
openInNewTab,
8484
} = props
8585
return (
8686
<>
@@ -164,9 +164,9 @@ export const TippyCustomized = <T extends boolean = false>(props: TippyCustomize
164164
dataTestId="learn-more-about-tippy-link"
165165
showExternalIcon
166166
onClick={closeTippy}
167-
isEnterprise={isEnterprise}
168167
isExternalLink={isExternalLink}
169168
docLinkKey={documentationLink}
169+
openInNewTab={openInNewTab}
170170
/>
171171
</div>
172172
)}

src/Common/Types.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ import {
2828
ButtonProps,
2929
ComponentLayoutType,
3030
StatusType,
31+
DocLinkProps,
3132
} from '../Shared'
3233
import {
3334
ACTION_STATE,
3435
DEPLOYMENT_WINDOW_TYPE,
3536
DockerConfigOverrideType,
36-
DOCUMENTATION,
3737
RefVariableType,
3838
SortingOrder,
3939
TaskErrorObj,
@@ -120,10 +120,9 @@ export interface CheckboxProps {
120120
children?: ReactNode
121121
}
122122

123-
export type TippyWithBaseDocLinkTypes<T extends boolean> = {
124-
isExternalLink?: T
125-
isEnterprise?: boolean
126-
documentationLink?: T extends true ? string : keyof typeof DOCUMENTATION
123+
export interface TippyWithBaseDocLinkTypes<T extends boolean>
124+
extends Pick<DocLinkProps<T>, 'isExternalLink' | 'openInNewTab'> {
125+
documentationLink?: DocLinkProps<T>['docLinkKey']
127126
}
128127

129128
export type TippyCustomizedProps<T extends boolean> = Pick<TippyProps, 'appendTo'> &
@@ -169,8 +168,8 @@ export interface InfoIconTippyProps<T extends boolean = false>
169168
| 'Icon'
170169
| 'headingInfo'
171170
| 'documentationLink'
172-
| 'isEnterprise'
173171
| 'isExternalLink'
172+
| 'openInNewTab'
174173
> {
175174
dataTestid?: string
176175
children?: TippyCustomizedProps<T>['children']

src/Common/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
export * from '../Shared/DocLink'
1817
export * from './AddCDButton'
1918
export * from './API'
2019
export { BreadCrumb, useBreadcrumb } from './BreadCrumb/BreadCrumb'

src/Shared/Components/AboutDevtron/AboutDevtronBody.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ import { EULA_LINK, PRIVACY_POLICY_LINK, TERMS_OF_USE_LINK } from '@Shared/const
55
import { useMainContext } from '@Shared/Providers'
66

77
import { Button, ButtonComponentType, ButtonStyleType, ButtonVariantType } from '../Button'
8-
import { InstallationType } from '../Header/types'
98
import { Icon } from '../Icon'
109

1110
const AboutDevtronBody = ({ isFELibAvailable }: { isFELibAvailable: boolean }) => {
12-
const { currentServerInfo } = useMainContext()
11+
const { currentServerInfo, isEnterprise } = useMainContext()
1312

1413
const currentVersion = currentServerInfo?.serverInfo?.currentVersion
15-
const isEnterprise = currentServerInfo?.serverInfo?.installationType === InstallationType.ENTERPRISE
1614

1715
const isVersionCompatible = isFELibAvailable === isEnterprise
1816

src/Shared/Components/CICDHistory/Artifacts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ import folder from '@Icons/ic-folder.svg'
2424
import { ReactComponent as ICHelpOutline } from '@Icons/ic-help.svg'
2525
import { ReactComponent as MechanicalOperation } from '@Icons/ic-mechanical-operation.svg'
2626
import noartifact from '@Images/no-artifact.webp'
27-
import { DocLink } from '@Shared/DocLink'
2827
import { getIsApprovalPolicyConfigured } from '@Shared/Helpers'
2928
import { useDownload } from '@Shared/Hooks'
3029

3130
import { ClipboardButton, extractImage, GenericEmptyState, ImageTagsContainer, useGetUserRoles } from '../../../Common'
3231
import { EMPTY_STATE_STATUS } from '../../constants'
32+
import { DocLink } from '../DocLink'
3333
import { TargetPlatformBadgeList } from '../TargetPlatforms'
3434
import { TERMINAL_STATUS_MAP } from './constants'
3535
import { ArtifactType, CIListItemType } from './types'

src/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryDiffView.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ import { useParams } from 'react-router-dom'
1919
import Tippy from '@tippyjs/react'
2020

2121
import { CodeEditor } from '@Shared/Components/CodeEditor'
22-
import { renderDiffViewNoDifferenceState } from '@Shared/Components/DeploymentConfigDiff'
23-
import { DiffViewer } from '@Shared/Components/DiffViewer'
2422

2523
import { ReactComponent as Info } from '../../../../Assets/Icon/ic-info-filled.svg'
2624
import { ReactComponent as ViewVariablesIcon } from '../../../../Assets/Icon/ic-view-variable-toggle.svg'
@@ -71,10 +69,14 @@ const DeploymentHistoryDiffView = ({
7169

7270
const renderDeploymentDiffViaCodeEditor = () =>
7371
previousConfigAvailable ? (
74-
<DiffViewer
75-
oldValue={editorValuesLHS}
76-
newValue={editorValuesRHS}
77-
codeFoldMessageRenderer={renderDiffViewNoDifferenceState(editorValuesLHS, editorValuesRHS)}
72+
<CodeEditor
73+
height="100%"
74+
originalValue={editorValuesLHS}
75+
modifiedValue={editorValuesRHS}
76+
mode={MODES.YAML}
77+
noParsing
78+
diffView
79+
collapseUnchangedDiffView
7880
/>
7981
) : (
8082
<CodeEditor

0 commit comments

Comments
 (0)