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

Remove the Large style option from the quote block #37580

Merged
merged 5 commits into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/block-library/src/quote/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
"label": "Default",
"isDefault": true
},
{ "name": "plain", "label": "Plain" },
{ "name": "large", "label": "Large" }
{ "name": "plain", "label": "Plain" }
],
"editorStyle": "wp-block-quote-editor",
"style": "wp-block-quote"
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/quote/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const settings = {
value:
'<p>' + __( 'In quoting others, we cite ourselves.' ) + '</p>',
citation: 'Julio Cortázar',
className: 'is-style-large',
},
},
transforms,
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/quote/style.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.wp-block-quote {
overflow-wrap: break-word; // Break long strings of text without spaces so they don't overflow the block.

// .is-style-large and .is-large are kept for backwards compatibility.
&.is-style-large,
&.is-large {
margin-bottom: 1em;
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/quote/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
border: none;
padding-left: 0;
}

// .is-style-large and .is-large are kept for backwards compatibility.
&.is-style-plain,
&.is-style-large,
&.is-large {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,24 @@ describe( 'adding blocks', () => {
await createNewPost();
} );

it( 'Should switch to the large style of the quote block', async () => {
it( 'Should switch to the plain style of the quote block', async () => {
// Inserting a quote block
await insertBlock( 'Quote' );
await page.keyboard.type( 'Quote content' );

await clickBlockToolbarButton( 'Quote' );

const largeStyleButton = await page.waitForXPath(
'//*[@role="menuitem"][contains(., "Large")]'
const plainStyleButton = await page.waitForXPath(
'//*[@role="menuitem"][contains(., "Plain")]'
);
await largeStyleButton.click();
await plainStyleButton.click();

// Check the content
const content = await getEditedPostContent();
expect( content ).toMatchSnapshot();
expect( content ).toMatchInlineSnapshot( `
"<!-- wp:quote {\\"className\\":\\"is-style-plain\\"} -->
<blockquote class=\\"wp-block-quote is-style-plain\\"><p>Quote content</p></blockquote>
<!-- /wp:quote -->"
` );
} );
} );