Skip to content

Enabled default block appender in gallery edit component#71236

Open
dhruvikpatel18 wants to merge 2 commits intoWordPress:trunkfrom
dhruvikpatel18:feat/enable-gallery-block-appender
Open

Enabled default block appender in gallery edit component#71236
dhruvikpatel18 wants to merge 2 commits intoWordPress:trunkfrom
dhruvikpatel18:feat/enable-gallery-block-appender

Conversation

@dhruvikpatel18
Copy link
Contributor

@dhruvikpatel18 dhruvikpatel18 commented Aug 18, 2025

Followed PR of: #71204 (comment)

What?

This does seem like a good addition, similar to the Buttons block, and other design-related blocks such as Columns, Grid, and Group, which have an appender. The gallery block currently lacks one. so adding it would improve consistency.
If there’s enough consensus, should we raise a separate follow-up PR to address this?

By @im3dabasia

Screenshots or screencast

Before

Screenshot 2025-08-20 at 5 17 43 PM

After

Screenshot 2025-08-20 at 5 18 58 PM

@dhruvikpatel18 dhruvikpatel18 marked this pull request as ready for review August 18, 2025 11:10
@github-actions
Copy link

github-actions bot commented Aug 18, 2025

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: dhruvikpatel18 <dhruvik18@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Gallery Affects the Gallery Block - used to display groups of images labels Aug 19, 2025
@Mamaduka Mamaduka added the Needs Design Feedback Needs general design feedback. label Aug 20, 2025
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing, @dhruvikpatel18!

Can you include before/after screenshots for the PR.

Copy link
Contributor

@im3dabasia im3dabasia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhruvikpatel18, when you have a moment, please rebase the PR with trunk so we can resolve the failing CI cases.

@Mamaduka
Copy link
Member

@dhruvikpatel18, @im3dabasia, let's get more feedback before merging this. I checked some old issues, and it seems that having "Add new" in the toolbar was intentional. See: #21247 and #38036.

While consistency is the key, not all blocks are created equal, and we should also keep that in mind.

@glendaviesnz, I know it's been a while since the Gallery block refactoring, but do you have any additional details?

@jasmussen
Copy link
Contributor

The motivation is not bad, but the solution should ideally be more holistical. I recently revisited this issue which showed the need to ponder these features somewhat more generically, whilst still considering their context. Some instincts from that:

  • An inline plus button in row-based blocks (buttons, navigation, row)
  • A slash command

The unclear piece is the "Add" button, which can take the shape of a plus, the text "Add", or a fixed position appender. We have a mix of all three: can they be combined to one or is it still valid? The benefit of a Plus/Add in the toolbar is that it could always insert after the selection, or before if you hold ⌥, and this could potentially replace/remove the need for a fixed position appender that currently exists on Group.

The nuance is, those all relate to either opening the block inserter directly, or inserting an empty paragraph to allow you to use the Slash command. In case of the gallery, it's different, because it does neither: it opens the media library modal. In that sense, I'd keep only the "Add" button for now, but encourage the more generic explorations for inserter improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Gallery Affects the Gallery Block - used to display groups of images Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants