Skip to content

Commit 79bd9e4

Browse files
authored
fix: [M3-9360] - Collapsible Node Pool overflow bug (#11699)
## Description 📝 1. Fix y-axis overflow when a Node Pool with a table is collapsed by setting the `PaginationFooter` position to be relative - This was caused due to the `visually-hidden` style we're applying to the footer label which has `position: absolute`, so it didn't follow the outer div's `overflow: hidden` rule - https://stackoverflow.com/questions/4605715/position-absolute-and-overflow-hidden 2. Unmount accordion content if there are more than 25 nodes for [performance](https://mui.com/material-ui/react-accordion/#performance) ## Target release date 🗓️ 2/25 ## How to test 🧪 ### Reproduction steps (How to reproduce the issue, if applicable) - [ ] On a different branch, go to a cluster's details page with the MSW on - [ ] Observe the y-axis overflow when the node pool with a table is collapsed ### Verification steps (How to verify changes) - [ ] Checkout this branch or preview link, go to a cluster's details page with the MSW on - [ ] Observe that there is **no** y-axis overflow when the node pool with a table is collapsed - [ ] Collapsed Accordion content should not exist in the DOM if the pool has more than 25 nodes
1 parent 36a3a6b commit 79bd9e4

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

packages/manager/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
2626
- Document titles with incorrect keywords ([#11635](https://github.com/linode/manager/pull/11635))
2727
- Order of footers for paginated LKE Node Pools ([#11639](https://github.com/linode/manager/pull/11639))
2828
- TabIndex reset issue and incorrect enhanced number input minus sign SVG color ([#11651](https://github.com/linode/manager/pull/11654))
29+
- Collapsible Node Pool overflow bug ([#11699](https://github.com/linode/manager/pull/11699))
2930

3031
### Removed:
3132

packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/NodePool.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ export const NodePool = (props: Props) => {
216216
data-qa-node-pool-section
217217
expanded={accordionExpanded}
218218
onChange={handleAccordionClick}
219+
// Improve performance by unmounting large content from the DOM when collapsed
220+
slotProps={{ transition: { unmountOnExit: nodes.length > 25 } }}
219221
>
220222
<NodeTable
221223
clusterCreated={clusterCreated}

packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/NodeTable.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ export const NodeTable = React.memo((props: Props) => {
248248
handleSizeChange={handlePageSizeChange}
249249
page={page}
250250
pageSize={pageSize}
251+
/**
252+
* M3-9360: Since this table is in an accordion, the position needs to be relative
253+
* to prevent an overflow-y issue with the absolutely positioned visually-hidden footer label
254+
**/
255+
sx={{ position: 'relative' }}
251256
/>
252257
<StyledTableFooter>
253258
<StyledPoolInfoBox>

0 commit comments

Comments
 (0)