-
Notifications
You must be signed in to change notification settings - Fork 798
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
Blocks: load different bundle in the block-based widget editor #20362
Conversation
That bundle was introduced in #15467 to be used in a frontend context.
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.
Here are some suggested test cases for this PR.
Gutenberg extensions
- Use Core's block editor
- Use latest stable Gutenberg plugin
Blocks
- Tiled Gallery
- Business Hours
- Calendly
- Form
- Contact Info
- Eventbrite
- Google calendar
- Mailchimp
- Map
- OpenTable
- Podcast player
- Star rating
- Recurring Payments
- Repeat Visitor
- Revue
- Simple Payments
- Slideshow
Extensions
- Publicize
- Likes
If you think that suggestions should be improved please edit the configuration file here. You can also modify/add test-suites to be used in the configuration file.
Caution: This PR has changes that must be merged to WordPress.com |
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
|
Thinking out loud, while the error notices are annoying and less than ideal, is it worth only fixing the notice at the expense of the user not being able to add whatever block they want at all? Unless we have more reasons to restrict the kinds of blocks that can be used in the widget editor (although some might not make sense to add to a widget area), I think I'd prefer the ability to add most of them. The blocks themselves still work and don't break anything, just some don't make sense, right? |
Did we land on a way forward for this? Do we want to revisit this before 10.1, or take it out of the milestone? |
This would impact P2s, so I'd love to have @lezama's green light before we go ahead with this. |
The p2-editor used to not have the document inspector part, I think that's what no-post-editor was referring to. I think this should be safe to merge from P2 side. |
@lezama This would stop us from uploading videos to VideoPress via the P2 editor, is that okay? |
Not okay 😅 , I see the problem now, I will check what we need to do P2 side and get back to you this week. |
p2editor has sidebar these days, I think this shouldn't be a problem p2 side |
I'll close this now since we haven't progressed on this imperfect solution lately. I believe we should be able to solve this properly by fixing the problems outlined in #17099. |
Related: #20357
Changes proposed in this Pull Request:
As described in #20357, we cannot use blocks that rely on post information and the
@wordpress/editor
package in the block-based widget editor that will ship in WordPress 5.8.We happen to have an existing alternative bundle, that was built for P2, and that had a similar goal: see #15467 and D41999-code for more info. One potential solution to #20357 would be to use that same bundle in the widget editor.
This PR leverages that existing bundle, and updates it to remove the blocks that are problematic in the widget editor.
This has an advantage: we do not have to come up with a new solution.
And some disadvantages:
no-post-editor
, I believe that bundle mostly meant "No blocks that only appear in the sidebar". I believe we may be able, and want to be using blocks such as our Video block or the Tiled Gallery block on P2. cc @lezama.jetpack_blocks_variation
filter to overwrite the block variation used anywhere on a site. Maybe we should force the use of the no-post-editor bundle after that filter has been applied.Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: