-
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
Group: Update block example #63114
Group: Update block example #63114
Conversation
Size Change: +355 B (+0.02%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
Flaky tests detected in 37a3310. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9828618068
|
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.
Just a smoke test to see how it looks. Seems to behave pretty well.
Other ideas might be to use a background image, or add a border. I'll leave it to the designers' eyes 😄
customTextColor: '#00d084', | ||
fontSize: 'large', | ||
content: __( 'Four.' ), | ||
url: 'https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg', |
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 don't know if it matters, but maybe we could marry the text with the image?
Lake Bhutan is a high-altitude lake in Bhutan, known for its pristine beauty, clear waters, and serene surroundings, attracting nature lovers and trekkers.
Or, there are some free use images related to Don Quixote over at https://www.oldbookillustrations.com/search/?q=don+quixote
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 we could marry the text with the image?
100%. This was my intention and why I left this in draft status 🙂
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.
It would be nice if all the blocks' example content had some level of consistency or theme. It's pretty random at the moment 😅
}, | ||
attributes: { | ||
layout: { | ||
type: 'constrained', |
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.
Simple and looking pretty good.
2024-07-04.19.10.21.mp4
I think this would be a nice follow-up. |
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.
Left one question. Otherwise this is nice. Follow-up may be to define examples for the variations; although if we could represent the selected block as the example here, that may be a better result.
@@ -4,6 +4,59 @@ | |||
import { __, _x } from '@wordpress/i18n'; | |||
import { group, row, stack, grid } from '@wordpress/icons'; | |||
|
|||
const example = { |
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.
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.
It's used for previewing the different block variations in the block inserter.
Steps 5 - 8 in the test instructions cover this aspect. To save you having to fire up the PR locally you can see the original example with the main block inserter from the 30s mark on in the description's demo video.
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.
This might be easier still 🙂
Screen.Recording.2024-07-29.at.5.10.47.PM.mp4
@aaronrobertshaw is anything blocking this? seems like a nice quick update. |
37a3310
to
3079605
Compare
Only the fact I was waiting on decisions and then the WP 6.6 release caused this to drop down the priority list. If you are happy with the current state of the example in this PR, we can easily merge and iterate further via follow-ups. Someone else may need to pick up the follow-ups as I'll be AFK for a couple of weeks in the near future. I've rebased this PR and flagged it ready for review. |
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. |
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: #63035
What?
Updates the inner blocks for the default Group example block while keeping the existing example for the Row, Stack, and Grid block variations.
Alternative to #63039.
Why?
The current example doesn't add a lot of value, especially when a user is attempting to preview block style variations. See #63035
How?
Testing Instructions
Screenshots or screencast
Screen.Recording.2024-07-04.at.5.18.55.PM.mp4
Possible Follow-ups