Skip to content
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

Register all blocks in PHP #2521

Merged
merged 37 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
2614b99
register all blocks php auto
AnthonyLedesma Apr 6, 2023
8a4406e
move function for scope
AnthonyLedesma Apr 10, 2023
e42a0a7
ton of fixes to registration and fixes for all phpunit tests
AnthonyLedesma Apr 11, 2023
1958e9e
Merge branch 'master' into try-register-all-blocks
AnthonyLedesma Apr 11, 2023
b35bae0
fixes for pa11y and register with manifest
AnthonyLedesma Apr 11, 2023
688f52e
Merge branch 'master' into try-register-all-blocks
AnthonyLedesma Apr 11, 2023
93dea6b
call the method with instantiated class
AnthonyLedesma Apr 11, 2023
0637224
php lint
AnthonyLedesma May 18, 2023
e594a7f
Merge branch 'master' into try-register-all-blocks
AnthonyLedesma May 18, 2023
2932875
Merge branch 'master' into try-register-all-blocks
AnthonyLedesma May 25, 2023
3670440
revert several changes and improve block registration
AnthonyLedesma Jun 5, 2023
230b41a
load editor scripts through metadata
AnthonyLedesma Jun 5, 2023
8ebdb29
update phpunit tests for form blocks
AnthonyLedesma Jun 6, 2023
508b953
update other phpunit tests
AnthonyLedesma Jun 6, 2023
15e4681
missed a few block.json editorScript values
AnthonyLedesma Jun 6, 2023
231546a
Merge branch 'master' into try-register-all-blocks
AnthonyLedesma Jun 13, 2023
cb2544b
update some jest tests
AnthonyLedesma Jun 21, 2023
cf42856
fix the helper and evert snapshot
AnthonyLedesma Jun 21, 2023
85bbd80
major jest updates for tests and helpers
AnthonyLedesma Jun 22, 2023
e31b327
Merge branch 'master' into try-register-all-blocks
AnthonyLedesma Jun 22, 2023
3bd7ca9
try revering some syntax
AnthonyLedesma Jun 26, 2023
933333b
enhance heading selector helper for Cypress
AnthonyLedesma Jun 26, 2023
d259db6
fix the lightbox and gist script enqueues for core blocks
AnthonyLedesma Jun 26, 2023
af563bb
ensure services script is specified as a viewScript
AnthonyLedesma Jun 26, 2023
a45a633
ensure inserter is closed
AnthonyLedesma Jun 27, 2023
f43113f
fix service block tests
AnthonyLedesma Jun 27, 2023
4a2a120
update block inserter helper
AnthonyLedesma Jun 28, 2023
a3cf699
introduce short delay for blocks to render
AnthonyLedesma Jun 28, 2023
a359a29
enhance block inserter helper and hero background controls test
AnthonyLedesma Jun 28, 2023
aaa063d
improve helpers and core script enqueue
AnthonyLedesma Jun 29, 2023
f2cdbed
enhance the things
AnthonyLedesma Jun 30, 2023
7688df7
Merge branch 'master' into try-register-all-blocks
AnthonyLedesma Jun 30, 2023
7f802bb
try more updates
AnthonyLedesma Jun 30, 2023
ba1b172
update helpers selector, was too strict
AnthonyLedesma Jul 10, 2023
201d678
enhance enqueue for core blocks function logic
AnthonyLedesma Jul 11, 2023
4adf4f8
remove commented out code from jest helpers
AnthonyLedesma Jul 11, 2023
67be901
fix comments around block manifest
AnthonyLedesma Jul 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix the helper and evert snapshot
  • Loading branch information
AnthonyLedesma committed Jun 21, 2023
commit cf4285626ee77a1b6eda7da1233205e0e1d53f8a
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports[`coblocks/gallery-masonry should have caption with \`core/image\` and ca
`;

exports[`coblocks/gallery-masonry should have className 'has-border-radius-10' with radius set to 10. 1`] = `
"<!-- wp:coblocks/gallery-masonry {\\"radius\\":10,\\"gutter\\":\\"medium\\"} -->
"<!-- wp:coblocks/gallery-masonry {\\"gutter\\":\\"medium\\",\\"radius\\":10} -->
<figure class=\\"wp-block-coblocks-gallery-masonry masonry-grid has-border-radius-10 has-medium-gutter\\"><!-- wp:image {\\"id\\":1} -->
<figure class=\\"wp-block-image\\"><img src=\\"https://wordpress.com/wp-content/uploads/1234/56/image-1.jpg\\" alt=\\"\\" class=\\"wp-image-1\\"/></figure>
<!-- /wp:image -->
Expand Down
3 changes: 1 addition & 2 deletions src/utils/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import findIndex from 'lodash/findIndex';
import get from 'lodash/get';
import pick from 'lodash/pick';
import merge from 'lodash/merge';

// Categories Helper
import { supportsCollections } from './block-helpers';
Expand Down Expand Up @@ -124,7 +123,7 @@ export const registerBlock = ( block ) => {
const icon = setIconColor( settings?.icon );

const metadataSettings = block?.metadata ? block.metadata : {};
const newSettings = merge( metadataSettings, settings );
const newSettings = { ...metadataSettings, ...settings };

// Not all properties from metadata are registered with the block using registerBlockType.
// Some props like title and example need to be manually added.
Expand Down
Loading