Skip to content

Commit

Permalink
[IndexTable] Fix header cutting off loading banner due to z-index (#8364
Browse files Browse the repository at this point in the history
)

### WHY are these changes introduced?

Related to: #8277
In order to support some tooltip behavior the z-index changed for table
headers. Loading banners need to have their z-index moved up to not be
cut off by the header.

Example issue:
![Screenshot 2023-02-15 at 9 42 03
AM](https://user-images.githubusercontent.com/510085/219060518-a2fdffab-9263-42c0-8647-9278f8322c52.jpg)

### WHAT is this pull request doing?

This PR removes `--pc-index-table-loading-panel` and the loading banner
will now use `--p-z-2` for z-index instead.

Example with fix:
![Screenshot 2023-02-15 at 9 42 21
AM](https://user-images.githubusercontent.com/510085/219060886-8f6c5d18-e596-41b9-9e6a-1c4e42b8a728.jpg)

### 🎩 checklist

- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [ ] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
  • Loading branch information
stefanlegg committed Feb 17, 2023
1 parent 065df23 commit d061915
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/tasty-seals-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/polaris': patch
---

Replace --pc-index-table-loading-panel with --p-z-2 to resolve loading bar overlap issue with .LoadingPanel
Rename --pc-index-table-loading-panel to --pc-index-table-sticky-table for continued use in .StickyTable
6 changes: 3 additions & 3 deletions polaris-react/src/components/IndexTable/IndexTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
--pc-index-table-sticky-cell: 31;
--pc-index-table-scroll-bar: 35;
--pc-index-table-bulk-actions: 36;
--pc-index-table-loading-panel: 37;
--pc-index-table-sticky-table: 37;
// stylelint-enable
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: relative;
Expand Down Expand Up @@ -57,7 +57,7 @@ $loading-panel-height: 53px;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
position: absolute;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
z-index: var(--pc-index-table-loading-panel);
z-index: var(--p-z-2);
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
top: 0;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
Expand Down Expand Up @@ -495,7 +495,7 @@ $loading-panel-height: 53px;
right: 0;
visibility: hidden;
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
z-index: var(--pc-index-table-loading-panel);
z-index: var(--pc-index-table-sticky-table);
}

.StickyTableHeader {
Expand Down

0 comments on commit d061915

Please sign in to comment.