-
Notifications
You must be signed in to change notification settings - Fork 0
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
upcoming: [DI-21340] - Alert detail notification changes and CSS updates #45
Conversation
/* | ||
* The chips that needs to be displayed | ||
*/ | ||
chips: Array<string> | Array<string[]>; |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const getBorderRadius = (isJoin: boolean, index: number, length: number) => { | |
const getBorderRadius = (index: number, length: number) => { |
mdLabel?: number; | ||
/* | ||
* Controls the size of the chip value from medium to larger screens | ||
*/ | ||
mdValue?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label={'All'} | |
label= "All" |
</Typography> | ||
<StyledAlertChip | ||
borderRadius={theme.spacing(0.3)} | ||
label={` ${triggerOccurrences}`} |
There was a problem hiding this comment.
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'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label={'Evaluation Periods'} | |
label="Evaluation Periods" |
no need to put string values as object notation. Same for every other places
2fe2a0b
into
santoshp210-akamai:alerts-listing-show-details-integration-branch
No description provided.