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

Add shortcode package #7581

Merged
merged 2 commits into from Jun 27, 2018

Conversation

Projects
None yet
3 participants
@iseulde
Member

iseulde commented Jun 27, 2018

Description

This branch adds a shortcode package to Gutenberg, instead of relying on the core global. This is needed for us to add tests for the shortcode converter (and future tweaks).

See https://github.com/WordPress/wordpress-develop/blob/master/src/js/_enqueues/wp/shortcode.js and https://github.com/WordPress/wordpress-develop/blob/master/tests/qunit/wp-includes/js/shortcode.js.

How has this been tested?

Ensure shortcode converting still works.

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@iseulde iseulde added this to the 3.2 milestone Jun 27, 2018

@iseulde iseulde requested a review from WordPress/gutenberg-core Jun 27, 2018

@iseulde

This comment has been minimized.

Member

iseulde commented Jun 27, 2018

Still making some doc block tweaks.

@iseulde

This comment has been minimized.

Member

iseulde commented Jun 27, 2018

I think this is ready for review. I don't know if we want to make any other tweaks to the shortcode code...

@aduth

aduth approved these changes Jun 27, 2018

Good stuff 👍

<!-- wp:gallery {"columns":3,"linkTo":"attachment"} -->
<ul class="wp-block-gallery alignnone columns-3 is-cropped">
<li class="blocks-gallery-item">
<figure><img data-id="1" /></figure>

This comment has been minimized.

@aduth

aduth Jun 27, 2018

Member

A bit unfortunate that without the editor session to request and populate these attributes, we're effectively mangling the original content and destroying the images which would otherwise be shown by running it through the parser. Not really sure we have an option here outside of allowing transforms to be asynchronous.

@gziolo

This comment has been minimized.

Member

gziolo commented Jun 27, 2018

Cool 🎉

@iseulde iseulde merged commit 2fca405 into master Jun 27, 2018

2 checks passed

codecov/project 47.25% (+0.31%) compared to 5b90b35
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@iseulde iseulde deleted the add/shortcode-package branch Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment