-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image block: Revise lightbox UI to remove 'behaviors' #53851
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
08bb1ed
Begin removing theme.json dependency in block UI
artemiomorales c93f1b6
Remove the useHasBehaviorsPanel hook
michalczaplinski 25aa1c6
Fix declaration to actually retrieve from user data
artemiomorales a8c09c9
Restructured use of global behaviors
michalczaplinski fac2e3a
More removal of behaviors.
michalczaplinski dfc1c46
Remove the reference to behaviors in Global styles and first iteratio…
michalczaplinski 51e4802
Remove behaviors altogether and everywhere
michalczaplinski b416558
Fix linter & sniffer PHP errors
michalczaplinski 321a213
Adjust schema properties count assertion
michalczaplinski 0021116
Add the lightbox attribute
michalczaplinski 6951a86
Remove unnecessary space
michalczaplinski 92b084f
Merge branch 'trunk' into update/revise-lightbox-ui
michalczaplinski 232161a
Add clarifying comment regarding skipped tests
artemiomorales cabe31b
Do not remove `behaviors` attribute from Image block's block.json.
michalczaplinski aa4450e
Revert "Do not remove `behaviors` attribute from Image block's block.…
michalczaplinski 91b86ef
Merge branch 'trunk' into update/revise-lightbox-ui
michalczaplinski f9e48f4
Revert deletion of behaviors.php
artemiomorales 8b95f4a
Merge branch 'trunk' into update/revise-lightbox-ui
michalczaplinski 1b3a480
Image block: UI updates for the image lightbox (#54071)
artemiomorales ef8c396
Revert "Image block: UI updates for the image lightbox (#54071)"
artemiomorales File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 0 additions & 71 deletions
71
packages/block-editor/src/components/global-styles/behaviors-panel.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this just be removed or does it need a deprecation of some sort? Behaviors were shipped in GB 16.4 so never included in a WP release.
cc @ellatrix @gziolo @youknowriad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@artemiomorales and I looked at whether this is used in production, and it looks like you can change that setting in the UI, which most likely gets reflected in what gets saved in the database. While it isn't mandatory for WordPress core, it would still be nice to provide a migration path for sites that have the latest Gutenberg plugin enabled. It shouldn't be that difficult to code something in the plugin to read
behaviors
object from the site and transfer the value to the new structure.I guess the same applies to the block attribute that changes from
behaviors.lightbox
tolightbox
in the Image block.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not fully caught up on what's next for behaviors, but it seems that themes will no longer be able to tweak the lightbox feature (enable/disable, set animation) after this removal.
If we still plan to allow them to tweak it, just in a different place, we could add some code around this line to make the migration easier for them. I'll be AFK in the next few days, but wanted to share in case it's useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the followup PR: #54071 we've added backwards-compatibility for users that might have been using the previous
behaviors.lightbox
syntax.In that PR (which is based on the current one) we're also now introducing a
lightbox.allowEditing
setting which allows themes to enable/disable the lightbox.