Opened 5 months ago
Last modified 8 days ago
#64068 assigned enhancement
Replace Pullquote block in theme patterns
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Bundled Theme | Keywords: | needs-design-feedback has-patch |
| Focuses: | ui, template | Cc: |
Description
The Pullquote block will be deprecated soon. It would be good to replace its usage with the Quote block across all themes, templates, patterns, and so on.
Check this GitHub issue for more details: https://github.com/WordPress/gutenberg/issues/11610
Attachments (6)
Change History (25)
#2
@
5 months ago
@sabernhardt Thanks for summarizing the usage of the Pullquote block. I would like to work on this. Could you please assign this to me?
#4
@
4 months ago
- Keywords needs-design-feedback added
@sabernhardt Since the design of Pullquote and Quote Block is not same, new patterns will look above attachments after replacing the Pullquote block with the Quote block. Is these designs look good?
#5
@
4 months ago
The 'What We Do' pattern fits headings and paragraphs instead of blockquote and cite elements. I would add the content as H3 headings and paragraphs inside either Group or Cover blocks. The Cover block gives the extra height, but then at least the block with the light background needs the dark text color assigned to the heading and paragraph (I would add text colors to all of the inner blocks for consistency). Also, the screen captures on #51099 show that Pullquote blocks were not centered five years ago.
Blocks in the patterns should be compatible with older WordPress versions—back to 5.5—to avoid invalid content errors for those who update only the theme. Then the Quote block would not have a nested Paragraph block, which began in 6.1.
For Twenty Ten's Quote block, I want to suggest adding is-style-large is-style-plain to the additional classes. The Large style is deprecated now, so the theme's blocks.css and editor-blocks.css stylesheets would need to define the CSS:
.wp-block-quote.is-style-large p,
.wp-block-quote.is-large p {
font-size: 1.5em;
line-height: 1.3;
}
The values above blend two styles, and anyone using the latest WordPress can change the paragraph font size as desired. (The solid-color Pullquote currently sets the paragraph size at 2em with 1.3 line-height; the Large Quote style set the paragraph to 1.5em with 1.6 line-height in WordPress 5.6 and 5.8.)
Then again, the Pullquote version of Twenty Ten's pattern was not good with WordPress 5.5 (black text against the black Cover overlay).
@
4 months ago
Twenty Nineteen's What We Do pattern, using Heading and Paragraph blocks inside Cover blocks
@
4 months ago
Twenty Ten's Highlighted Quote pattern, using a Quote block with is-style-large is-style-plain classes
This ticket was mentioned in PR #10202 on WordPress/wordpress-develop by @utsavladani.
4 months ago
#6
- Keywords has-patch added; needs-patch removed
## Summary
The Pullquote block will be deprecated soon. Check this GitHub issue for more details: https://github.com/WordPress/gutenberg/issues/11610
Hence, replacing Pullquote block across all themes with other similar blocks. This PR is changing following items:
What We Dopattern of the twenty nineteen themeHighlighted Quotepattern of the twenty ten theme
Trac ticket: https://core.trac.wordpress.org/ticket/64068
### Screenshots
| Theme | Pattern |
|---|---|
What We Do pattern of the twenty nineteen theme | |
#7
@
4 months ago
@sabernhardt Thanks for your help and guidance. I made changes as per your suggestion and also fixed the black text against the black cover overlay issue.
@wildworks commented on PR #10202:
4 months ago
#8
@sabernhardt, We're almost ready to deprecate the Pullquote block, and I expect this Gutenberg PR to be merged soon.
https://github.com/WordPress/gutenberg/pull/72028
If we deprecate the Pullquote block in the 6.9 release, would that have any impact on default themes? Would it be better to postpone the deprecation until 7.0?
Just to be clear, "deprecating a block" simply means that you can no longer insert the block; it doesn't mean that the block will break in your content or that styling will be broken on the front end.
@sabernhardt commented on PR #10202:
4 months ago
#9
Would it be better to postpone the deprecation until 7.0?
It is quite late in the 6.9 cycle to deprecate a block, so delaying that should be good. The themes' patterns could be changed first, and then we can test all the default themes with releases of the Gutenberg plugin instead of applying pull requests. (Authors of other themes could need to test the deprecation with a plugin release too.)
So far, the only problem I know to resolve in default themes is these two patterns.
The themes' CSS should remain for anyone who already used the block (and could copy an existing Pullquote to paste it into a new post or widget). But when the Pullquote is deprecated, we would not need to edit the CSS further for several outstanding Trac tickets.
@wildworks commented on PR #10202:
4 months ago
#10
@sabernhardt Thanks for the reply.
Well, just to be safe, let's NOT deprecate the Pullquote block in the 6.9 release.
@ramonopoly commented on PR #10202:
4 months ago
#11
The themes' patterns could be changed first, and then we can test all the default themes with releases of the Gutenberg plugin instead of applying pull requests.
Sounds like a good idea to get these changes in first. Thanks, folks!
Just a question - how close should the replacements be to the former designs?
Here's what I'm seeing
### 2019
| Trunk | This branch |
|---|---|
| | |
### 2010
| Trunk | This branch |
|---|---|
| | |
I'm thinking the italics in 2019 and extra padding in 2010 could align things a little better?
I don't have strong opinions on this to be clear, just asking 😄
@sabernhardt commented on PR #10202:
4 months ago
#12
how close should the replacements be to the former designs?
I'm thinking the italics in 2019 and extra padding in 2010 could align things a little better?
For Twenty Nineteen, the current appearance of the Pullquote does not match images @kjellr shared on Trac 51099. The editor screenshots show all text in the serif (paragraph) font, without italics. The front end italicized the larger text and used a sans-serif for the smaller text. Since then, the first Pullquote became centered and the Cover block assigned white text with a light background. I think this is an opportunity to use more appropriate markup.
However, the Cover blocks' standard min-height of 430 is quite high and probably can be about half that (220 pixels equals 10rem).
// Section 1: Redefine brands. - '', - '<div class="wp-block-cover alignwide has-primary-background-color has-background-dim"><div class="wp-block-cover__inner-container">', + '', + '<div class="wp-block-cover alignwide has-primary-background-color has-background-dim" style="min-height:220px"><div class="wp-block-cover__inner-container">',
Twenty Ten's Quote block should have more padding. The theme stylesheet defines blockquote {padding:0 3em} and `block-library/theme.css` overrides the left side with 1em when the block combines the classes for both Large and Plain styles (is-style-large is-style-plain). The Pullquote has the 0 3em padding and a max-width of 60%, inside a Cover block with 1em padding, which makes the text elements only 364.8 pixels wide in the 640-pixel post content area.
Considering that the Large style was deprecated in 6.0, the classes could be changed to is-style-plain highlighted-quote. That would keep the Plain style, and the padding would be even with 3em on both sides. With a special highlighted-quote class, the CSS could define the exact styles desired for the pattern. Then the font size could increase to 2em:
.wp-block-quote.highlighted-quote p {
font-size: 2em;
line-height: 1.3;
}
@ramonopoly commented on PR #10202:
4 months ago
#13
Thanks for the explainer @sabernhardt
For Twenty Nineteen, the current appearance of the Pullquote does not match images @kjellr shared on Trac 51099.
Thanks for leading me there. 🙇🏻
@utsavladani commented on PR #10202:
4 months ago
#14
Thanks for the detailed explanation. I made changes accordingly.
@utsavladani commented on PR #10202:
4 months ago
#15
@sabernhardt Let me know if this requires further changes.
@wildworks commented on PR #10202:
3 months ago
#17
Update: We just officially deprecated the Pullquote block: https://github.com/WordPress/gutenberg/pull/73228
#18
@
2 months ago
@sabernhardt The Pullquote block is officially deprecated from the Gutenberg now. Let me know if this requires further changes.
#19
@
13 days ago
- Summary changed from Replace Pullquote block with Quote block as Pullquote will be deprecated soon to Replace Pullquote block in theme patterns
GB75122 restored the Pullquote block, but I would like to replace it in Twenty Nineteen's pattern anyway.
It might be worth changing Twenty Ten's pattern too.
I found two block patterns with Pullquotes:
In Twenty Twenty-One's excerpt template part for the Quote post format, it checks for a Quote block first and then a Pullquote block. I think that can remain unchanged.