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

Add shortcode package #7581

Merged
merged 2 commits into from Jun 27, 2018

Conversation

@ellatrix
Copy link
Member

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.

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

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

@ellatrix

This comment has been minimized.

Copy link
Member Author

commented Jun 27, 2018

Still making some doc block tweaks.

@ellatrix ellatrix force-pushed the add/shortcode-package branch from c3b53f6 to 452cdab Jun 27, 2018

@ellatrix

This comment has been minimized.

Copy link
Member Author

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
Copy link
Member

left a comment

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.

Copy link
@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.

@ellatrix ellatrix force-pushed the add/shortcode-package branch from 452cdab to 83fb890 Jun 27, 2018

@gziolo

This comment has been minimized.

Copy link
Member

commented Jun 27, 2018

Cool 🎉

@ellatrix ellatrix 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

@ellatrix ellatrix 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
Projects
None yet
3 participants
You can’t perform that action at this time.