-
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
Block Bindings: Iteration for WP 6.6 #60956
Comments
UpdateThere are a bunch of pull requests/initiatives going on:
Apart from that, I started this experiment to expose the editor APIs and allow any block to use them. List of blockers/decisions to be madeI'm listing here what I consider the current blockers or decisions remaining for these issues/pull requests, but let's keep the discussion in their specific threads. Use block bindings editing APIs in pattern overrides Figure out how to solve calling Support all content image and button attributes in block bindings Is it okay to modify the image render callback like this? It solves the issue when a link is not part of the Add context needed by block bindings sources during its processing Is this approach correct? Simplify the HTML replacement logic until the HTML API is ready Is it worth it and safe to make this change until the HTML API is ready? Notify on save when users edit the value of a connected custom field instead of the post content Does this make sense? How this should/could work? |
Hi all 👋 Reminder: The release candidate for Gutenberg Version 18.5 is scheduled for next Friday (May 31st). So anything that is supposed to make it into WordPress 6.6 must be merged by then. Please raise any important issues that need additional attention :) |
Merged PRsSince the last update, some of the mentioned PRs have already been merged:
Risks for 6.6With Gutenberg RC scheduled for next Friday, I would like to bring up a potential risk of not having the functionality to allow editing of custom fields when connected to blocks ready for 6.6. Basically, it depends on this other pull request to move the logic directly to the store, but we hit some blockers I am not sure how to solve. Please check the linked comment for more info about them. While working on the initial pull request to allow editing, we realized that hooking into the Edit attributes (the current implementation), was causing some issues due to discrepancies when calling If we are not able to overcome those blockers, I'm afraid the functionality to allow editing of custom fields might be at risk. Apart from that, even if we solve them, I would say that the editor APIs are not ready yet to be public. Although it shouldn't be a problem to keep them private as they are right now. Next stepsI would say that the next steps are trying to solve the mentioned issues and decide based on that. The focus will be on merging these pull requests:
Apart from that, there is some work being done related to improving the UX of connected blocks:
Finally, if the mentioned challenges are solved, we can push other important (although not 100% needed) aspects:
|
Hi folks, I am working on some content for Synced Pattern Overrides, which depend on the Block Bindings API. I wanted to confirm that in 6.6, no additional blocks will be supported, but perhaps all image and button attributes will be supported (#61255). Is this correct? |
Yes, that's correct. However, taking into account the 6.6 deadline, I wouldn't expect the image and button attributes to be supported for the next release, either. |
Update before the beta phaseNow that the beta phase is here and we don't plan to add new functionalities, let's do an update of what we can expect from block bindings in 6.6. HighlightsEditing custom field values directly from blocks when they are connectedThis was one of the main focuses for this release cycle and, although we still have to improve the workflows and iterate on it, I believe it is in good shape for an initial version. Some quick demos of what is possible with this implementation:
editing.demo.1.mp4
sync.editing.mp4
query.loop.edit.mp4
permissions.mp4Improve the UI to clarify when a block attribute is connectedAdditionally, we made some improvements to the UI to ensure users are aware of which attributes are connected to which source, although there are still aspects to improve. The main new functionality here is a new panel in the block inspector controls that lists the block attributes and the sources. It is supposed to be a first step to allow users to create and delete bindings in an easier way. Pattern overrides are using the block bindings API now in the editor as wellIn this pull request, we moved the pattern overrides to use block bindings API in the editor and reuse the logic. It also helped to solve some issues the previous implementation was causing. Polish the existing codeApart from that, we took the opportunity to improve the existing code. The most relevant change here is how the implementation was improved and avoid the use of hooks: link. Next stepsI consider the most important part is gathering feedback about these recent changes, especially regarding the UX, during the beta phase and addressing anything relevant. Bug fixesAs mentioned, I expect the beta phase to trigger potential bugs after getting more testing, and we should focus on addressing them. So far, there are a couple of issues that could be considered bug fixes that we could work on:
Follow-upsApart from the listed tasks in the tracking issue, these are some follow-ups and discussions we need to have, potentially for 6.7. I can create different issues for each of them. Improve editor APIs in order to make them public One of the possibilities for this release cycle, was to open the editor APIs to allow external sources reuse them. However, after making some changes to adapt them to the new functionalities, we feel that we still need to iterate on them before making them public. For example, we need to review the existing properties, potentially merging We could also explore exposing them as experimental somehow to allow external sources to use it at their own risk. Keep exploring how to handle the context needed by the sources Update: Discussion will happen here. During this release cycle, we started working on improving the way we pass the needed context both in the editor and the server. However, it wasn't included because we still have to figure out the best way to do it. Keep improving the UX to clarify the bound attributes Apart from the feedback we receive during beta phase, as part of this process, it was discussed to add an indicator that an attribute is connected instead of hiding the controls. It needs to be discussed and implemented in more detail, but it'd be a good step forward on clarifying the process. Improve the pre-publish workflow when editing a custom field Update: related issue #62329 As discussed here, after merging this new functionality, we only notify users when a custom field has been modifying after saving a published post. However, it'd be great to explore how to integrate something similar in the pre-publish workflow, currently unmodified. Review In this pull request, a new private Additionally, in the current implementation, there is a hardcoded workaround to skip footnotes that needs to be reviewed. Decide what to do when pressing "Enter" or pasting a new block in a bound rich text As discussed here, right now when a user presses "Enter" it creates a new block, and pasting another block is disabled. I believe it is good enough for a first version, but we need to explore and discuss how the ideal workflow is. Explore abstracting the changes needed for bindings in the Update: related issue #62330 As discussed here, some styles specific to block bindings panel were added, but it'd be great to explore if it makes sense to create some abstraction in the components used to allow other users to benefit from that. Add support for all images and button attributes We started exploring how to do this in this pull request. However, there were still some improvements to be made and it didn't make it in time for 6.6. Should we move the block bindings logic to core functions in the store Update: Related issue #63014 In this pull request, we started exploring the possibility of moving the logic to However, it triggered some challenges and concerns:
Should we include adding the This pull request added the possibility of just passing a |
Excellent update @SantosGuillamot. It looks like there isn't much work left for WP 6.6 as we know only about two of them. It would be great to file issues for them to have better space to discuss the next steps and an easier way to track progress in the WP 6.6 project. There is a large list of potential work for 6.7 so it feels like we should start planning the Iteration for WP 6.7 where we will have to set proper priorities taking into account that we also need to add support to more block binding sources and continue iterating for the UI that eventually allows setting the bindings in the UI. |
Thanks for the update @SantosGuillamot!
I've created an issue for this and will work on a fix: #62236 |
@SantosGuillamot, as per this comment, I added the I agree with @fabiankaegy in this comment
To add more context, there is no existing end user documentation for Block Bindings; only the DevNote and some posts in the Developer Blog are available:
|
We could also work on Adding support for revisions for custom field values. |
Okay, we will work on a dev note 🙂 I wasn't sure if non-developers topics should be covered in a dev note or other type of posts.
Just to clarify this: The developer workflows haven't been improved for 6.6. They remain the same. We just allowed now editing for the core "Post meta" source (not for external sources) and added a few tweaks to the UI. |
I totally agree it'd be great to support this kind of change in revisions. If I am not mistaken, right now, it creates a revision but it doesn't show any changes. I assume that could be considered a bug? |
If it's creating a revision and there is no way to see it, it could be. Yes |
Here is the dev note authored by @adamsilverstein: Framework for storing revisions of Post Meta in 6.4. It looks like revisions can get enabled magically with |
@SantosGuillamot TBH, I’m split down the middle on the need for a DevNote for this Issue. I think a brief note on a larger "Misc Dev Notes" post would be nice (as it enhances the work and experience with the The Block Bindings API), but not having a DevNote would also be OK. I'll keep the |
Regarding revisions, I just realized there is a closed ticket (as wontfix) and a linked pull request trying to solve the problem we are facing. I can take a look to see if we should reuse that or how to proceed. |
I just opened a potential pull request for the revisions issue, and I left a comment in the closed ticket to discuss how to proceed. |
@juanmaguitar I've started this quick note explaining the new workflows related to editing custom fields from connected blocks. It is basically a summary of the latest update on this issue. I'll let you decide if it should be a Dev Note, if it should go in another place, or if it doesn't even make sense at all. And I'm happy to apply any changes you consider necessary as well. |
@SantosGuillamot yes I think we should publish it but without the "DevNote" tag. I've pinged you via Slack to move forward with this. |
I'm closing this iteration issue because we don't expect to work on anything new for 6.6. I have just opened a new iteration for 6.7, including the follow-ups from this one. |
For reference, the post Editing custom fields from connected blocks was published on make.wordpress.org/core |
Iteration of the Block bindings API tracking issue.
This is what we expect to include in WordPress 6.6. We'll use this issue to share regular updates and progress.
Even though we'll probably won't add a UI to create bindings yet, we'd like to start discussing how it should work.
gutenberg_block_bindings_replace_html
#61660Beta phase fixes
The text was updated successfully, but these errors were encountered: