Slide 1

Slide 1 text

THE FUTURE OF THEMES Designing for the Block Editor and Beyond

Slide 2

Slide 2 text

@marktimemedia I Design & Build DIGITAL INTERFACES HI, I’M MICHELLE. Rockstar at saying stuff. Adorable badass. Carefully curated spontaneity & meticulously organized chaos. Accidental fitness buff. The Anxious Alicorn.

Slide 3

Slide 3 text

@marktimemedia A brief history of themes

Slide 4

Slide 4 text

@marktimemedia Themes as cohesive templates Theme look & feel & structure Content words & images & media Plugins functionality

Slide 5

Slide 5 text

“Design Dictator” What was the role of a theme designer?

Slide 6

Slide 6 text

@marktimemedia Websites begin to do more

Slide 7

Slide 7 text

@marktimemedia As a result: Managing evolving layouts and content Landing pages and bespoke content Lack of options to create unique layouts without knowing code Complex functionality End user frustration at not being able to make "simple" changes

Slide 8

Slide 8 text

@marktimemedia What we tried: Widgetized themes Heavy reliance on shortcodes Custom fields & Custom editor experiences Customizer & options based themes Third party page builders

Slide 9

Slide 9 text

@marktimemedia The rise of the block-based paradigm

Slide 10

Slide 10 text

@marktimemedia The block editor has been part of WordPress core since the end of 2018 (5.0)

Slide 11

Slide 11 text

@marktimemedia So much has happened in WordPress theme & content management since the last time we were all together

Slide 12

Slide 12 text

@marktimemedia Gutenberg Phase 2 https://wordpress.org/about/roadmap/ WordPress from 2020–2022 7 major releases 5.4-6.0 2 new themes Twenty Twenty One and Twenty Twenty Two (FSE)

Slide 13

Slide 13 text

@marktimemedia WordPress from 2020–2022 More core blocks, including site-level blocks More detailed block styling options, including typography, color, spacing, layout Block widgets

Slide 14

Slide 14 text

@marktimemedia WordPress from 2020–2022 Block patterns (5.5), including Query Loop block options Block directory & Pattern directory

Slide 15

Slide 15 text

@marktimemedia The introduction of theme.json & a new global styles/variable paradigm (5.8) • with support for Child Themes (5.9) • and Style variations (6.0) Full Site Editing (5.9) supporting html templates and template parts WordPress from 2020–2022

Slide 16

Slide 16 text

@marktimemedia Where WordPress is going: https://wordpress.org/about/roadmap/

Slide 17

Slide 17 text

@marktimemedia What is the purpose of a modern WordPress theme?

Slide 18

Slide 18 text

“Creative Curator” What does a theme designer do?

Slide 19

Slide 19 text

@marktimemedia Our job as designers and builders of themes is to provide a thorough set of thoughtfully curated opinions, patterns, styles, layouts, and templates. • Global styles of color, typography, spacing • Styling for each core block and html element • Styling rules for combinations of elements within layouts • Guiding our end user to lay out content or create new combinations

Slide 20

Slide 20 text

@marktimemedia We have the power to decide how to curate the content building experience to enable guided creativity. • Do we need full site editing or just content editing? • Do we need to support all block style options, or should we provide curated options? • How much control do we need to give the end user over changing the look and feel of the overall site?

Slide 21

Slide 21 text

@marktimemedia We can extend and enhance the block editing experience by providing additional styles, patterns, and controls for existing blocks. • Do we want to create pre-built patterns or pre-populated blocks for our content? Should these be changeable or fixed? • Do we want to extend any core blocks with custom styles or controls? • Do we want to provide multiple sets of styles? • Are we including any styles for specific third-party plugins or blocks?

Slide 22

Slide 22 text

@marktimemedia Our job, then, is not to create a single pixel- perfect solution, but to create a comprehensive design system where many future solutions can flourish. • How will design decisions impact current content? • How will design decisions impact future content?

Slide 23

Slide 23 text

"A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications." https://www.invisionapp.com/inside-design/guide-to-design-systems/

Slide 24

Slide 24 text

@marktimemedia Creating Systems with ATOMIC DESIGN https://bradfrost.com/ ATOMS MOLECULES ORGANISMS TEMPLATES PAGES

Slide 25

Slide 25 text

@marktimemedia

Slide 26

Slide 26 text

@marktimemedia ATOMS THE SMALLEST BUILDING BLOCKS

Slide 27

Slide 27 text

@marktimemedia https://madebymike.github.io/html5-periodic-table/

Slide 28

Slide 28 text

@marktimemedia http://demo.patternlab.io

Slide 29

Slide 29 text

@marktimemedia MOLECULES UNIQUE, REPEATABLE COMBINATIONS OF ATOMS

Slide 30

Slide 30 text

@marktimemedia http://demo.patternlab.io

Slide 31

Slide 31 text

@marktimemedia ORGANISMS MOLECULES COMING TOGETHER ALLOW ACTION

Slide 32

Slide 32 text

@marktimemedia http://demo.patternlab.io

Slide 33

Slide 33 text

About Blog Contact Login Contact Login About Blog About Blog Contact Search Login

Slide 34

Slide 34 text

@marktimemedia TEMPLATES ORGANISMS TOGETHER BECOME LAYOUTS

Slide 35

Slide 35 text

@marktimemedia http://demo.patternlab.io About Blog Contact Search Login

Slide 36

Slide 36 text

@marktimemedia PAGES TEMPLATES WITH SPECIFIC CONTENT

Slide 37

Slide 37 text

@marktimemedia http://demo.patternlab.io

Slide 38

Slide 38 text

Blocks, FSE, & The Atomization of WordPress Themes https://fullsiteediting.com/

Slide 39

Slide 39 text

@marktimemedia Standard/hybrid theme theme.json (v1 or v2) functions.php index.php style.css editor-style.css php content templates (template hierarchy) block templates for custom post types (php) /inc (php) /assets (js/css/img) /template-parts (php template parts) /patterns (html block patterns as php, defined in theme.json v2) or via register_block_pattern (php) Full Site Editing theme theme.json (v2) functions.php index.php style.css editor-style.css /templates (html templates) /parts (html template parts) /patterns (html block patterns as php) /inc (php) /assets (js/css/img) /styles (additional json files)

Slide 40

Slide 40 text

@marktimemedia Styling with style.css & editor-style.css Traditional method for styling themes • both are required to enable the frontend to match the editor • style.css is enqueued for the end user (styling the website) • editor-style.css is enqueued in the editor (styling the block editor) • can be used on their own, or to supplement theme.json

Slide 41

Slide 41 text

@marktimemedia Styling with theme.json Style & variable generation tool • loaded in both frontend and editor • generates CSS variables & CSS styles • can be used alongside style.css in a hybrid theme • responsible for most* styles in FSE https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/ https://developer.wordpress.org/themes/advanced-topics/theme-json/ *the intent is for all styles, but we aren’t quite there yet (and may never be there)

Slide 42

Slide 42 text

@marktimemedia Mapping Atomic Design to WordPress Components • Atoms variables html elements • Molecules simple blocks • Organisms complex blocks template parts reusable blocks Layout • Templates page & post content full-site views • Pages custom content layouts custom views Options • Settings editor settings block options

Slide 43

Slide 43 text

@marktimemedia SETTINGS theme.json settings Determines options available for customizing block designs within the block editor • color controls color picker, gradients, duotones, backgrounds, text, links • typography controls font size, family, spacing, line height, decoration, drop cap • border controls size, radius, color, style • spacing controls margin, padding, gap

Slide 44

Slide 44 text

@marktimemedia SETTINGS theme.json settings

Slide 45

Slide 45 text

@marktimemedia SETTINGS Block settings Custom block styles and controls for existing core or third-party blocks • custom block styles defined via php styled via css • custom block controls defined via react

Slide 46

Slide 46 text

@marktimemedia ATOMS theme.json variables Generates CSS variables presets (defines preset variables) --wp--preset--{category}--{slug} • color palette, gradients, duotone • typography font sizes, font families • layout regular and wide size • spacing units

Slide 47

Slide 47 text

@marktimemedia ATOMS theme.json variables Generates CSS variables custom (creates custom variables) --wp--custom--{nested}--{object-keys} • user defined • reference in theme.json styles or in style.css

Slide 48

Slide 48 text

@marktimemedia ATOMS theme.json element styles Generates CSS styles for specific blocks and block elements styles/elements button, caption, headings, links

Slide 49

Slide 49 text

@marktimemedia MOLECULES Simple blocks • typography (quotes, lists) • interaction (buttons, forms) • embeds, links • images, audio, video, single media • post elements (author, meta, comment, summary, image, etc) • site nav elements (logos, taglines, menus, navigation, pagination, search) https://developer.wordpress.org/block-editor/reference-guides/core-blocks/

Slide 50

Slide 50 text

@marktimemedia MOLECULES theme.json block styles Generates CSS styles for specific blocks and block elements styles/blocks

Slide 51

Slide 51 text

@marktimemedia ORGANISMS Complex blocks Blocks built of many other blocks • Layout blocks (groups, columns, rows) • Mixed media blocks (galleries, cover image, media/text, etc) • Widget blocks • Query blocks (multiple posts) • Comment blocks (multiple comments) • Other custom blocks

Slide 52

Slide 52 text

@marktimemedia ORGANISMS PHP Template parts Headers, footers, sidebars, sections, articles, comments • Reusable content areas included within different PHP templates

Slide 53

Slide 53 text

@marktimemedia ORGANISMS FSE template parts Headers, footers, and other reusable content areas • Selectable in the Site Editor

Slide 54

Slide 54 text

@marktimemedia ORGANISMS Block patterns Commonly used groups of core or custom blocks that can be preconfigured and inserted all at once • defined using register_block_pattern (traditional) or /patterns folder (FSE) • tagged, sortable, searchable

Slide 55

Slide 55 text

@marktimemedia ORGANISMS Block patterns

Slide 56

Slide 56 text

@marktimemedia ORGANISMS Reusable blocks Identical, updateable, and reusable content used across multiple pages • user generated within the WordPress content editor • when content is updated in one place, it updates everywhere the block is used • saved as a custom post type

Slide 57

Slide 57 text

@marktimemedia ORGANISMS Reusable blocks

Slide 58

Slide 58 text

@marktimemedia TEMPLATES PHP templates Both FSE and traditional themes follow the template hierarchy • Post-type block templates – defined block defaults which are pre- loaded onto empty posts in the editor • Page templates – traditional theme: php templates – FSE theme: registered in theme.json, added to /templates folder

Slide 59

Slide 59 text

@marktimemedia TEMPLATES PHP templates

Slide 60

Slide 60 text

@marktimemedia TEMPLATES FSE templates • Core templates (single, archive, page, etc) which include the entire website view (headers, footers, etc) • Can be created custom, or assembled out of FSE Template Parts

Slide 61

Slide 61 text

@marktimemedia TEMPLATES FSE templates

Slide 62

Slide 62 text

@marktimemedia Pages (and beyond) • Content created within the block editor, using blocks and patterns • Views rendered within the site, using FSE templates and template parts

Slide 63

Slide 63 text

@marktimemedia MULTIPLE ELEMENTS json style variations & custom global styles • Multiple json files within a single FSE theme • Saved in the /styles folder • Switch between different theme styles within the FSE styles dashboard • Edit or customize existing global theme styles • Predefined styles are a great option for commercial or variable themes

Slide 64

Slide 64 text

@marktimemedia MULTIPLE ELEMENTS json style variations & custom global styles

Slide 65

Slide 65 text

@marktimemedia Concerns & Considerations

Slide 66

Slide 66 text

@marktimemedia BREAKS & BETAS: Shipping software in a shifting landscape https://make.wordpress.org/core/2022/08/10/proposal-stop-merging-experimental-apis-from- gutenberg-to-wordpress-core/

Slide 67

Slide 67 text

@marktimemedia How do we address breaking changes? • How do we know when to use a new feature in a commercial or production site? • How do we continually monitor updates and new best practices more stringently than in past years? • How do we provide ongoing support or updates if we choose to use new features?

Slide 68

Slide 68 text

@marktimemedia Where and how should we be defining our styles? • Should we use theme.json or style.css for a specific item? • Do we build alongside (or override) core styles, or fully replace them with our own? • How do we deal with issues of battling specificity ?

Slide 69

Slide 69 text

@marktimemedia Are themes supposed to be unique or standardized? • When content and design are mixed, what happens when themes change? • How do we address incompatible style issues? https://richtabor.com/standardizing-theme-json-colors/

Slide 70

Slide 70 text

@marktimemedia How long is a theme supposed to last? • Are we going to be changing themes or do we just change options within a theme? • Are we just going to be loading new json files, blocks, and patterns over an existing theme?

Slide 71

Slide 71 text

@marktimemedia How do we learn all of this new theme technology? • New tooling involved (template markup, json, react) • Modifying anything via JS will require compiling/build tools • Less transparency into core code (learning by reading) due to React scripts being compiled and minified* * You can use define('SCRIPT_DEBUG', true) in wp- config to view developer (unminified) versions of scripts

Slide 72

Slide 72 text

Theme design may be evolving, but it is still a crucial part of the WordPress ecosystem. Let’s help people build creative content! Key Takeaway:

Slide 73

Slide 73 text

@marktimemedia Additional Resources Design Systems • https://elementor.com/blog/design-system • https://www.uxpin.com/studio/design-systems/create- component-based-websites-with-design-systems/ • https://webdevstudios.com/2020/02/20/design-systems- for-wordpress/ • https://www.invisionapp.com/inside-design/guide-to-design- systems/ Block Editor • https://fullsiteediting.com/ • https://wordpress.org/support/article/site-editor/ • https://make.wordpress.org/core/2022/01/07/state-of-the- customizer-with-block-themes-in-wordpress-5-9/ • https://make.wordpress.org/core/2022/01/10/wordpress-5- 9-field-guide/ • https://css-tricks.com/a-deep-introduction-to-wordpress- block-themes/ • https://developer.wordpress.org/block-editor/how-to- guides/themes/theme-json/ • https://developer.wordpress.org/themes/advanced- topics/theme-json/

Slide 74

Slide 74 text

@marktimemedia QUESTIONS? Here’s how to get in touch: Michelle Schulp [email protected] @marktimemedia michelleschulp.pink bit.ly/future-of-themes-2022 WHERE TO FIND ME NEXT: NOW: See you at the social! ONLINE: WordPress Slack Twitter IN PERSON: Whatever is next!