Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#48130 closed defect (bug) (fixed)

Default Theme pages content should use blocks

Reported by: garrett-eclipse's profile garrett-eclipse Owned by: ocean90's profile ocean90
Milestone: 5.3 Priority: normal
Severity: normal Version: 4.7
Component: Themes Keywords: has-patch commit
Focuses: administration Cc:

Description

Hello,

Testing with Twenty Twenty you get the home, about, contact and blog pages setup for you as they're specified in the starter content here;
https://github.com/WordPress/twentytwenty/blob/a2b10f33e787541bff8eb25a9fa86b752f15de91/inc/starter-content.php#L36-L41

Going to edit these pages I found they're all using the Classic Block instead of paragraph blocks for their starter content. The starter content for those pages is in core here;
https://github.com/WordPress/wordpress-develop/blob/d88473fa2fdebeb592f3032fe1dfc68ca9d6d4d5/src/wp-includes/theme.php#L2187-L2216

It would be nice to update to use blocks here similar to how the Sample Page and Privacy Policy page are setup.

Cheers

Attachments (3)

Screen Shot 2019-09-24 at 9.40.01 AM.png (45.8 KB) - added by garrett-eclipse 5 years ago.
About showing it's default content is editable via Classic block instead of normal blocks
48130.patch (2.8 KB) - added by Clorith 5 years ago.
Screen Shot 2019-10-10 at 10.22.44 AM.png (93.3 KB) - added by garrett-eclipse 5 years ago.
Applying the patch we're finding proper blocks on the starter content

Download all attachments as: .zip

Change History (9)

@garrett-eclipse
5 years ago

About showing it's default content is editable via Classic block instead of normal blocks

This ticket was mentioned in Slack in #core-editor by clorith. View the logs.


5 years ago

@Clorith
5 years ago

#2 @Clorith
5 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 5.4
  • Version set to 4.7

I just stumbled onto this as well wen testing Twenty Twenty, and found it a bit disheartening that we're fronting the new block editor so well with it, and then we get presented with a classic block.

We're currently just days away from WordPress 5.3-RC1, so it's kind of late to start touching starter content, as I would classify this as an enhancement (improving on starter content) than a bug.

That said, Twenty Twenty can prepare for this (it already does for the front page, see https://github.com/WordPress/twentytwenty/blob/d925696fbe5631817c4a56854922f65aebec3fff/inc/starter-content.php).

With that in mind, I'm going to milestone this for 5.4, but will drop a note about it pre-RC for 5.3 in case we can shimmy it in there.

48130.patch adds the paragraph wrapper around the already existing strings, unlike #45151 (which is somewhat related), there's no need to leave the HTML comments etc in the translation string, as the strings in question have always been one off sentences.

This ticket was mentioned in Slack in #core by clorith. View the logs.


5 years ago

@garrett-eclipse
5 years ago

Applying the patch we're finding proper blocks on the starter content

#4 @garrett-eclipse
5 years ago

  • Keywords commit added

Thanks @Clorith I agree having this in 5.3 would be ideal but do understand we might be too late for that ship.

Testing this applies and works nicely for the starter content enabling as proper blocks. See screen for success there.

My only concern was users still on the classic editor will get markup but as this follows what we did in #45151 I feel this will suffice as is and we can look into stripping that markup for the classic editor in another ticket so created #48279.

#5 @ocean90
5 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 46457:

Themes: Convert core-provided starter content to block content.

Props Clorith.
Fixes #48130.

#6 @ocean90
5 years ago

  • Milestone changed from 5.4 to 5.3
Note: See TracTickets for help on using tickets.