Skip to content

Gallery: update action labels for conversion from dynamic variation#80664

Closed
ramonjd wants to merge 2 commits into
trunkfrom
update/gallery-dynamic-labels
Closed

Gallery: update action labels for conversion from dynamic variation#80664
ramonjd wants to merge 2 commits into
trunkfrom
update/gallery-dynamic-labels

Conversation

@ramonjd

@ramonjd ramonjd commented Jul 24, 2026

Copy link
Copy Markdown
Member

What? How?

Note

Take or leave this change. It's low priority.

Addresses the "label semantics" part of #80613.

Controls (toolbar + inspector): Convert to static gallery (was "Convert to images" / "Convert to individual images")

Why?

The Gallery block's dynamic variation offered a convertToStatic action under two different labels:

  • "Convert to images" (toolbar) and
  • "Convert to individual images" (inspector).

Read in a certain way, they could be construed as unwrapping the gallery into individual Image blocks, when in fact they switch the gallery from its dynamic source to a plain, manually-editable gallery.

Testing Instructions

  1. Add a Gallery block in the post editor and, from its Source panel, choose "Use images attached to the post" to enter dynamic mode.
  2. Confirm the block toolbar and the Source inspector panel now both read "Convert to static gallery" (not "Convert to images" / "Convert to individual images").
  3. Click either control → the gallery becomes a static gallery holding the currently-shown images, editable like any manual gallery.
Screenshot 2026-07-24 at 3 30 51 pm

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

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: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: scruffian <scruffian@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
Co-authored-by: noruzzamans <noruzzaman@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.

@github-actions github-actions Bot added the [Package] Block library /packages/block-library label Jul 24, 2026
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

Size Change: -11 B (0%)

Total Size: 7.75 MB

📦 View Changed
Filename Size Change
build/scripts/block-library/index.min.js 355 kB -11 B (0%)

compressed-size-action

@ramonjd ramonjd changed the title Gallery: Clarify dynamic "convert to static" labels and add confirmation Gallery: Clarify dynamic "convert to static" labels Jul 24, 2026
@ramonjd
ramonjd requested a review from andrewserong July 24, 2026 05:33
@ramonjd ramonjd self-assigned this Jul 24, 2026
@ramonjd ramonjd added [Block] Gallery Affects the Gallery Block - used to display groups of images [Type] Copy Issues or PRs that need copy editing assistance labels Jul 24, 2026
@ramonjd ramonjd changed the title Gallery: Clarify dynamic "convert to static" labels Gallery: update action labels for conversion from dynamic variation Jul 24, 2026
@andrewserong
andrewserong requested a review from a team July 24, 2026 05:41
@andrewserong

Copy link
Copy Markdown
Contributor

Thanks for getting the PR up to kickstart the discussion! I'm a little too close to the feature to make an objective call on the right language, so I've added gutenberg-design as reviewers... keen to hear what folks think 🤔

@github-actions

Copy link
Copy Markdown

Flaky tests detected in e0c62ac.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/30069345646
📝 Reported issues:

@noruzzamans

Copy link
Copy Markdown
Contributor

Tested! Confirms the labels now show consistently. Both the block toolbar and the Source inspector panel read "Convert to static gallery" for the dynamic Gallery block, as expected.

Not sure whether this wording change is actually needed though — will leave that to the design team's input, as @andrewserong mentioned.

Screenshot at Jul 24 13-01-07

@jasmussen

Copy link
Copy Markdown
Contributor

Thanks for fast action. I commented here, that perhaps we could be even simpler: just "Detach", but open a confirm dialog when you press it. I'm very possibly missing nuance, and perhaps this reads as a provocation, but then it is with intent for me to understand the limits: why does a user have to know that this block is dynamic? Can it just be a gallery like all others right up until they want to make changes to the sort order or add/remove items, at which point they will have to engage with the Detach button and modal?

* The Gallery block's "Source" inspector panel.
*
* In dynamic mode it shows the resolved source, a control to convert back to
* individual images, and the source ordering. In static mode it offers the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* a static gallery, and the source ordering. In static mode it offers the

/**
* Renders a dynamic-mode gallery on the canvas:
*
* - a block-toolbar control to convert back to individual images;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* - a block-toolbar control to convert back to a static gallery;

@ramonjd

ramonjd commented Jul 26, 2026

Copy link
Copy Markdown
Member Author

I commented #80613 (comment), that perhaps we could be even simpler: just "Detach", but open a confirm dialog when you press it

I like it. Commented here: #80613 (comment)

@andrewserong

Copy link
Copy Markdown
Contributor

Since the discussion in the issue has expanded a bit I've opened up a separate PR to explore the "Detach + modal" idea over in: #80727

I'll close this one out now to signal that the PR we're trying to land is the other one.

Thanks for getting the discussion happening!

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 [Package] Block library /packages/block-library [Type] Copy Issues or PRs that need copy editing assistance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants