Skip to content

Commit 500475c

Browse files
Merge pull request #11380 from pmakode-akamai/M3-8972-fix-overflow-issue-on-kubernetes-summary-for-smaller-screens
fix: [M3-8972] - Overflow issue in Kubernetes Summary section on smaller screens (→ `staging`)
2 parents 99c2d6c + 0a8cd3e commit 500475c

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeConfigDisplay.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,23 @@ const useStyles = makeStyles()((theme: Theme) => ({
3737
pointerEvents: 'none',
3838
},
3939
kubeconfigElement: {
40+
'&:first-child': {
41+
borderLeft: 'none',
42+
},
4043
'&:hover': {
4144
opacity: 0.7,
4245
},
43-
'&:last-child': {
44-
borderRight: 'none',
45-
},
4646
alignItems: 'center',
47-
borderRight: '1px solid #c4c4c4',
47+
borderLeft: '1px solid #c4c4c4',
4848
cursor: 'pointer',
4949
display: 'flex',
5050
},
5151
kubeconfigElements: {
5252
alignItems: 'center',
5353
color: theme.palette.primary.main,
5454
display: 'flex',
55+
flexWrap: 'wrap',
56+
gap: theme.spacing(1),
5557
},
5658
kubeconfigFileText: {
5759
color: theme.textColors.linkActiveLight,

packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeSummaryPanel.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Box, Chip, Stack, StyledActionButton, Typography } from '@linode/ui';
22
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
3-
import { useTheme } from '@mui/material/styles';
43
import { useSnackbar } from 'notistack';
54
import * as React from 'react';
65

@@ -39,8 +38,6 @@ export const KubeSummaryPanel = React.memo((props: Props) => {
3938
const { data: account } = useAccount();
4039
const { showControlPlaneACL } = getKubeControlPlaneACL(account);
4140

42-
const theme = useTheme();
43-
4441
const { enqueueSnackbar } = useSnackbar();
4542

4643
const [drawerOpen, setDrawerOpen] = React.useState<boolean>(false);
@@ -95,7 +92,17 @@ export const KubeSummaryPanel = React.memo((props: Props) => {
9592
<Box>
9693
<EntityDetail
9794
body={
98-
<Stack direction="row" flexWrap="wrap" gap={2} px={3} py={2}>
95+
<Stack
96+
sx={(theme) => ({
97+
padding: theme.spacing(2),
98+
[theme.breakpoints.down('sm')]: {
99+
padding: theme.spacing(1),
100+
},
101+
})}
102+
direction="row"
103+
flexWrap="wrap"
104+
gap={2}
105+
>
99106
<KubeClusterSpecs cluster={cluster} />
100107
<KubeConfigDisplay
101108
clusterId={cluster.id}
@@ -135,12 +142,15 @@ export const KubeSummaryPanel = React.memo((props: Props) => {
135142
header={
136143
<EntityHeader>
137144
<Box
138-
sx={{
145+
sx={(theme) => ({
139146
paddingBottom: theme.spacing(),
140147
paddingLeft: theme.spacing(3),
141148
paddingRight: theme.spacing(1),
142149
paddingTop: theme.spacing(),
143-
}}
150+
[theme.breakpoints.down('sm')]: {
151+
paddingLeft: theme.spacing(2),
152+
},
153+
})}
144154
>
145155
<Typography variant="h2">Summary</Typography>
146156
</Box>

0 commit comments

Comments
 (0)