-
Notifications
You must be signed in to change notification settings - Fork 63
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
v0.3.12 #148
Merged
Merged
v0.3.12 #148
Conversation
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
Meant to be an analogue to `blocksJSON`, but it can be useful as a fallback if one wants to handle unknown/generic blocks.
Add block attributesJSON field
`wp-graphql-gutenberg` couldn't handle requests when it found block types which are not in the registry. This can happen if a block type is removed but the block is still used in a post. Now both `blocksJSON` and `blocks` can be queried when unknown blocks are present.
Update BlockEditorContentNode.php
Implements #90.
Add dynamic content to Block class.
Handle unknown blocks
Some block types (e. g. ACF block types) are added during page load. So the return value of window.wp.blocks.getBlockTypes() changes during page load. Inside the iFrame window when accessing the window.wp.blocks.getBlockTypes() function to get the block types we should wait for the page to load to get all block types.
Wait for all block types to load before updating
Create new build
- Add `eagerlyLoadType => true` to Block Types that are only exposed to the Schema as part of the `Blocks` Interface - Add condition where Block types should only be registered if they have fields.
…ng, so registering a type adds a callback to the registry instead of the full Type Definition and the Schema Type Loader generates the object on demand, so this is no longer needed to be filtered
…-1.6 Updates to work with WPGraphQL v1.6+
…ssed through at all
[Bugfix] #118 - undefined $type_registry
Fixed: - `$attributes` nested arrays threw TypeError in PHP 8.0, this was a warning in PHP 7.4. Fixed by converting nested arrays to objects as well.
[Bugfix] #100 - Plugin breaks with PHP 8
…ilter Add filter to modify the block attributes
Fixes: - If a block has an empty `$attributes` array (e.g. a normal paragraph), then reading attributes saved in the HTML did not work. This was because the conversion of an empty array to an object did not work. - PHP ≥ 8.0 no longer crashes when `innerHTML` is an empty string. This problem was only visible once the empty array conversion was fixed.
Fixed: - There are some core dynamic blocks which takes three arguments in their render function, but the `WP_Block_Type::render()` function will only supply two, which means that if a post/page contains any such block then the query will crash. Using the `render_block()` function works though, and I suppose that is the 'correct' API to use in this case. Here are the core blocks affected by this (which will crash the query if present on a post/page): - `core/comment-author-avatar` - `core/comment-author-name` - `core/comment-content` - `core/comment-date` - `core/comment-edit-link` - `core/comment-reply-link` - `core/comment-template` - `core/comment-pagination-next` - `core/comment-pagination-numbers` - `core/comment-pagination-previous` - `core/home-link` - `core/navigation-link` - `core/navigation-submenu` - `core/navigation` - `core/page-list` - `core/post-author-biography` - `core/post-author-name` - `core/post-author` - `core/post-comments-count` - `core/post-comments-form` - `core/post-comments-link` - `core/post-comments` - `core/post-content` - `core/post-date` - `core/post-excerpt` - `core/post-featured-image` - `core/post-template` - `core/post-terms` - `core/post-title` - `core/query-pagination-next` - `core/query-pagination-numbers` - `core/query-pagination-previous` - `core/read-more` - `core/social-link` - `core/table-of-contents` - `core/widget-group`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.