Skip to content

Commit c1493b2

Browse files
committed
refactor: update AppStatusModal components for improved layout and styling, including grid adjustments and word break handling
1 parent f3f4846 commit c1493b2

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

src/Shared/Components/AppStatusModal/AppStatusBody.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,15 @@ import { AppStatusBodyProps } from './types'
1111
import { getAppStatusMessageFromAppDetails } from './utils'
1212

1313
const InfoCardItem = ({ heading, value, isLast = false }: { heading: string; value: ReactNode; isLast?: boolean }) => (
14-
<div className={`py-12 px-16 flexbox dc__gap-16 ${!isLast ? 'border__secondary--bottom' : ''}`}>
14+
<div
15+
className={`py-12 px-16 dc__grid dc__column-gap-16 info-card-item ${!isLast ? 'border__secondary--bottom' : ''}`}
16+
>
1517
<Tooltip content={heading}>
16-
<h3 className="cn-9 fs-13 fw-4 lh-1-5 dc__truncate m-0 dc__no-shrink w-140">{heading}</h3>
18+
<h3 className="cn-9 fs-13 fw-4 lh-1-5 dc__truncate m-0 dc__no-shrink">{heading}</h3>
1719
</Tooltip>
1820

1921
{typeof value === 'string' ? (
20-
<ShowMoreText
21-
key={`show-more-text-${value}`}
22-
textClass="cn-9 fs-13 fw-4 lh-1-5"
23-
containerClass="pr-20"
24-
text={value}
25-
/>
22+
<ShowMoreText key={`show-more-text-${value}`} textClass="cn-9 fs-13 fw-4 lh-1-5" text={value} />
2623
) : (
2724
value
2825
)}

src/Shared/Components/AppStatusModal/AppStatusContent.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ const AppStatusContent = ({
8383
key={getResourceKey(nodeDetails)}
8484
>
8585
<Tooltip content={nodeDetails.kind}>
86-
<span>{nodeDetails.kind}</span>
86+
<span className="dc__word-break">{nodeDetails.kind}</span>
8787
</Tooltip>
8888

89-
<span>{nodeDetails.name}</span>
89+
<span className="dc__word-break">{nodeDetails.name}</span>
9090

9191
<div
92-
className={`app-summary__status-name f-${getNodeStatus(nodeDetails)?.toLowerCase() || ''}`}
92+
className={`app-summary__status-name f-${getNodeStatus(nodeDetails)?.toLowerCase() || ''} dc__first-letter-capitalize--imp`}
9393
>
9494
{getNodeStatus(nodeDetails)}
9595
</div>
@@ -110,7 +110,7 @@ const AppStatusContent = ({
110110
)}
111111
</div>
112112
)}
113-
<div>{getNodeMessage(nodeDetails)}</div>
113+
<div className="dc__word-break">{getNodeMessage(nodeDetails)}</div>
114114
</div>
115115
</div>
116116
))}

src/Shared/Components/AppStatusModal/AppStatusModal.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44
grid-template-columns: 150px 200px 100px auto;
55
}
66
}
7+
8+
.info-card-item {
9+
grid-template-columns: 140px 1fr;
10+
}
711
}

src/Shared/Store/IndexStore.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ export const IndexStore = {
245245

246246
const podMetadata = data.resourceTree?.podMetadata || []
247247

248+
// Not brave enough to remove this method but seems like its not doing anything
248249
getiNodesByRootNodeWithChildNodes(
249250
_nodes,
250251
_nodes.filter((_n) => (_n.parentRefs ?? []).length == 0).map((_n) => _n as iNode),

0 commit comments

Comments
 (0)