Skip to content

Conversation

@youknowriad
Copy link
Contributor

closes #1097

Initially, I wanted to match the recommendations of the handbook (https://wordpress.org/gutenberg/handbook/blocks/writing-your-first-block-type/) for registering the Core Blocks server-side but at the moment the blocks don't have separate scripts so I just
updated the registration to move it to the init function instead.

Testing instructions

  • Try the categories and recent posts blocks.

@youknowriad youknowriad self-assigned this Feb 16, 2018
@youknowriad youknowriad requested a review from aduth February 16, 2018 11:12
Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

The function names (particularly dropdown script) aren't super clear, but I'm happy at least for dropping the Gutenberg codename 😄

In a merge proposal, unsure if we'd prefer to move toward registering all core blocks in a single location, though I like the isolation this currently gives in plugin form. We can revisit later.

@aduth
Copy link
Member

aduth commented Feb 19, 2018

I wanted to match the recommendations of the handbook for registering the Core Blocks server-side but at the moment the blocks don't have separate scripts

Related: #4841

Honestly, I'd hate for separate script bundles to be a blocker much longer for server registration, as it's hurting us the longer we wait for this to occur in developer confusion. I think we can go ahead and move all but the script handle to the server and tackle that separately.

@youknowriad youknowriad merged commit e31c87b into master Feb 20, 2018
@youknowriad youknowriad deleted the update/register-core-blocks-on-init branch February 20, 2018 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconsider server-side block code loading

3 participants