Skip to content

Feature/allowed-blocks#42

Open
dlousa92 wants to merge 5 commits intofeature/webpack-configfrom
feature/allowed-blocks
Open

Feature/allowed-blocks#42
dlousa92 wants to merge 5 commits intofeature/webpack-configfrom
feature/allowed-blocks

Conversation

@dlousa92
Copy link

No description provided.

@dlousa92 dlousa92 requested a review from jnschrag March 13, 2019 16:05
Copy link
Contributor

@jnschrag jnschrag left a comment

Choose a reason for hiding this comment

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

Thanks for taking a first pass at this - it's very much appreciated!

  • Can you check your indentation? All items in the array should have the same indentation.
  • If you could alphabetize these, that would be great! It'll make it easier on us as we adjust this list/need to easily scan them.
  • Let's add the following items:
    • core/table
    • core/html
    • core/video
    • core/embed
    • core-embed/twitter
    • core-embed/youtube
    • core-embed/facebook
    • core-embed/soundcloud
    • core-embed/flickr
    • core-embed/vimeo
  • Does the whitelist affect the blocks that are added by plugins? If it does, then we also need to make sure that the Jetpack slideshow & tiled gallery blocks are included


);
}
?> No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a blank line at the end of the file? You also don't need the closing ?>

Copy link
Author

Choose a reason for hiding this comment

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

I went ahead and added the additional blocks and reordered them alphabetically. Also fixed indentation.

As far as plugins being affected. It looks like the whitelist does affect those. I was trying to find what the jetpack slugs were called so I could add them to the list, but I haven't had any luck.

@jnschrag
Copy link
Contributor

@dlousa92 Thanks for making these improvements.

Re your comment about not being able to find Jetpack's blocks, you can take a look through their /blocks/ directory here: https://github.com/Automattic/jetpack/search?q=jetpack_register_block&unscoped_q=jetpack_register_block If you look at where the jetpack_register_block function is being called, you should be able to get the name of the ones we want.

@dlousa92
Copy link
Author

dlousa92 commented Mar 19, 2019

Thank you! So I have the correct names now, however they're not all popping up in the editor. 'jetpack/block-name' does work, as can be seen by the example 'jetpack/slideshow' I included in the code. However 'jetpack/tiled-gallery' or 'jetpack/carousel' do not show up.

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.

2 participants