Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upcoming: [DI-21340] - Alert detail notification changes and CSS updates #45

Conversation

venkymano-akamai
Copy link

No description provided.

/*
* The chips that needs to be displayed
*/
chips: Array<string> | Array<string[]>;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we give it a proper name like values / labels. Chips name is not looking good

export const DisplayAlertChips = React.memo((props: AlertDimensionsProp) => {
const {
chips: values,
isJoin = false,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be no need to put default false, as undefined can also interpret as false for conditions

marginLeft={isJoin && index > 0 ? -1 : 0}
>
<StyledAlertChip
borderRadius={getBorderRadius(isJoin, index, value.length)}
Copy link

@nikhagra-akamai nikhagra-akamai Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
borderRadius={getBorderRadius(isJoin, index, value.length)}
borderRadius={getBorderRadius(index, value.length)}

can we remove isJoin as parameter as it is already a global variable and can be accessed directly

* @param length The length of the iteration so far
* @returns The border radius to be applied on chips based on the parameters
*/
const getBorderRadius = (isJoin: boolean, index: number, length: number) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const getBorderRadius = (isJoin: boolean, index: number, length: number) => {
const getBorderRadius = (index: number, length: number) => {

Comment on lines 23 to 27
mdLabel?: number;
/*
* Controls the size of the chip value from medium to larger screens
*/
mdValue?: number;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mdLabel?: number;
/*
* Controls the size of the chip value from medium to larger screens
*/
mdValue?: number;
labelWidth?: number;
/*
* Controls the size of the chip value from medium to larger screens
*/
valueWidth?: number;

can we rename it to more understandable name

<Grid alignItems="center" container item md={8} xs={12}>
<StyledAlertChip
borderRadius={theme.spacing(0.3)}
label={'All'}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
label={'All'}
label= "All"

</Typography>
<StyledAlertChip
borderRadius={theme.spacing(0.3)}
label={` ${triggerOccurrences}`}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is space before triggerOccurences intentional?

<DisplayAlertChips // label chip for evaluation period
chips={[convertSecondsToMinutes(evaluationPeriod)]}
isJoin
label={'Evaluation Periods'}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
label={'Evaluation Periods'}
label="Evaluation Periods"

no need to put string values as object notation. Same for every other places

@venkymano-akamai venkymano-akamai marked this pull request as ready for review December 10, 2024 12:56
@santoshp210-akamai santoshp210-akamai merged commit 2fe2a0b into santoshp210-akamai:alerts-listing-show-details-integration-branch Dec 11, 2024
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants