Make WordPress Core

Opened 2 years ago

Closed 21 months 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.

Reference:

Attachments (1)

lightbox-not-showing.png (399.0 KB) - added by tb1909 2 years ago.

Download all attachments as: .zip

Change History (14)

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


2 years ago
#1

  • Keywords has-patch added

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

Trac ticket: https://core.trac.wordpress.org/ticket/58431

#2 @czapla
2 years ago

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

@davidbaumwald commented on PR #4526:


2 years ago
#3

@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:


2 years ago
#4

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
2 years 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.


2 years ago

#7 @tb1909
2 years ago

Test Report

This report validates that the indicated patch addresses the issue.

Patch tested: https://core.trac.wordpress.org/ticket/58431?action=diff&version=5

Environment

  • 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: https://core.trac.wordpress.org/raw-attachment/ticket/58431/lightbox-not-showing.png
or
Add as Attachment

@cbravobernal commented on PR #4526:


2 years ago
#8

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:


2 years ago
#9

It looks like this will be postponed until 6.4.

See @c4rl0sbr4v0's comment: https://github.com/WordPress/gutenberg/issues/51077#issuecomment-1593272413

#10 @kirasong
2 years 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 years 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:


21 months ago
#12

Behaviors have been removed from the Gutenberg plugin in https://github.com/WordPress/gutenberg/pull/53851.

An updated implementation of the Image Lightbox has been created in https://github.com/WordPress/gutenberg/pull/54509 where the Lightbox is not a Behavior but a feature of the Image block.

The above PRs have a corresponding backport in https://github.com/WordPress/wordpress-develop/pull/5248

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

#13 @czapla
21 months 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 https://core.trac.wordpress.org/ticket/59393

Note: See TracTickets for help on using tickets.