From 6f02cba1681764d364e078ed23d80f29a8482d10 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Tue, 30 Apr 2019 14:04:33 +0100 Subject: [PATCH 01/15] Enable quote block in editor. --- packages/block-library/src/index.native.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/block-library/src/index.native.js b/packages/block-library/src/index.native.js index c4c0449049a067..6d364aa931eb02 100644 --- a/packages/block-library/src/index.native.js +++ b/packages/block-library/src/index.native.js @@ -112,6 +112,7 @@ export const registerCoreBlocks = () => { nextpage, separator, list, + quote, ].forEach( ( { metadata, name, settings } ) => { registerBlockType( name, { ...metadata, From 8dc7c06af5657f0e077713f5b26bd3f3f31f27b3 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Tue, 30 Apr 2019 14:32:09 +0100 Subject: [PATCH 02/15] Add mobile version of quote edit. --- .../src/components/index.native.js | 1 + .../block-library/src/quote/edit.native.js | 61 +++++++++++++++++++ packages/viewport/src/index.native.js | 1 + .../src/with-viewport-match.native.js | 44 +++++++++++++ 4 files changed, 107 insertions(+) create mode 100644 packages/block-library/src/quote/edit.native.js create mode 100644 packages/viewport/src/with-viewport-match.native.js diff --git a/packages/block-editor/src/components/index.native.js b/packages/block-editor/src/components/index.native.js index c1cdb633b190b8..08953fe3e2bcc5 100644 --- a/packages/block-editor/src/components/index.native.js +++ b/packages/block-editor/src/components/index.native.js @@ -4,6 +4,7 @@ export { default as BlockEdit } from './block-edit'; export { default as BlockFormatControls } from './block-format-controls'; export * from './colors'; export * from './font-sizes'; +export { default as AlignmentToolbar } from './alignment-toolbar'; export { default as InspectorControls } from './inspector-controls'; export { default as PlainText } from './plain-text'; export { diff --git a/packages/block-library/src/quote/edit.native.js b/packages/block-library/src/quote/edit.native.js new file mode 100644 index 00000000000000..078ce61c3f787d --- /dev/null +++ b/packages/block-library/src/quote/edit.native.js @@ -0,0 +1,61 @@ +/** + * WordPress dependencies + */ +import { __ } from '@wordpress/i18n'; +import { Fragment } from '@wordpress/element'; +import { AlignmentToolbar, BlockControls, RichText } from '@wordpress/block-editor'; + +export default function QuoteEdit( { attributes, setAttributes, isSelected, mergeBlocks, onReplace } ) { + const { align, value, citation } = attributes; + return ( + + + { + setAttributes( { align: nextAlign } ); + } } + /> + + setAttributes( { + value: nextValue, + } ) + } + onMerge={ mergeBlocks } + onRemove={ ( forward ) => { + const hasEmptyCitation = ! citation || citation.length === 0; + if ( ! forward && hasEmptyCitation ) { + onReplace( [] ); + } + } } + placeholder={ + // translators: placeholder text used for the quote + __( 'Write quote…' ) + } + /> + { ( ! RichText.isEmpty( citation ) || isSelected ) && ( + setAttributes( { + citation: nextCitation, + } ) + } + placeholder={ + // translators: placeholder text used for the citation + __( 'Write citation…' ) + } + className="wp-block-quote__citation" + /> + ) } + + ); +} diff --git a/packages/viewport/src/index.native.js b/packages/viewport/src/index.native.js index e69de29bb2d1d6..184c421ada19a7 100644 --- a/packages/viewport/src/index.native.js +++ b/packages/viewport/src/index.native.js @@ -0,0 +1 @@ +export { default as withViewportMatch } from './with-viewport-match'; diff --git a/packages/viewport/src/with-viewport-match.native.js b/packages/viewport/src/with-viewport-match.native.js new file mode 100644 index 00000000000000..2589fedb5f7f9d --- /dev/null +++ b/packages/viewport/src/with-viewport-match.native.js @@ -0,0 +1,44 @@ +/** + * External dependencies + */ +import { mapValues } from 'lodash'; + +/** + * WordPress dependencies + */ +import { createHigherOrderComponent } from '@wordpress/compose'; +import { withSelect } from '@wordpress/data'; + +/** + * Higher-order component creator, creating a new component which renders with + * the given prop names, where the value passed to the underlying component is + * the result of the query assigned as the object's value. + * + * @see isViewportMatch + * + * @param {Object} queries Object of prop name to viewport query. + * + * @example + * + * ```jsx + * function MyComponent( { isMobile } ) { + * return ( + *
Currently: { isMobile ? 'Mobile' : 'Not Mobile' }
+ * ); + * } + * + * MyComponent = withViewportMatch( { isMobile: '< small' } )( MyComponent ); + * ``` + * + * @return {Function} Higher-order component. + */ +const withViewportMatch = ( queries ) => createHigherOrderComponent( + withSelect( ( ) => { + return mapValues( queries, ( query ) => { + return query === 'mobile'; + } ); + } ), + 'withViewportMatch' +); + +export default withViewportMatch; From ae65dfc253fe0abd493448bc8b55dfd1be5b7f84 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Wed, 15 May 2019 17:32:49 +0100 Subject: [PATCH 03/15] Stop reading focus from context. --- packages/block-editor/src/components/rich-text/index.native.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/rich-text/index.native.js b/packages/block-editor/src/components/rich-text/index.native.js index 007a612c948264..e3bf5691cef04b 100644 --- a/packages/block-editor/src/components/rich-text/index.native.js +++ b/packages/block-editor/src/components/rich-text/index.native.js @@ -813,10 +813,9 @@ RichText.defaultProps = { const RichTextContainer = compose( [ withInstanceId, - withBlockEditContext( ( { clientId, onFocus, isSelected, onCaretVerticalPositionChange }, ownProps ) => { + withBlockEditContext( ( { clientId, onFocus, onCaretVerticalPositionChange }, ownProps ) => { return { clientId, - isSelected, onFocus: onFocus || ownProps.onFocus, onCaretVerticalPositionChange, }; From 3bc05ac749a9466710c8c9a6b3f9f264a6379f55 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Wed, 22 May 2019 12:53:01 +0100 Subject: [PATCH 04/15] Make default tag to be div like on the web. --- packages/block-editor/src/components/rich-text/index.native.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/block-editor/src/components/rich-text/index.native.js b/packages/block-editor/src/components/rich-text/index.native.js index e3bf5691cef04b..5fe7dd221c42e9 100644 --- a/packages/block-editor/src/components/rich-text/index.native.js +++ b/packages/block-editor/src/components/rich-text/index.native.js @@ -809,6 +809,7 @@ export class RichText extends Component { RichText.defaultProps = { formattingControls: [ 'bold', 'italic', 'link', 'strikethrough' ], format: 'string', + tagName: 'div', }; const RichTextContainer = compose( [ From 65072300a9566a5bfc2902d334c8850f50be60e0 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Wed, 22 May 2019 13:07:16 +0100 Subject: [PATCH 05/15] Implement block quote component in web and RN. --- .../block-library/src/quote/blockquote.js | 1 + .../src/quote/blockquote.native.js | 19 ++++++ packages/block-library/src/quote/edit.js | 8 ++- .../block-library/src/quote/edit.native.js | 61 ------------------- .../block-library/src/quote/style.native.scss | 17 ++++++ 5 files changed, 43 insertions(+), 63 deletions(-) create mode 100644 packages/block-library/src/quote/blockquote.js create mode 100644 packages/block-library/src/quote/blockquote.native.js delete mode 100644 packages/block-library/src/quote/edit.native.js create mode 100644 packages/block-library/src/quote/style.native.scss diff --git a/packages/block-library/src/quote/blockquote.js b/packages/block-library/src/quote/blockquote.js new file mode 100644 index 00000000000000..813fe529b25278 --- /dev/null +++ b/packages/block-library/src/quote/blockquote.js @@ -0,0 +1 @@ +export const Blockquote = 'blockquote'; diff --git a/packages/block-library/src/quote/blockquote.native.js b/packages/block-library/src/quote/blockquote.native.js new file mode 100644 index 00000000000000..b9ac48d3fe1b7c --- /dev/null +++ b/packages/block-library/src/quote/blockquote.native.js @@ -0,0 +1,19 @@ +/** + * External dependencies + */ +import { View } from 'react-native'; +/** + * Internal dependencies + */ +import styles from './style'; + +export const Blockquote = ( props ) => { + return ( + + + + { props.children } + + + ); +}; diff --git a/packages/block-library/src/quote/edit.js b/packages/block-library/src/quote/edit.js index 9c01310a3ade03..170eada57380be 100644 --- a/packages/block-library/src/quote/edit.js +++ b/packages/block-library/src/quote/edit.js @@ -3,6 +3,10 @@ */ import { __ } from '@wordpress/i18n'; import { AlignmentToolbar, BlockControls, RichText } from '@wordpress/block-editor'; +/** + * Internal dependencies + */ +import { Blockquote } from './blockquote'; export default function QuoteEdit( { attributes, setAttributes, isSelected, mergeBlocks, onReplace, className } ) { const { align, value, citation } = attributes; @@ -16,7 +20,7 @@ export default function QuoteEdit( { attributes, setAttributes, isSelected, merg } } /> -
+
) } -
+
); } diff --git a/packages/block-library/src/quote/edit.native.js b/packages/block-library/src/quote/edit.native.js deleted file mode 100644 index 078ce61c3f787d..00000000000000 --- a/packages/block-library/src/quote/edit.native.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - * WordPress dependencies - */ -import { __ } from '@wordpress/i18n'; -import { Fragment } from '@wordpress/element'; -import { AlignmentToolbar, BlockControls, RichText } from '@wordpress/block-editor'; - -export default function QuoteEdit( { attributes, setAttributes, isSelected, mergeBlocks, onReplace } ) { - const { align, value, citation } = attributes; - return ( - - - { - setAttributes( { align: nextAlign } ); - } } - /> - - setAttributes( { - value: nextValue, - } ) - } - onMerge={ mergeBlocks } - onRemove={ ( forward ) => { - const hasEmptyCitation = ! citation || citation.length === 0; - if ( ! forward && hasEmptyCitation ) { - onReplace( [] ); - } - } } - placeholder={ - // translators: placeholder text used for the quote - __( 'Write quote…' ) - } - /> - { ( ! RichText.isEmpty( citation ) || isSelected ) && ( - setAttributes( { - citation: nextCitation, - } ) - } - placeholder={ - // translators: placeholder text used for the citation - __( 'Write citation…' ) - } - className="wp-block-quote__citation" - /> - ) } - - ); -} diff --git a/packages/block-library/src/quote/style.native.scss b/packages/block-library/src/quote/style.native.scss new file mode 100644 index 00000000000000..06e3f0adb91540 --- /dev/null +++ b/packages/block-library/src/quote/style.native.scss @@ -0,0 +1,17 @@ +.wpBlockQuoteContainer { + flex: 1; + flex-direction: row; + align-items: stretch; +} + +.wpBlockQuoteMargin { + width: 2; + background-color: $blue-dark-900; +} + +.wpBlockQuoteComponents { + flex: 1; + flex-direction: column; + justify-content: flex-start; + align-items: stretch; +} From 4d1de7992073b7d144aa1a8a422998e3b37e1cfc Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Wed, 22 May 2019 14:03:21 +0100 Subject: [PATCH 06/15] Simplify native block quote component. --- .../src/quote/blockquote.native.js | 7 ++---- .../block-library/src/quote/style.native.scss | 22 +++++-------------- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/packages/block-library/src/quote/blockquote.native.js b/packages/block-library/src/quote/blockquote.native.js index b9ac48d3fe1b7c..d57a4fd5bfa981 100644 --- a/packages/block-library/src/quote/blockquote.native.js +++ b/packages/block-library/src/quote/blockquote.native.js @@ -9,11 +9,8 @@ import styles from './style'; export const Blockquote = ( props ) => { return ( - - - - { props.children } - + + { props.children } ); }; diff --git a/packages/block-library/src/quote/style.native.scss b/packages/block-library/src/quote/style.native.scss index 06e3f0adb91540..02d315e1560b6b 100644 --- a/packages/block-library/src/quote/style.native.scss +++ b/packages/block-library/src/quote/style.native.scss @@ -1,17 +1,7 @@ -.wpBlockQuoteContainer { - flex: 1; - flex-direction: row; - align-items: stretch; -} - -.wpBlockQuoteMargin { - width: 2; - background-color: $blue-dark-900; -} - -.wpBlockQuoteComponents { - flex: 1; - flex-direction: column; - justify-content: flex-start; - align-items: stretch; +.wpBlockQuote { + border-left-width: 4px; + border-left-color: $black; + border-left-style: solid; + padding-left: 8px; + margin-left: 8px; } From f5ebb7646343801311f852be7f4bb3cd83fb027d Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Wed, 22 May 2019 14:42:45 +0100 Subject: [PATCH 07/15] Implement empty Alignment toolbar. --- .../alignment-toolbar/index.native.js | 5 +++ .../src/with-viewport-match.native.js | 44 ------------------- 2 files changed, 5 insertions(+), 44 deletions(-) create mode 100644 packages/block-editor/src/components/alignment-toolbar/index.native.js delete mode 100644 packages/viewport/src/with-viewport-match.native.js diff --git a/packages/block-editor/src/components/alignment-toolbar/index.native.js b/packages/block-editor/src/components/alignment-toolbar/index.native.js new file mode 100644 index 00000000000000..fdd842d0375141 --- /dev/null +++ b/packages/block-editor/src/components/alignment-toolbar/index.native.js @@ -0,0 +1,5 @@ +const AlignmentToolbar = () => { + return null; +}; + +export default AlignmentToolbar; diff --git a/packages/viewport/src/with-viewport-match.native.js b/packages/viewport/src/with-viewport-match.native.js deleted file mode 100644 index 2589fedb5f7f9d..00000000000000 --- a/packages/viewport/src/with-viewport-match.native.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * External dependencies - */ -import { mapValues } from 'lodash'; - -/** - * WordPress dependencies - */ -import { createHigherOrderComponent } from '@wordpress/compose'; -import { withSelect } from '@wordpress/data'; - -/** - * Higher-order component creator, creating a new component which renders with - * the given prop names, where the value passed to the underlying component is - * the result of the query assigned as the object's value. - * - * @see isViewportMatch - * - * @param {Object} queries Object of prop name to viewport query. - * - * @example - * - * ```jsx - * function MyComponent( { isMobile } ) { - * return ( - *
Currently: { isMobile ? 'Mobile' : 'Not Mobile' }
- * ); - * } - * - * MyComponent = withViewportMatch( { isMobile: '< small' } )( MyComponent ); - * ``` - * - * @return {Function} Higher-order component. - */ -const withViewportMatch = ( queries ) => createHigherOrderComponent( - withSelect( ( ) => { - return mapValues( queries, ( query ) => { - return query === 'mobile'; - } ); - } ), - 'withViewportMatch' -); - -export default withViewportMatch; From 03be5add1124c2e7e740b5457a27ff7ede405a4f Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Thu, 23 May 2019 22:56:30 +0100 Subject: [PATCH 08/15] Fix style import. --- packages/block-library/src/quote/blockquote.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/quote/blockquote.native.js b/packages/block-library/src/quote/blockquote.native.js index d57a4fd5bfa981..aa122d6c4dd905 100644 --- a/packages/block-library/src/quote/blockquote.native.js +++ b/packages/block-library/src/quote/blockquote.native.js @@ -5,7 +5,7 @@ import { View } from 'react-native'; /** * Internal dependencies */ -import styles from './style'; +import styles from './style.scss'; export const Blockquote = ( props ) => { return ( From f28f0131de4467cfa45f0d49f4080d11fe22bd34 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Thu, 23 May 2019 22:56:57 +0100 Subject: [PATCH 09/15] Remove import --- packages/viewport/src/index.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/viewport/src/index.native.js b/packages/viewport/src/index.native.js index 184c421ada19a7..8b137891791fe9 100644 --- a/packages/viewport/src/index.native.js +++ b/packages/viewport/src/index.native.js @@ -1 +1 @@ -export { default as withViewportMatch } from './with-viewport-match'; + From a1a16f4f859fd9aea6d3306302561ed2c475888b Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Fri, 24 May 2019 10:04:58 +0100 Subject: [PATCH 10/15] Rename blockquote to BlockQuotation. --- packages/block-library/src/quote/blockquotation.js | 1 + .../{blockquote.native.js => blockquotation.native.js} | 2 +- packages/block-library/src/quote/blockquote.js | 1 - packages/block-library/src/quote/edit.js | 6 +++--- 4 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 packages/block-library/src/quote/blockquotation.js rename packages/block-library/src/quote/{blockquote.native.js => blockquotation.native.js} (83%) delete mode 100644 packages/block-library/src/quote/blockquote.js diff --git a/packages/block-library/src/quote/blockquotation.js b/packages/block-library/src/quote/blockquotation.js new file mode 100644 index 00000000000000..f1ccb4968c84e2 --- /dev/null +++ b/packages/block-library/src/quote/blockquotation.js @@ -0,0 +1 @@ +export const BlockQuotation = 'blockquote'; diff --git a/packages/block-library/src/quote/blockquote.native.js b/packages/block-library/src/quote/blockquotation.native.js similarity index 83% rename from packages/block-library/src/quote/blockquote.native.js rename to packages/block-library/src/quote/blockquotation.native.js index aa122d6c4dd905..eea86435b5ebcd 100644 --- a/packages/block-library/src/quote/blockquote.native.js +++ b/packages/block-library/src/quote/blockquotation.native.js @@ -7,7 +7,7 @@ import { View } from 'react-native'; */ import styles from './style.scss'; -export const Blockquote = ( props ) => { +export const BlockQuotation = ( props ) => { return ( { props.children } diff --git a/packages/block-library/src/quote/blockquote.js b/packages/block-library/src/quote/blockquote.js deleted file mode 100644 index 813fe529b25278..00000000000000 --- a/packages/block-library/src/quote/blockquote.js +++ /dev/null @@ -1 +0,0 @@ -export const Blockquote = 'blockquote'; diff --git a/packages/block-library/src/quote/edit.js b/packages/block-library/src/quote/edit.js index 170eada57380be..0e76e9a05c230b 100644 --- a/packages/block-library/src/quote/edit.js +++ b/packages/block-library/src/quote/edit.js @@ -6,7 +6,7 @@ import { AlignmentToolbar, BlockControls, RichText } from '@wordpress/block-edit /** * Internal dependencies */ -import { Blockquote } from './blockquote'; +import { BlockQuotation } from './blockquotation'; export default function QuoteEdit( { attributes, setAttributes, isSelected, mergeBlocks, onReplace, className } ) { const { align, value, citation } = attributes; @@ -20,7 +20,7 @@ export default function QuoteEdit( { attributes, setAttributes, isSelected, merg } } /> -
+ ) } -
+ ); } From 08b232792d1832b6f448ea5bac3cc36af3d27144 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Fri, 24 May 2019 10:21:43 +0100 Subject: [PATCH 11/15] Move BlockQuotation to be a primate component. --- packages/block-library/src/quote/edit.js | 5 +---- .../src/primitives/block-quotation/README.md | 15 +++++++++++++++ .../src/primitives/block-quotation/index.js} | 0 .../primitives/block-quotation/index.native.js} | 0 .../primitives/block-quotation}/style.native.scss | 0 .../src/primitives/block-quotation}/style.scss | 0 packages/components/src/primitives/index.js | 1 + 7 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 packages/components/src/primitives/block-quotation/README.md rename packages/{block-library/src/quote/blockquotation.js => components/src/primitives/block-quotation/index.js} (100%) rename packages/{block-library/src/quote/blockquotation.native.js => components/src/primitives/block-quotation/index.native.js} (100%) rename packages/{block-library/src/quote => components/src/primitives/block-quotation}/style.native.scss (100%) rename packages/{block-library/src/quote => components/src/primitives/block-quotation}/style.scss (100%) diff --git a/packages/block-library/src/quote/edit.js b/packages/block-library/src/quote/edit.js index 0e76e9a05c230b..8955b78588bc3f 100644 --- a/packages/block-library/src/quote/edit.js +++ b/packages/block-library/src/quote/edit.js @@ -3,10 +3,7 @@ */ import { __ } from '@wordpress/i18n'; import { AlignmentToolbar, BlockControls, RichText } from '@wordpress/block-editor'; -/** - * Internal dependencies - */ -import { BlockQuotation } from './blockquotation'; +import { BlockQuotation } from '@wordpress/components'; export default function QuoteEdit( { attributes, setAttributes, isSelected, mergeBlocks, onReplace, className } ) { const { align, value, citation } = attributes; diff --git a/packages/components/src/primitives/block-quotation/README.md b/packages/components/src/primitives/block-quotation/README.md new file mode 100644 index 00000000000000..83d9f9057609ed --- /dev/null +++ b/packages/components/src/primitives/block-quotation/README.md @@ -0,0 +1,15 @@ +# HorizontalRule + +A drop-in replacement for the HTML [blockquote](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote) element that works both on the web and in the mobile apps. It indicates that the enclosed text is an extended quotation. + +## Usage + +```jsx +import { BlockQuotation } from '@wordpress/components'; + +const MyBlockQuotation = () => ( + + ...Quote content + +); +``` diff --git a/packages/block-library/src/quote/blockquotation.js b/packages/components/src/primitives/block-quotation/index.js similarity index 100% rename from packages/block-library/src/quote/blockquotation.js rename to packages/components/src/primitives/block-quotation/index.js diff --git a/packages/block-library/src/quote/blockquotation.native.js b/packages/components/src/primitives/block-quotation/index.native.js similarity index 100% rename from packages/block-library/src/quote/blockquotation.native.js rename to packages/components/src/primitives/block-quotation/index.native.js diff --git a/packages/block-library/src/quote/style.native.scss b/packages/components/src/primitives/block-quotation/style.native.scss similarity index 100% rename from packages/block-library/src/quote/style.native.scss rename to packages/components/src/primitives/block-quotation/style.native.scss diff --git a/packages/block-library/src/quote/style.scss b/packages/components/src/primitives/block-quotation/style.scss similarity index 100% rename from packages/block-library/src/quote/style.scss rename to packages/components/src/primitives/block-quotation/style.scss diff --git a/packages/components/src/primitives/index.js b/packages/components/src/primitives/index.js index 83d15090083940..ba5d2f6f2ab084 100644 --- a/packages/components/src/primitives/index.js +++ b/packages/components/src/primitives/index.js @@ -1,2 +1,3 @@ export * from './svg'; export * from './horizontal-rule'; +export * from './block-quotation'; From d8b77bafc6f9cb2410d00c86c67ad67c378e649d Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Fri, 24 May 2019 10:22:59 +0100 Subject: [PATCH 12/15] Add documentation reference for BlockQuotation. --- docs/manifest-devhub.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/manifest-devhub.json b/docs/manifest-devhub.json index dfee8a25831c60..bfdf2e267fef62 100644 --- a/docs/manifest-devhub.json +++ b/docs/manifest-devhub.json @@ -833,6 +833,12 @@ "markdown_source": "../packages/components/src/popover/README.md", "parent": "components" }, + { + "title": "BlockQuotation", + "slug": "block-quotation", + "markdown_source": "../packages/components/src/primitives/block-quotation/README.md", + "parent": "components" + }, { "title": "HorizontalRule", "slug": "horizontal-rule", From 1f8a12a50bf03693eef3e5a3030c044933db81d2 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Fri, 24 May 2019 10:30:04 +0100 Subject: [PATCH 13/15] Add BlockQuotation info to the changeling. --- packages/components/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 729769e7a872c3..d4e202b99b93e7 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.5.0 + +### New Feature + +- Add new `BlockQuotation` block to the primitives folder to support blockquote in a multiplatform way. [#15482](https://github.com/WordPress/gutenberg/pull/15482). + ## 7.4.0 (2019-05-21) ### New Feature From 1f2e231820df71a2fda8d1c15acd8c36c4675224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Est=C3=AAv=C3=A3o?= Date: Fri, 24 May 2019 10:36:34 +0100 Subject: [PATCH 14/15] Update packages/components/CHANGELOG.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Grzegorz (Greg) Ziółkowski --- packages/components/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index d4e202b99b93e7..50165750d8a058 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -1,4 +1,4 @@ -## 7.5.0 +## Master ### New Feature From 889116f66095aca41e203f6d44690082c5058b69 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Fri, 24 May 2019 11:41:34 +0100 Subject: [PATCH 15/15] Restore style file. --- packages/block-library/src/quote/style.scss | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 packages/block-library/src/quote/style.scss diff --git a/packages/block-library/src/quote/style.scss b/packages/block-library/src/quote/style.scss new file mode 100644 index 00000000000000..c1206d68958f7b --- /dev/null +++ b/packages/block-library/src/quote/style.scss @@ -0,0 +1,19 @@ +.wp-block-quote { + &.is-style-large, + &.is-large { + margin: 0 0 16px; + padding: 0 1em; + + p { + font-size: 24px; + font-style: italic; + line-height: 1.6; + } + + cite, + footer { + font-size: 18px; + text-align: right; + } + } +}