Make WordPress Core

Opened 4 months ago

Closed 6 days ago

#58431 closed enhancement (invalid)

Introduce Behaviors UI

Reported by: czapla's profile czapla Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch gutenberg-merge
Focuses: Cc:

Description (last modified by hellofromTonya)

Adds the Behaviors UI, which is a simple UI element to add specific behaviors to a block and support for them to theme.json & block.json. It is only concerned with the built-in "LIGHTBOX" behavior.

Merges from Gutenberg.


Attachments (1)

lightbox-not-showing.png (399.0 KB) - added by tb1909 4 months ago.

Download all attachments as: .zip

Change History (14)

This ticket was mentioned in PR #4526 on WordPress/wordpress-develop by @czapla.

4 months ago

  • Keywords has-patch added

Backport the PR that introduced the Behaviors UI in the block editor:

Trac ticket:

#2 @czapla
4 months ago

I don't seem to have sufficient permissions to edit the description to add additional information, sorry!

@davidbaumwald commented on PR #4526:

4 months ago

@michalczaplinski Aside from the WPCS issues, the unit tests are failing because the behaviors.php file isn't included. This should probably be added in wp-settings.php, but I am not 100% sure where this would best fit.

@czapla commented on PR #4526:

4 months ago

Ok, fixed it.

should probably be added in wp-settings.php, but I am not 100% sure where this would best fit.

I'm also not 100% sure if this is the best place, but I've put it there like you suggested.

#5 @czapla
4 months ago

  • Description modified (diff)
  • Milestone changed from Awaiting Review to 6.3

This ticket was mentioned in Slack in #core-test by boniu91. View the logs.

4 months ago

#7 @tb1909
4 months ago

Test Report

This report validates that the indicated patch addresses the issue.

Patch tested:


  • OS: macOS 13.4
  • Web Server: Nginx
  • PHP: 8.1.13
  • WordPress: 6.3-alpha-55505-src
  • Browser: Google Chrome 114.0.5735.106
  • Theme: Twenty Twenty-Three
  • Active Plugins:
    • none

Actual Results

  • Unable to see the lightbox dropdown menu

Additional Notes

  • Tried the following: Creating a new post, adding an image, opening up the advanced section. The dropdown menu does not show up. After manually adding the
"core/image": {
	"behaviorsUIEnabled": true

, and

"behaviors": {
	"lightbox": true

to the theme.json of the twenty-twentythree theme it still does not show up

Supplemental Artifacts

Add Inline:
Add as Attachment

@cbravobernal commented on PR #4526:

3 months ago

We can close this backport as it will be punted for 6.4 - I guess for that time there will be different code.

@ramonopoly commented on PR #4526:

3 months ago

It looks like this will be postponed until 6.4.

See @c4rl0sbr4v0's comment:

#10 @mikeschroder
3 months ago

  • Milestone changed from 6.3 to 6.4

Based on the comments in the PR, I'm going to move this to the 6.4 milestone.

Thanks so much everyone for your help so far!

If I misunderstand, or the decision is changed, please feel free to comment and move it back into 6.3.

#11 @hellofromTonya
2 months ago

  • Description modified (diff)
  • Keywords gutenberg-merge added
  • Summary changed from Backport: Behaviors UI to Introduce Behaviors UI

Removed the word "Backport" as this means something different in Core (it means to backport changes to an older Core branch / version).

Updated the description from the original Gutenberg PR to provide more information for contributors working on merging the code from Gutenberg into Core.

@czapla commented on PR #4526:

6 days ago

Behaviors have been removed from the Gutenberg plugin in

An updated implementation of the Image Lightbox has been created in where the Lightbox is not a Behavior but a feature of the Image block.

The above PRs have a corresponding backport in

In the light of all that, we can now close this PR.

#13 @czapla
6 days ago

  • Milestone 6.4 deleted
  • Resolution set to invalid
  • Status changed from new to closed

As noted in the above comment on the PR, this is superseded by

Note: See TracTickets for help on using tickets.