-
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
Feature/allow spacer block gallery #55505
base: trunk
Are you sure you want to change the base?
Feature/allow spacer block gallery #55505
Conversation
Co-authored-by: alexhdd <115178520+alexhdd@users.noreply.github.com>
Co-authored-by: devfle <52854338+devfle@users.noreply.github.com>
Co-authored-by: alexhdd <115178520+alexhdd@users.noreply.github.com>
Co-authored-by: devfle <52854338+devfle@users.noreply.github.com>
Co-authored-by: devfle <52854338+devfle@users.noreply.github.com>
Warning: Type of PR label error 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. |
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @alexhdd! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
} ) => { | ||
const disableCustomSpacingSizes = useSelect( ( select ) => { | ||
const editorSettings = select( blockEditorStore ).getSettings(); | ||
return editorSettings?.disableCustomSpacingSizes; | ||
} ); | ||
const { orientation } = context; | ||
|
||
const galleryChildBlocks = useSelect( ( select ) => { |
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 wonder if we need to make this gallery specific. This could potentially be useful in other column related layouts at some point so maybe this could be columnChildBlocks
and isInsideGallery
could be isInsideColumns
?
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.
@glendaviesnz Good idea! Do you have any other cases already in mind?
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 have any specific use cases in mind, but it opens the possibility for more options if we make it more generic up front.
Co-authored-by: devfle <52854338+devfle@users.noreply.github.com>
I wonder if this is still necessary, if the grid experiment for galleries ends up resolving. #60022 |
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @alexhdd. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
Where are we on this? It still seems like a valuable addition. |
In any case! We are happy to update the PR if there is a real need for it! |
What?
We added the option add a resizable spacer block in the gallery block.
Why?
We worked (@devfle and me) on issue #52171 during Wordcamp Germany 2023. We offer a solution, so that not all slots in a gallery have to be used for an image. Instead a spacer may be added to allow different formatting of the gallery.
How?
We allowed the spacer block for images. Furthermore the orientation of the spacer is handled differently regarding his position in the gallery. Two edge cases that are also handled are if the gallery block has only one column and if the spacer is the last element in the gallery.
Testing Instructions
Testing Instructions for Keyboard
No additional controls for the keyboard has been added.
Screenshots or screencast