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

Blocks: Add shortcode block #2352

Merged
merged 2 commits into from
Aug 11, 2017
Merged

Blocks: Add shortcode block #2352

merged 2 commits into from
Aug 11, 2017

Conversation

aduth
Copy link
Member

@aduth aduth commented Aug 10, 2017

Closes #1709

This pull request seeks to implement a new Shortcode block:

Demo

Testing instructions:

Verify that you can add a shortcode block, and that it is saved into post content with no additional surrounding elements.

  1. Navigate to Gutenberg > New Post
  2. Insert a Shortcode block
  3. Add a shortcode
  4. Switch to Text view
  5. Confirm the shortcode markup appears as expected (only with block delimiter comments)
  6. Press Preview
  7. Confirm the shortcode displays as expected

@aduth aduth added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Blocks Overall functionality of blocks New Block Suggestion for a new block and removed [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). labels Aug 10, 2017
registerBlockType( 'core/shortcode', {
title: __( 'Shortcode' ),

icon: 'editor-code',
Copy link
Member

Choose a reason for hiding this comment

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

@jasmussen could we get a special icon here?

Copy link
Contributor

@bobbingwide bobbingwide Jan 14, 2018

Choose a reason for hiding this comment

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

@mtias @jasmussen Regarding a special icon. See WordPress/dashicons#261.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll put this on my list, thanks for the reminder!

@codecov
Copy link

codecov bot commented Aug 10, 2017

Codecov Report

Merging #2352 into master will increase coverage by 0.13%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2352      +/-   ##
==========================================
+ Coverage   24.69%   24.83%   +0.13%     
==========================================
  Files         152      153       +1     
  Lines        4738     4752      +14     
  Branches      799      801       +2     
==========================================
+ Hits         1170     1180      +10     
- Misses       3014     3018       +4     
  Partials      554      554
Impacted Files Coverage Δ
blocks/library/shortcode/index.js 50% <50%> (ø)
components/higher-order/with-focus-return/index.js 92.85% <0%> (-7.15%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6cf5da1...44c2ec0. Read the comment docs.

@mtias
Copy link
Member

mtias commented Aug 11, 2017

It seems we have an issue with attaching images to posts because [gallery], without specifying ids, didn't work.

@mtias
Copy link
Member

mtias commented Aug 11, 2017

image

Added a short description.

@mtias mtias merged commit 605885c into master Aug 11, 2017
@mtias mtias deleted the add/shortcode-block branch August 11, 2017 11:26
@lkraav
Copy link

lkraav commented Aug 11, 2017

Whoa nice, igniting all test procedures.

@aduth
Copy link
Member Author

aduth commented Aug 11, 2017

It seems we have an issue with attaching images to posts because [gallery], without specifying ids, didn't work.

Hmm, this is meant to be working, was part of #1967.

ceyhun pushed a commit that referenced this pull request Jun 17, 2020
…_captions

Issue/426 fix enter on captions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks New Block Suggestion for a new block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants