-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add aside wrapper to pullquote (#9599)
* Add aside wrapper to pullquote This is an alternative, per discussion, to #8821. It adds some semantic value to the pullquote, indicating that it is intended to be separate content. Note that we should consider doing a few other enhancements to the pullquote, if we intend to keep it: - Let's add a transformation from Quote to Pullquote and back - For some reason, the alignment values are not output in the markup in the editor, only on the frontend, which means the max-width we apply does not affect the content. I could use help with both of these. I also imagine the deprecation handler needs a little extra now. @gziolo do you have bandwidth? * Figure. * Fix for frontend. * Added deprecation artifacts * Updated test fixtures
- Loading branch information
Showing
12 changed files
with
92 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 26 additions & 24 deletions
50
packages/block-library/src/pullquote/test/__snapshots__/index.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,39 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`core/pullquote block edit matches snapshot 1`] = ` | ||
<blockquote | ||
<figure | ||
class="wp-block-pullquote" | ||
> | ||
<div | ||
class="block-library-pullquote__content editor-rich-text" | ||
> | ||
<div> | ||
<blockquote> | ||
<div | ||
class="block-library-pullquote__content editor-rich-text" | ||
> | ||
<div> | ||
<div | ||
class="components-autocomplete" | ||
> | ||
<div> | ||
<div | ||
aria-autocomplete="list" | ||
aria-expanded="false" | ||
aria-label="Write quote…" | ||
aria-multiline="true" | ||
class="editor-rich-text__tinymce" | ||
contenteditable="true" | ||
data-is-placeholder-visible="true" | ||
role="textbox" | ||
/> | ||
<div | ||
class="editor-rich-text__tinymce" | ||
class="components-autocomplete" | ||
> | ||
<p> | ||
Write quote… | ||
</p> | ||
<div | ||
aria-autocomplete="list" | ||
aria-expanded="false" | ||
aria-label="Write quote…" | ||
aria-multiline="true" | ||
class="editor-rich-text__tinymce" | ||
contenteditable="true" | ||
data-is-placeholder-visible="true" | ||
role="textbox" | ||
/> | ||
<div | ||
class="editor-rich-text__tinymce" | ||
> | ||
<p> | ||
Write quote… | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</blockquote> | ||
</blockquote> | ||
</figure> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<!-- wp:core/pullquote --> | ||
<blockquote class="wp-block-pullquote"> | ||
<p>Testing pullquote block...</p><cite>...with a caption</cite> | ||
</blockquote> | ||
<figure class="wp-block-pullquote"> | ||
<blockquote> | ||
<p>Testing pullquote block...</p><cite>...with a caption</cite> | ||
</blockquote> | ||
</figure> | ||
<!-- /wp:core/pullquote --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/integration/full-content/fixtures/core__pullquote.serialized.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<!-- wp:pullquote --> | ||
<blockquote class="wp-block-pullquote"><p>Testing pullquote block...</p><cite>...with a caption</cite></blockquote> | ||
<figure class="wp-block-pullquote"><blockquote><p>Testing pullquote block...</p><cite>...with a caption</cite></blockquote></figure> | ||
<!-- /wp:pullquote --> |
12 changes: 7 additions & 5 deletions
12
test/integration/full-content/fixtures/core__pullquote__multi-paragraph.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<!-- wp:core/pullquote --> | ||
<blockquote class="wp-block-pullquote"> | ||
<p>Paragraph <strong>one</strong></p> | ||
<p>Paragraph two</p> | ||
<cite>by whomever</cite> | ||
</blockquote> | ||
<figure class="wp-block-pullquote"> | ||
<blockquote> | ||
<p>Paragraph <strong>one</strong></p> | ||
<p>Paragraph two</p> | ||
<cite>by whomever</cite> | ||
</blockquote> | ||
</figure> | ||
<!-- /wp:core/pullquote --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/integration/full-content/fixtures/core__pullquote__multi-paragraph.serialized.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<!-- wp:pullquote --> | ||
<blockquote class="wp-block-pullquote"><p>Paragraph <strong>one</strong></p><p>Paragraph two</p><cite>by whomever</cite></blockquote> | ||
<figure class="wp-block-pullquote"><blockquote><p>Paragraph <strong>one</strong></p><p>Paragraph two</p><cite>by whomever</cite></blockquote></figure> | ||
<!-- /wp:pullquote --> |