-
Notifications
You must be signed in to change notification settings - Fork 357
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
feat: [UIE-8074] - DBaaS GA Summary tab #11091
base: develop
Are you sure you want to change the base?
Conversation
ed86113
to
90bf6e0
Compare
Coverage Report: ✅ |
export const StyledValueBox = styled(Box, { | ||
label: 'StyledValueBox', | ||
})(({ theme }) => ({ | ||
'& > button': { | ||
marginTop: '-5px', | ||
}, | ||
'& > div': { | ||
alignSelf: 'flex-start', | ||
verticalAlign: 'sub', | ||
}, | ||
'& button.MuiButtonBase-root': { | ||
marginTop: '0', | ||
}, | ||
'& button.copy-tooltip': { | ||
marginTop: '-3px', | ||
}, | ||
color: theme.palette.mode === 'dark' ? theme.color.grey8 : theme.color.black, | ||
display: 'flex', | ||
padding: '3px 5px', | ||
})); |
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.
Could we do something like the following to improve alignment (vertically centered values), make use of flex, and avoid the need for another nested component within the Grid item by replacing the parent of StyledValueBox
with:
export const StyledValueBox = styled(Box, { | |
label: 'StyledValueBox', | |
})(({ theme }) => ({ | |
'& > button': { | |
marginTop: '-5px', | |
}, | |
'& > div': { | |
alignSelf: 'flex-start', | |
verticalAlign: 'sub', | |
}, | |
'& button.MuiButtonBase-root': { | |
marginTop: '0', | |
}, | |
'& button.copy-tooltip': { | |
marginTop: '-3px', | |
}, | |
color: theme.palette.mode === 'dark' ? theme.color.grey8 : theme.color.black, | |
display: 'flex', | |
padding: '3px 5px', | |
})); | |
export const StyledGridValue= styled(Grid2, { | |
label: 'StyledGridValue', | |
})(({ theme }) => ({ | |
alignItems: 'center', | |
color: theme.palette.mode === 'dark' ? theme.color.grey8 : theme.color.black, | |
display: 'flex', | |
padding: `0 ${theme.spacing()}`, | |
})); |
I was seeing some weirdness with the icons existing outside the grid container at really small screen sizes (which is also currently happening), so might need to make some adjustments to this still.
const readOnlyHostValue = | ||
database?.hosts?.standby ?? database?.hosts?.secondary ?? ''; | ||
|
||
const readOnlyHost = () => { | ||
const defaultValue = isLegacy ? '-' : 'not available'; | ||
const value = readOnlyHostValue ?? defaultValue; | ||
return ( | ||
<> | ||
{value} | ||
<CopyTooltip | ||
className={classes.inlineCopyToolTip} | ||
text={readOnlyHostValue} | ||
/> |
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.
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.
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.
Unrelated to the above, I am also seeing eslint warnings in several files. Can we clean those up before merging this?
The VSCode ESLint extension (if you don't already have it installed) is very useful.
Description 📝
DBaaS GA summary tab refactor. Data remains the same, although the layout is altered.
Changes 🔄
Target release date 🗓️
10/28/24
Preview 📷
How to test 🧪
Prerequisites
Verification steps
As an Author I have considered 🤔
Check all that apply