This post summarizes the latest bi-weekly Block Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience.-Based Theme meeting, held in the #themereview Slack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/., on Wednesday, 1 April 2020, 16:00 UTC. These meetings coordinate collaboration in the development evolution of the Gutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses āblocksā to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ project as related to the development of Block-Based Themes geared to support Full Site Editing. Moderated by @kjellr.
Block-based Theme-related updates in Gutenberg 7.8
- PR to add semantic tag Group block variations has been merged. This allows block-based themes to use the Group block to denote things like <header The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitorās opinion about your content and you/ your organizationās brand. It may also look different on different screen sizes.>, <footer>, and <section>. This solves one of the most common structural issues with building block-based themes. Thereās no way to specify this from the UI UI is an acronym for User Interface - the layout of the page the user interacts with. Think āhow are they doing thatā and less about what they are doing. yet, but block-based themes should be able to use it manually by adding an extra tagName attribute.
- New line-height controls for Paragraph and Heading blocks are available. These use new āwpātypographyāline-height CSS CSS is an acronym for cascading style sheets. This is what controls the design or look and feel of a site. variables to adjust the line-height. We should expect to see more of those āofficialā variables make their way in as we get ready for Global Styles.
- āLighter DOMā block updates removes unnecessary wrappers and tags from the editor, so that the editor DOM for blocks matches the front end more closely. Which will allow theme authors to eventually share code between the front and back end.
- The Site Editor beta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. is receiving a steady stream of small updates to bring it more on par with the standard editor.
-
PR 20691 Site Editor beta supports full-screen mode
-
PR 20549 Site Editor beta supports custom blocks
- Soon, itāll be pulled out into its own top-level sidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme. item when the full-site editing experiment is active.
-
PR 20530 adding the Global Styles sidebar
Itās had some solid new updates this week and is getting closer to MVP "A minimum viable product (MVP) is a product with just enough features to satisfy early customers, and to provide feedback for future product development." - WikiPedia. Small heads up that a few of the standard variables recommended for experimental-theme.json JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. files have changed a little bit since last time. See details in the PR
Block Styles
A handful of default block patterns were added to Gutenberg 7.7. The new version 7.8 takes that further by including an API for plugins and themes to supply their own block patterns
The PHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. http://php.net/manual/en/intro-whatis.php. for this is relatively straightforward, and just needs two properties:
- The title for the block pattern
- The actual content, which is just an escaped copy/paste from Gutenberg
Hereās a quick example:
register_pattern(
'my-plugin/hello-world',
array(
'title' => __( 'Hello World', 'my-plugin' ),
'content' => "<!-- wp:paragraph -->\n<p>Hello world</p>\n<!-- /wp:paragraph -->",
)
);
What is a Block Pattern?
The broader topic for discussion was the introduction of Block Patterns. By definition Block Patterns are related to smaller sections of a page/post. Templates and template parts are the pieces that are tied to the layout of an entire page (ie. header, sidebar, etc) while Block Patterns create the layouts within those sections.
Now that this API An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. exists, itās possible for themes to ship their own recommended block patterns. For instance, if your theme targets a restaurant, you could ship a set of menu layouts as block patterns. opening up a whole new way for themes to share layout/content suggestions with their users. Possible block patterns are listed on GitHub.
Meeting discussion centered around:
- How do you envision using Block Patterns in your themes?
- What sorts of Block Patterns would you like to see included with WordPress by default?
How Can Block Patterns Be Used in Themes?
- They can provide layouts for FSE.
- Themes could bundle reusable patterns for the sorts of things seen in the theme demo. So using 2020 as an example, it could bundle a pattern for this group of blocks, as seen on the demoās about page.
- It was suggested and agreed that only minimal patterns should be added to core Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and only patterns that are very common and used by the 90%.
What Patterns Would You Like to See Available?
- A menu example for restaurant themes
- About or Team patterns for a business theme ā a team pattern could be 3 columns, each column containing image/header/paragraph, for example
- Services Provide Pattern but will need option for selectable SVGs
- Testimonial
- Card (title + photo + text + link)
- Features
- Text layouts with quotes, pull quotes, and media integrated for themes whose primary purpose is for displaying content
HTML HTML is an acronym for Hyper Text Markup Language. It is a markup language that is used in the development of web pages and websites. Validation
The Custom tag for group blocks that donāt use āblock markupā doesnāt need HTML validation. Ā For right now the tag entered as the tagName just needs to be one of the elements listed in GitHub.
Contributors are encouraged to continue testing Block Patterns, Templates, Block-Based Themes and Full Site Editing using the follow Issues and PRs discussed in this meeting. Block-Based Theme Experiments can be submitted at https://github.com/wordpress/theme-experiements and there is a call out for experimental theme submissions.