Skip to content

Commit 8a3d1c3

Browse files
Merge pull request #624 from devtron-labs/feat/migrate-helm-app-main
feat: migrate helm app [Main]
2 parents efbd1c5 + 96c4bb9 commit 8a3d1c3

File tree

13 files changed

+40
-33
lines changed

13 files changed

+40
-33
lines changed

package-lock.json

Lines changed: 2 additions & 2 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.9.0-patch-1",
3+
"version": "1.9.0-patch-2",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Assets/IconV2/ic-info-filled.svg

Lines changed: 2 additions & 2 deletions
Loading

src/Shared/Components/CICDHistory/StatusFilterButtonComponent.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
}
6161
}
6262

63-
&.with-menu-button {
63+
&.radio-group.with-menu-button {
6464
border-top-right-radius: 0;
6565
border-bottom-right-radius: 0;
6666

@@ -69,5 +69,9 @@
6969
border-top-right-radius: 0 !important;
7070
border-bottom-right-radius: 0 !important;
7171
}
72+
73+
.radio:first-child > .radio__item-label {
74+
padding: 2px 4px;
75+
}
7276
}
7377
}

src/Shared/Components/CICDHistory/StatusFilterButtonComponent.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,7 @@ export const StatusFilterButtonComponent = ({
7979
disabled={false}
8080
onChange={handleInlineFilterClick}
8181
>
82-
<RadioGroup.Radio
83-
key={allResourceKindFilter.status}
84-
value={allResourceKindFilter.status}
85-
tippyPlacement="top"
86-
tippyContent={allResourceKindFilter.status}
87-
tippyClass="w-100 dc__first-letter-capitalize"
88-
>
82+
<RadioGroup.Radio key={allResourceKindFilter.status} value={allResourceKindFilter.status}>
8983
<span className="dc__first-letter-capitalize">{`${allResourceKindFilter.status} (${allResourceKindFilter.count})`}</span>
9084
</RadioGroup.Radio>
9185
{inlineFilters.map(({ status, count }) => (

src/Shared/Components/GenericSectionErrorState/GenericSectionErrorState.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
import { ReactNode } from 'react'
1818
import { ComponentSizeType } from '@Shared/constants'
19-
import { Progressing } from '@Common/Progressing'
2019
import { ReactComponent as ErrorIcon } from '@Icons/ic-error-exclamation.svg'
2120
import { ReactComponent as ICInfoOutline } from '@Icons/ic-info-outline.svg'
21+
import { Icon } from '../Icon'
2222
import { Button, ButtonVariantType } from '../Button'
2323
import { GenericSectionErrorStateProps } from './types'
2424

@@ -35,7 +35,7 @@ const GenericSectionErrorState = ({
3535
}: GenericSectionErrorStateProps) => {
3636
const renderMarker = () => {
3737
if (progressingProps) {
38-
return <Progressing {...progressingProps} />
38+
return <Icon name="ic-circle-loader" {...progressingProps} />
3939
}
4040

4141
if (useInfoIcon) {

src/Shared/Components/GenericSectionErrorState/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import { ReactNode } from 'react'
18-
import { ProgressingProps } from '@Common/Types'
18+
import { IconsProps } from '../Icon'
1919

2020
export type GenericSectionErrorStateProps = {
2121
/**
@@ -51,10 +51,10 @@ export type GenericSectionErrorStateProps = {
5151
} & (
5252
| {
5353
/**
54-
* If provided, would render the Progressing component with given props instead of error icon
54+
* If provided, Icon with ic-circle-loader
5555
*/
56-
progressingProps: ProgressingProps
57-
useInfoIcon?: never
56+
progressingProps: Omit<IconsProps, 'name'>
57+
useInfoIcon?: false
5858
}
5959
| {
6060
progressingProps?: never
@@ -63,7 +63,7 @@ export type GenericSectionErrorStateProps = {
6363
*
6464
* @default false
6565
*/
66-
useInfoIcon: boolean
66+
useInfoIcon: true
6767
}
6868
| {
6969
progressingProps?: never

src/Shared/Components/ImageWithFallback/ImageWithFallback.component.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ const ImageWithFallback = ({ imageProps, fallbackImage }: ImageWithFallbackProps
4040
// eslint-disable-next-line react/jsx-no-useless-fragment
4141
<>
4242
{imageUrl || (!imageUrl && typeof fallbackImage === 'string') ? (
43-
<img alt="" {...imageProps} src={imageUrl || (fallbackImage as string)} onError={handleImageError} />
43+
<img
44+
loading="lazy"
45+
alt=""
46+
{...imageProps}
47+
src={imageUrl || (fallbackImage as string)}
48+
onError={handleImageError}
49+
/>
4450
) : (
4551
fallbackImage
4652
)}

src/Shared/Components/ImageWithFallback/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ export interface ImageWithFallbackProps {
2020
/**
2121
* Props for the image
2222
*/
23-
imageProps: ImgHTMLAttributes<HTMLImageElement>
23+
imageProps: Omit<ImgHTMLAttributes<HTMLImageElement>, 'alt' | 'height' | 'width'> &
24+
Required<Pick<ImgHTMLAttributes<HTMLImageElement>, 'alt' | 'height' | 'width'>>
2425
/**
2526
* Fallback image; can be a url or a jsx element
2627
*/

src/Shared/Components/InfoBlock/constants.tsx

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

17-
import { ReactComponent as ICInfoFilled } from '@Icons/ic-info-filled.svg'
1817
import { ReactComponent as ICError } from '@Icons/ic-error.svg'
1918
import { ReactComponent as ICSuccess } from '@Icons/ic-success.svg'
2019
import { ReactComponent as ICWarningY5 } from '@Icons/ic-warning-y5.svg'
2120
import { ReactComponent as ICHelp } from '@Icons/ic-help.svg'
2221
import { ComponentSizeType } from '@Shared/constants'
2322
import { ButtonProps } from '../Button'
23+
import { Icon } from '../Icon'
2424
import { InfoBlockProps } from './types'
2525

2626
export const VARIANT_TO_BG_MAP: Record<InfoBlockProps['variant'], string> = {
@@ -29,14 +29,16 @@ export const VARIANT_TO_BG_MAP: Record<InfoBlockProps['variant'], string> = {
2929
information: 'bcb-1 eb-2',
3030
success: 'bcg-1 eg-2',
3131
warning: 'bcy-1 ey-2',
32+
neutral: 'bcn-1 en-2',
3233
}
3334

3435
export const VARIANT_TO_ICON_MAP: Record<InfoBlockProps['variant'], InfoBlockProps['customIcon']> = {
3536
error: <ICError />,
3637
help: <ICHelp className="fcv-5" />,
37-
information: <ICInfoFilled />,
38+
information: <Icon name="ic-info-filled" color="B500" />,
3839
success: <ICSuccess />,
3940
warning: <ICWarningY5 />,
41+
neutral: <Icon name="ic-info-filled" color={null} />,
4042
}
4143

4244
export const CONTAINER_SIZE_TO_CLASS_MAP: Record<InfoBlockProps['size'], string> = {

src/Shared/Components/InfoBlock/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import { ComponentSizeType } from '@Shared/constants'
1818
import { BorderConfigType, ComponentLayoutType } from '@Shared/types'
1919
import { ReactElement, ReactNode } from 'react'
20-
import { ButtonProps } from '../Button'
20+
import { ButtonComponentType, ButtonProps } from '../Button'
2121

2222
export type InfoBlockProps = {
2323
/**
@@ -27,7 +27,7 @@ export type InfoBlockProps = {
2727
/**
2828
* @default 'information'
2929
*/
30-
variant?: 'error' | 'help' | 'information' | 'success' | 'warning'
30+
variant?: 'error' | 'help' | 'information' | 'success' | 'warning' | 'neutral'
3131
/**
3232
* @default ComponentSizeType.large
3333
*/
@@ -36,7 +36,7 @@ export type InfoBlockProps = {
3636
* If given would override the default icon derived from type
3737
*/
3838
customIcon?: ReactElement
39-
buttonProps?: ButtonProps
39+
buttonProps?: ButtonProps<ButtonComponentType>
4040
borderConfig?: BorderConfigType
4141
borderRadiusConfig?: BorderConfigType
4242
} & (

src/Shared/Components/ScannedByToolModal/ScannedByToolModal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ const ScannedByToolModal: React.FC<ScannedByToolModalProps> = ({
3737
src: scanToolUrl,
3838
className: 'icon-dim-20-imp',
3939
alt: 'scan-tool',
40+
height: 20,
41+
width: 20,
4042
}}
4143
fallbackImage={<ICScanFallback className="icon-dim-20-imp dc__no-shrink" />}
4244
/>

src/Shared/Components/SelectPicker/common.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ export const SelectPickerOption = <OptionValue, IsMulti extends boolean>({
195195
selectOption(data)
196196
}
197197

198+
const iconBaseClass = 'dc__no-shrink icon-dim-16 flex dc__fill-available-space'
199+
198200
return (
199201
<components.Option {...props}>
200202
<Tooltip {...getTooltipProps(tooltipProps)}>
@@ -210,9 +212,7 @@ export const SelectPickerOption = <OptionValue, IsMulti extends boolean>({
210212
/>
211213
)}
212214
<div className={`flex left w-100 ${showDescription ? 'top' : ''} dc__gap-8`}>
213-
{startIcon && (
214-
<div className="dc__no-shrink icon-dim-16 flex dc__fill-available-space">{startIcon}</div>
215-
)}
215+
{startIcon && <div className={`${iconBaseClass} mt-2`}>{startIcon}</div>}
216216
<div className="flex-grow-1">
217217
<Tooltip content={label} placement="right">
218218
<h4
@@ -233,9 +233,7 @@ export const SelectPickerOption = <OptionValue, IsMulti extends boolean>({
233233
<div className="fs-12 lh-18">{description}</div>
234234
))}
235235
</div>
236-
{endIcon && (
237-
<div className="dc__no-shrink icon-dim-16 flex dc__fill-available-space">{endIcon}</div>
238-
)}
236+
{endIcon && <div className={iconBaseClass}>{endIcon}</div>}
239237
</div>
240238
</div>
241239
</Tooltip>

0 commit comments

Comments
 (0)