DataViews: Inline z-index values#78315
Conversation
|
Size Change: +64 B (0%) Total Size: 7.97 MB 📦 View Changed
ℹ️ View Unchanged
|
# Conflicts: # packages/base-styles/CHANGELOG.md
| height: 100%; | ||
| justify-content: flex-start; | ||
| position: relative; | ||
| isolation: isolate; |
There was a problem hiding this comment.
It looks like we can/should isolate the grid card, because it's internal z-indexes should never have to win over anything outside of the card.
|
|
||
| z-index: z-index(".dataviews-footer"); | ||
| // Ensure the footer stays above the scrolling content, independent of DOM order. | ||
| z-index: 1; |
There was a problem hiding this comment.
This perhaps doesn't even need a z-index because it will be the highest just due to DOM order. But the Footer subcomponent can also be used modularly by consumers, which means maybe they will place it somewhere other than the footer position.
So we keep the z-index, but downgrade it from 2 to 1, due to the grid card stacking context now being isolated (so the footer doesn't have to compete with the z-index 1 of the grid card checkboxes).
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
1 similar comment
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Flaky tests detected in 80627bb. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25928664194
|
What?
Inlines a few DataViews-specific
z-index()helper values into the local DataViews stylesheets that own those stacking relationships.Why?
These values are local layering details rather than shared global layers, so keeping them in
@wordpress/base-stylesmakes the z-index map harder to reason about.How?
Testing Instructions
npm run storybook:dev.DataViews/DataViewsstories.Layout tablestory, setcontainerHeightto600pxto make the DataViews layout scroll, and confirm the sticky table header stays above table row checkboxes and actions while scrolling.Layout gridstory, hover, focus, and select grid cards with media previews, and confirm the selection checkbox and media actions stay above the preview inside each card.Screenshots or screencast
Interaction between footer and grid card checkbox:
Table when header is sticky: