-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fixed Incorrect Text Position issue in Dataviews #68767
Conversation
Size Change: +32 B (0%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
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. |
Hi @shail-mehta can you please always use the pull request template, and add the missing information to this PR. |
@carolinan I have added testing Instructions and description in this PR. |
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.
Thanks for the PR!
This PR solves the issue with empty items, but seems to have a visual impact on regular items.
trunk | This PR |
---|---|
As you can see, the pattern content is vertically centered. I think patterns with content need to remain top-aligned.
I think this style is also needed on the pattern page.
@t-hamano Thanks for the review. I Will work on this. |
Flaky tests detected in 8d7d223. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12953209676
|
10a7cbb
to
123c942
Compare
@t-hamano I have added empty text message position in center Align Horizontally and vertically |
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.
Maybe I didn't explain it well enough, but I wasn't proposing to change the field itself, just to add a CSS.
In other words, I think the issue can be resolved by simply adding the following change to the first commit of this PR:
diff --git a/packages/edit-site/src/components/page-patterns/style.scss b/packages/edit-site/src/components/page-patterns/style.scss
index 0fb16e3de5..8a2d71d876 100644
--- a/packages/edit-site/src/components/page-patterns/style.scss
+++ b/packages/edit-site/src/components/page-patterns/style.scss
@@ -10,6 +10,12 @@
height: 100%;
border-radius: $radius-medium;
+ .dataviews-view-grid & {
+ .block-editor-block-preview__container {
+ height: 100%;
+ }
+ }
+
.dataviews-view-table & {
width: 96px;
flex-grow: 0;
Apologies for misunderstanding your previous message. 🙏 I will work on this changes. |
bb8fcac
to
8d7d223
Compare
Applied Suggested Changes. |
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.
Fixes: #68766
Description
For templates, template items, and patterns with empty content, we would expect the DataViews to display "Empty {itemType}" in the center of the item. Alignment issue is not only for empty content its occurring if also have content. Its showing vertically top align and left align Horizontally (Template or pattern) it Should be Vertically and Horizontally Center Align.
Step-by-step Testing instructions