-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataViews: Fix patterns, templates and template parts pagination z-index
#58965
Conversation
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. |
Size Change: +51 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
The same issue exists on the Templates page (grid layout), but the Pages page (grid layout) is unaffected. It seems to be caused by |
The current approach looks fine to me, but we might want to define it as a variable. |
4e3b9cf
to
13f0953
Compare
Thank you for helping me identify the stacking context! I've updated the code to use vars. |
z-index
z-index
Flaky tests detected in 13f0953. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7887524818
|
Thanks for the update! I think it's okay to merge as is, but what do you think about unifying the variables to If we do that, I think we can delete this class name. |
I'm not sure we should add the I have no strong opinions on this though.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should add the
z-index:2
to the DataViews package as is specific to some of our views and also contains a small value(2). My thinking is that we should probably not need it and if some consumer does, set the value they have to..
Indeed. I don't have a strong opinion either, so let's ship this 👍
…ndex` (#58965) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: jameskoster <[email protected]> Co-authored-by: annezazu <[email protected]> Co-authored-by: miksansegundo <[email protected]>
I just cherry-picked this PR to the more/backports-for-beta3 branch to get it included in the next release: 16f7948 |
…ndex` (#58965) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: jameskoster <[email protected]> Co-authored-by: annezazu <[email protected]> Co-authored-by: miksansegundo <[email protected]>
@@ -101,6 +101,10 @@ | |||
text-overflow: ellipsis; | |||
color: inherit; | |||
} | |||
|
|||
.dataviews-pagination { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ntsekouras @t-hamano I've noticed that we use a dataviews internal class to do this. Can we do this differently? In my view, consumers shouldn't target dataviews internal classes, otherwise they'll become public API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the Data Views pagination component cannot be wrapped in an element with a specific class, nor can we add a specific class name.
gutenberg/packages/dataviews/src/pagination.js
Lines 24 to 29 in fc78ac9
<HStack | |
expanded={ false } | |
spacing={ 6 } | |
justify="end" | |
className="dataviews-pagination" | |
> |
For example, should we add a prop like paginationClassName
to the DataViews
component?
gutenberg/packages/dataviews/src/dataviews.js
Lines 31 to 46 in fc78ac9
export default function DataViews( { | |
view, | |
onChangeView, | |
fields, | |
search = true, | |
searchLabel = undefined, | |
actions = [], | |
data, | |
getItemId = defaultGetItemId, | |
isLoading = false, | |
paginationInfo, | |
supportedLayouts, | |
onSelectionChange = defaultOnSelectionChange, | |
onDetailsChange = null, | |
deferredRendering = false, | |
} ) { |
What?
Fixes: #58929
From the issue:
This is an issue for template and template parts list too, and this PR fixes that too.
Testing Instructions