Skip to content

Gallery Block: "Navigation Button Type" always listed in Settings, even when it makes no sense #79133

Closed

Description

@MadtownLems

Description

We disable the Enlarge on Click functionality through theme.json (lightbox['allowEditing'] = false, lightbox['enabled'] false).

However, the menu item for "Navigation Button Type" still appears in the 3 dot menu next to Settings for the Gallery Block. There's no way to make these controls appear.

Step-by-step reproduction instructions

  1. Disable Image Block's "enlarge on click" functionality
    {
    	"settings": {
    		"blocks": {
    			"core/image": {
    				"lightbox": {
    					"allowEditing": false,
    					"enabled": false
    				}
    			}
    		}
    	}
    }
  2. Insert a Gallery Block.
  3. Click on the 3 dot menu next to its Settings, and see that "Navigation Button Type" is listed (grayed out).Note that I've tried a ton of different ways to try to disable this, and don't believe its currently possible, such as filtering the gallery block's supports['interactivity'] etc, but no luck

Screenshots, screen recording, code snippet

Image

Environment info

  • WordPress 7.0, Chrome

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Activity

  1. added
    [Block] GalleryAffects the Gallery Block - used to display groups of images
    on Jun 12, 2026
  2. hanneslsm commented on Jun 12, 2026

    @hanneslsm

    I also realized this and was just about to create a new issue. Great timing!

    While I agree with you that the navigation button types should be shown when the lightbox is disabled globally, I think we also shouldn't even display the settings on a gallery block level when the lightbox is not enabled.

    Image
  3. ishitaj34 commented on Jun 12, 2026

    @ishitaj34
    Contributor

    @hanneslsm That's a good point! My PR addresses the specific menu item, but I agree there may be a broader UX improvement here.

  4. t-hamano commented on Jun 13, 2026

    @t-hamano
    Contributor

    I think we also shouldn't even display the settings on a gallery block level when the lightbox is not enabled.

    @hanneslsm Could you provide more details on this? The Gallery block should not display settings if there are no images with the lightbox enabled.

    { hasLightboxImages && (
    <ToggleGroupControl

  5. hanneslsm commented on Jun 15, 2026

    @hanneslsm

    Could you provide more details on this? The Gallery block should not display settings if there are no images with the lightbox enabled.

    I think, on gallery block level, we can hide Navigation Button Type in the inspector when the link is set to None

  6. t-hamano commented on Jun 15, 2026

    @t-hamano
    Contributor

    on gallery block level, we can hide Navigation Button Type in the inspector when the link is set to None

    This can be a bit confusing, but the link setting for a Gallery block is not a reflection of its actual state. Instead, it's merely a tool to collectively edit the link settings of the images within. Therefore, even if the Gallery block's link setting is set to 'None,' there might still be images within that have the lightbox enabled.

    gallery.mp4
  7. hanneslsm commented on Jun 15, 2026

    @hanneslsm

    even if the Gallery block's link setting is set to 'None,' there might still be images within that have the lightbox enabled.

    Good point! Well then, let's keep it as it is.
    Thanks for clarifying :)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] GalleryAffects the Gallery Block - used to display groups of images[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions