SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
Design Systems, Pattern
Libraries & WordPress
Jesse James Arnold and Grant Kinney from Exygy
Change is Constant
New challenges require new tools
Responsive Design
Stay flexible.
Our canvas is unknown
We don’t know what the target resolution and screen size are.
We’re not designing pages, we’re
designing systems of components.
Stephen Hay
Components
Each component of an interface needs to be considered independently and then brought together to
form any number of layouts.
Micro Layouts
Each unique section of the page had its own rules based content and device context.
Context Free
Components should be able to adapt to any number of layouts and screen sizes.
We like our components to be fluid by default, allowing the
container to define the width as much as possible.
Interface Inventory
Be more modular
The answer has always been to break your interface into smaller pieces.
header
image
body
block
Building blocks
Object oriented ideas
- Avoid unnecessarily
duplicating styles
- Encourages code reuse
- Easier to track down and
modify the common styles
- Smaller file sizes increase
performance
header
image
body
block
https://www.smashingmagazine.com/2011/12/an-introduction-to-object-oriented-css-oocss/
Atomic Design
Design Pattern
A design pattern is an element of an interface that can solve a specific
design problem and repeats across the product in various contexts with a
variety of content.
Benefits
Visual consistency for users impacts user
experience.
Speeds up workflow between design and
engineering.
Creates a shared language that connects
the whole team.
Buttons
Examples
Easy wins for any team getting
started:
Color palette
Font stack
Icon library
No more design handoff
Design is a work in progress, it is never handed off to be built.
<html>
<body>
<h1>My Website is Done</h1>
</body>
</html>
Pattern Library
A place to put all of this stuff.
Team Goals
Should provide the following team benefits:
1. Allows designers to contribute.
2. Allows product owners to qa and review design in browser.
3. Provides documentation for engineers.
Pattern Library: Fabricator
Fabricator: Taxonomy
└── materials
└── components
└── structures
or
└── materials
└── atoms
└── molecules
└── organism
Fabricator: Documentation
---
notes: |
These are notes written in `markdown`
---
<div class="component">My Component</div>
Fabricator: Data
links:
About Us:
- About Us
- Careers
- Media Center
- Legal
{{#each home.links}}
{{#each this}}
<a
href="#">{{this}}</a>
{{/each}}
{{/each}}
<a href="#">About Us</a>
<a href="#">Careers</a>
<a href="#">Media Center</a>
<a href="#">Legal</a>
SF Dahlia Pattern Library
Pattern Library: Fabricator
Pros:
Allows you to create your own materials logic.
Self documenting HTML components.
Navigation automatically generated.
Can feed it real data to test each component.
Pattern Library: Growing Pains
Scaffolding new features may introduce redundancy or code bloat.
Product wants to share core components of one product pattern library with
other product teams.
Visual design updates may share common elements with a feature in
development and cause disruption.
While importing CSS and JS from pattern library is easy, importing HTML
templates is still copy and paste.
Current Workflow
Design
Pattern
Library
CSS
Engineering WebApp
Extra Work and Quickly
Falls Out of Sync
Reproduce
Markup
Plugin that ports fabricator
functionality to work within a custom
WordPress theme.
Pattern library and application share
the same templates.
https://github.com/Exygy/wp-pattern-library
(this could easily be done with other platforms: AngularJS,
React, Ruby on Rails, Django, Laravel, etc)
New strategy: wp-pattern-library
Better Workflow
Design
Pattern
Library
Engineering WebApp
Markup
Templating
wp-pattern-library: directory structure
wp-content/themes/custom-theme/
pattern-library
- materials
- atoms
- buttons
- button.php
- button-icon.php
- button-sizes.php
- lists
- list-unordered.php
- list-ordered.php
- forms
- checkbox.php
- input-text.php
- radio.php
- paragraph.php
- molecules
- nav-menu.php
- tabs.php
- topbar.php
- organisms
- media-grid.php
- story-grid.php
- tile-grid.php
wp-pattern-library: Atoms
text: Submit
classes: hollow
---
<button class="button <?= esc_attr( $classes ) ?>"><?= $text ?></button>
button.php
<a class="primay button" href="#">So Primary</a>
<a class="hollow button" href="#">So Hollow</a>
<a class="secondary button" href="#">So Secondary</a>
<a class="secondary hollow button" href="#">So Hollow</a>
---
text: Submit
classes: hollow
---
<button class="button <?= esc_attr( $classes ) ?>"><?= $text ?></button>
button-colors.php
wp-pattern-library: Molecules
topbar.php
<div data-sticky-container>
<div
class="top-bar<?php if (is_not_pl()) : ?> data-sticky<?php endif ?>”
data-options="marginTop:0; stickyOn: small;"
style="width:100%"
>
<div class="top-bar-title">
<button class="top-bar-menu-icon" type="button" data-toggle="page">
<?php get_icon('menu') ?>
</button>
<div class="top-bar-name">
<span class="top-bar-name-content">
Custom Theme
</span>
</div>
</div>
...
wp-pattern-library: Molecules
block-columns.php---
title: Basic Content
text: This basic content makes an interesting point!
category: Component
image_src: http://placehold.it/768x350
url: #
---
<div class="block-columns">
<a class="block-columns-link" href="<?= esc_url( $url ) ?>">
<div class="block-column">
<div class="block-column-content">
<header class="block-column-header">
<span class="block-column-category"><?= $category ?></span>
<h3 class="block-column-title"><?= $title ?></h3>
</header>
<p class="block-column-text"><?= $text ?></p>
</div>
</div>
<div class="block-column">
<figure class="block-column-figure">
<img src="<?= esc_attr( $image_src ) ?>">
...
wp-pattern-library: Organisms
block-column-list.php
<section class="block-columns-list">
<?php get_pattern('molecule', 'block-columns') ?>
<?php get_pattern('molecule', 'block-columns') ?>
<?php get_pattern('molecule', 'block-columns') ?>
</section>
wp-pattern-library: Code Reuse
Call patterns from within
WordPress templates:
example post loop
<?php while ( have_posts() ) : the_post(); ?>
<div class="block" data-equalizer-watch>
<a class="block-link" href="<?php the_permalink() ?>">
<figure class="block-figure">
<img src="<?= esc_url( get_the_post_thumbnail_url( null, 'component-thumb' ) ) ?>">
</figure>
<div class="block-content">
<h3 class="block-title <?= esc_attr( Harmony::has_item_been_updated( get_the_ID() ) ?
'is-recent' : '' ) ?>">
<?php the_title() ?>
</h3>
<p class="block-text">
<?= wp_trim_words( get_field('description'), 18, '...' ) ?>
</p>
</div>
</a>
</div>
<?php endwhile; ?>
<?php while ( have_posts() ) : the_post();
get_pattern('molecule', 'block', [
'title' => get_the_title(),
'text' => wp_trim_words( get_field('description'), 18, '...' ),
'image' => get_the_post_thumbnail_url(null, 'component-thumb'),
'link' => get_permalink(),
'classes' => Harmony::has_item_been_updated(get_the_ID()) ? 'is-recent'
: '',
'attrs' => 'data-equalizer-watch'
]);
endwhile; ?>
before
after
wp-pattern-library: Code Reuse
Single source of truth for html
markup.
● Map WordPress data to pattern
variables (title, text, etc)
● All markup updates made from
molecules/block.php
● Application and pattern library
are always up to date
<?php while ( have_posts() ) : the_post();
get_pattern('molecule', 'block', [
'title' => get_the_title(),
'text' => wp_trim_words( get_field('description'), 18, '...' ),
'image' => get_the_post_thumbnail_url(null, 'component-thumb'),
'link' => get_permalink(),
'classes' => Harmony::has_item_been_updated(get_the_ID()) ? 'is-recent'
: '',
'attrs' => 'data-equalizer-watch'
]);
endwhile; ?>
Pattern Library: Resources
Fabricator
http://fbrctr.github.io/
Starter Kit with Fabricator and Foundation 6
https://github.com/exygy-design/exygy-patterns-f6
Living Example
https://sf-dahlia-pattern-library.herokuapp.com/
WordPress Plugin
https://github.com/Exygy/wp-pattern-library

Weitere ähnliche Inhalte

Was ist angesagt?

Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012
Joe Querin
 
Component Driven Design and Development
Component Driven Design and DevelopmentComponent Driven Design and Development
Component Driven Design and Development
Cristina Chumillas
 
HTML5 and CSS3 Techniques You Can Use Today
HTML5 and CSS3 Techniques You Can Use TodayHTML5 and CSS3 Techniques You Can Use Today
HTML5 and CSS3 Techniques You Can Use Today
Todd Anglin
 

Was ist angesagt? (20)

DrupalCon Austin 2014 Implement Foundation or Other Front-End Frameworks in Y...
DrupalCon Austin 2014 Implement Foundation or Other Front-End Frameworks in Y...DrupalCon Austin 2014 Implement Foundation or Other Front-End Frameworks in Y...
DrupalCon Austin 2014 Implement Foundation or Other Front-End Frameworks in Y...
 
Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012
 
Обзор Material Design Light (MDL). Александр Кашеверов.
Обзор Material Design Light (MDL). Александр Кашеверов.Обзор Material Design Light (MDL). Александр Кашеверов.
Обзор Material Design Light (MDL). Александр Кашеверов.
 
Doing More with LESS for CSS
Doing More with LESS for CSSDoing More with LESS for CSS
Doing More with LESS for CSS
 
Component Driven Design and Development
Component Driven Design and DevelopmentComponent Driven Design and Development
Component Driven Design and Development
 
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin..."Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
 
Slides bootstrap-4
Slides bootstrap-4Slides bootstrap-4
Slides bootstrap-4
 
Bootstrap 3 Basic - Bangkok WordPress Meetup
Bootstrap 3 Basic - Bangkok WordPress MeetupBootstrap 3 Basic - Bangkok WordPress Meetup
Bootstrap 3 Basic - Bangkok WordPress Meetup
 
Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016
 
HTML5: The Parts You Care About - 4/Nov/13 - PrDC Saskatoon, SK
HTML5: The Parts You Care About - 4/Nov/13 - PrDC Saskatoon, SKHTML5: The Parts You Care About - 4/Nov/13 - PrDC Saskatoon, SK
HTML5: The Parts You Care About - 4/Nov/13 - PrDC Saskatoon, SK
 
WordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopWordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute Workshop
 
Understand front end developer
Understand front end developerUnderstand front end developer
Understand front end developer
 
5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)
5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)
5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)
 
HTML5 and CSS3 Techniques You Can Use Today
HTML5 and CSS3 Techniques You Can Use TodayHTML5 and CSS3 Techniques You Can Use Today
HTML5 and CSS3 Techniques You Can Use Today
 
Using Core Themes in Drupal 8
Using Core Themes in Drupal 8Using Core Themes in Drupal 8
Using Core Themes in Drupal 8
 
Why You Need a Front End Developer
Why You Need a Front End DeveloperWhy You Need a Front End Developer
Why You Need a Front End Developer
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structure
 
A Beginner's Guide to Wordpress - WordCamp Montreal 2011
A Beginner's Guide to Wordpress - WordCamp Montreal 2011A Beginner's Guide to Wordpress - WordCamp Montreal 2011
A Beginner's Guide to Wordpress - WordCamp Montreal 2011
 
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
 
A Beginner's Guide to WordPress - WordCamp New York City 2012
A Beginner's Guide to WordPress - WordCamp New York City 2012A Beginner's Guide to WordPress - WordCamp New York City 2012
A Beginner's Guide to WordPress - WordCamp New York City 2012
 

Andere mochten auch

Generating the research idea lecture 2 isd 554
Generating the research idea lecture 2 isd 554Generating the research idea lecture 2 isd 554
Generating the research idea lecture 2 isd 554
pfungwa
 
Lecture 2 generating the research idea
Lecture 2 generating the research idea Lecture 2 generating the research idea
Lecture 2 generating the research idea
Kwabena Sarpong Anning
 
System Design and Analysis 1
System Design and Analysis 1System Design and Analysis 1
System Design and Analysis 1
Boeun Tim
 

Andere mochten auch (6)

Generating the research idea lecture 2 isd 554
Generating the research idea lecture 2 isd 554Generating the research idea lecture 2 isd 554
Generating the research idea lecture 2 isd 554
 
Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)
 
Lecture 2 generating the research idea
Lecture 2 generating the research idea Lecture 2 generating the research idea
Lecture 2 generating the research idea
 
System Design and Analysis 1
System Design and Analysis 1System Design and Analysis 1
System Design and Analysis 1
 
System Analysis and Design
System Analysis and DesignSystem Analysis and Design
System Analysis and Design
 
UX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and ArchivesUX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and Archives
 

Ähnlich wie Design Systems, Pattern Libraries & WordPress

HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
James Pearce
 
Customize all the Things! How to customize Windows and Web applications.
Customize all the Things! How to customize Windows and Web applications.Customize all the Things! How to customize Windows and Web applications.
Customize all the Things! How to customize Windows and Web applications.
Jason Conger
 
Highly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSHighly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSS
Zoe Gillenwater
 
BADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best PracticesBADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best Practices
meghsweet
 

Ähnlich wie Design Systems, Pattern Libraries & WordPress (20)

Css
CssCss
Css
 
“Good design is obvious. Great design is transparent.” — How we use Bootstrap...
“Good design is obvious. Great design is transparent.” — How we use Bootstrap...“Good design is obvious. Great design is transparent.” — How we use Bootstrap...
“Good design is obvious. Great design is transparent.” — How we use Bootstrap...
 
Building Potent WordPress Websites
Building Potent WordPress WebsitesBuilding Potent WordPress Websites
Building Potent WordPress Websites
 
Bootstrap PPT by Mukesh
Bootstrap PPT by MukeshBootstrap PPT by Mukesh
Bootstrap PPT by Mukesh
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Customize all the Things! How to customize Windows and Web applications.
Customize all the Things! How to customize Windows and Web applications.Customize all the Things! How to customize Windows and Web applications.
Customize all the Things! How to customize Windows and Web applications.
 
integrasi template admin lte terbaru dengan laravel 7
integrasi template admin lte terbaru dengan laravel 7integrasi template admin lte terbaru dengan laravel 7
integrasi template admin lte terbaru dengan laravel 7
 
Web technologies part-2
Web technologies part-2Web technologies part-2
Web technologies part-2
 
Implement rich snippets in your webshop
Implement rich snippets in your webshopImplement rich snippets in your webshop
Implement rich snippets in your webshop
 
Diazo: Bridging Designers and Programmers
Diazo: Bridging Designers and ProgrammersDiazo: Bridging Designers and Programmers
Diazo: Bridging Designers and Programmers
 
Agile Wordpress
Agile WordpressAgile Wordpress
Agile Wordpress
 
Highly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSHighly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSS
 
Create Responsive Website Design with Bootstrap 3
Create Responsive Website Design with Bootstrap 3Create Responsive Website Design with Bootstrap 3
Create Responsive Website Design with Bootstrap 3
 
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017 So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
So, You Wanna Dev? Join the Team! - WordCamp Raleigh 2017
 
Future-proof styling in Drupal (8)
Future-proof styling in Drupal (8)Future-proof styling in Drupal (8)
Future-proof styling in Drupal (8)
 
Advanced CSS Troubleshooting & Efficiency
Advanced CSS Troubleshooting & EfficiencyAdvanced CSS Troubleshooting & Efficiency
Advanced CSS Troubleshooting & Efficiency
 
BADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best PracticesBADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best Practices
 
ViA Bootstrap 4
ViA Bootstrap 4ViA Bootstrap 4
ViA Bootstrap 4
 
SMACSS Workshop
SMACSS WorkshopSMACSS Workshop
SMACSS Workshop
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Design Systems, Pattern Libraries & WordPress

  • 1. Design Systems, Pattern Libraries & WordPress Jesse James Arnold and Grant Kinney from Exygy
  • 2.
  • 3. Change is Constant New challenges require new tools
  • 5. Our canvas is unknown We don’t know what the target resolution and screen size are.
  • 6. We’re not designing pages, we’re designing systems of components. Stephen Hay
  • 7. Components Each component of an interface needs to be considered independently and then brought together to form any number of layouts.
  • 8. Micro Layouts Each unique section of the page had its own rules based content and device context.
  • 9. Context Free Components should be able to adapt to any number of layouts and screen sizes. We like our components to be fluid by default, allowing the container to define the width as much as possible.
  • 11. Be more modular The answer has always been to break your interface into smaller pieces. header image body block
  • 12. Building blocks Object oriented ideas - Avoid unnecessarily duplicating styles - Encourages code reuse - Easier to track down and modify the common styles - Smaller file sizes increase performance header image body block https://www.smashingmagazine.com/2011/12/an-introduction-to-object-oriented-css-oocss/
  • 14.
  • 15. Design Pattern A design pattern is an element of an interface that can solve a specific design problem and repeats across the product in various contexts with a variety of content.
  • 16. Benefits Visual consistency for users impacts user experience. Speeds up workflow between design and engineering. Creates a shared language that connects the whole team. Buttons
  • 17. Examples Easy wins for any team getting started: Color palette Font stack Icon library
  • 18. No more design handoff Design is a work in progress, it is never handed off to be built. <html> <body> <h1>My Website is Done</h1> </body> </html>
  • 19. Pattern Library A place to put all of this stuff.
  • 20. Team Goals Should provide the following team benefits: 1. Allows designers to contribute. 2. Allows product owners to qa and review design in browser. 3. Provides documentation for engineers.
  • 22. Fabricator: Taxonomy └── materials └── components └── structures or └── materials └── atoms └── molecules └── organism
  • 23. Fabricator: Documentation --- notes: | These are notes written in `markdown` --- <div class="component">My Component</div>
  • 24. Fabricator: Data links: About Us: - About Us - Careers - Media Center - Legal {{#each home.links}} {{#each this}} <a href="#">{{this}}</a> {{/each}} {{/each}} <a href="#">About Us</a> <a href="#">Careers</a> <a href="#">Media Center</a> <a href="#">Legal</a>
  • 25. SF Dahlia Pattern Library
  • 26. Pattern Library: Fabricator Pros: Allows you to create your own materials logic. Self documenting HTML components. Navigation automatically generated. Can feed it real data to test each component.
  • 27. Pattern Library: Growing Pains Scaffolding new features may introduce redundancy or code bloat. Product wants to share core components of one product pattern library with other product teams. Visual design updates may share common elements with a feature in development and cause disruption. While importing CSS and JS from pattern library is easy, importing HTML templates is still copy and paste.
  • 28. Current Workflow Design Pattern Library CSS Engineering WebApp Extra Work and Quickly Falls Out of Sync Reproduce Markup
  • 29. Plugin that ports fabricator functionality to work within a custom WordPress theme. Pattern library and application share the same templates. https://github.com/Exygy/wp-pattern-library (this could easily be done with other platforms: AngularJS, React, Ruby on Rails, Django, Laravel, etc) New strategy: wp-pattern-library
  • 31. wp-pattern-library: directory structure wp-content/themes/custom-theme/ pattern-library - materials - atoms - buttons - button.php - button-icon.php - button-sizes.php - lists - list-unordered.php - list-ordered.php - forms - checkbox.php - input-text.php - radio.php - paragraph.php - molecules - nav-menu.php - tabs.php - topbar.php - organisms - media-grid.php - story-grid.php - tile-grid.php
  • 32. wp-pattern-library: Atoms text: Submit classes: hollow --- <button class="button <?= esc_attr( $classes ) ?>"><?= $text ?></button> button.php <a class="primay button" href="#">So Primary</a> <a class="hollow button" href="#">So Hollow</a> <a class="secondary button" href="#">So Secondary</a> <a class="secondary hollow button" href="#">So Hollow</a> --- text: Submit classes: hollow --- <button class="button <?= esc_attr( $classes ) ?>"><?= $text ?></button> button-colors.php
  • 33. wp-pattern-library: Molecules topbar.php <div data-sticky-container> <div class="top-bar<?php if (is_not_pl()) : ?> data-sticky<?php endif ?>” data-options="marginTop:0; stickyOn: small;" style="width:100%" > <div class="top-bar-title"> <button class="top-bar-menu-icon" type="button" data-toggle="page"> <?php get_icon('menu') ?> </button> <div class="top-bar-name"> <span class="top-bar-name-content"> Custom Theme </span> </div> </div> ...
  • 34. wp-pattern-library: Molecules block-columns.php--- title: Basic Content text: This basic content makes an interesting point! category: Component image_src: http://placehold.it/768x350 url: # --- <div class="block-columns"> <a class="block-columns-link" href="<?= esc_url( $url ) ?>"> <div class="block-column"> <div class="block-column-content"> <header class="block-column-header"> <span class="block-column-category"><?= $category ?></span> <h3 class="block-column-title"><?= $title ?></h3> </header> <p class="block-column-text"><?= $text ?></p> </div> </div> <div class="block-column"> <figure class="block-column-figure"> <img src="<?= esc_attr( $image_src ) ?>"> ...
  • 35. wp-pattern-library: Organisms block-column-list.php <section class="block-columns-list"> <?php get_pattern('molecule', 'block-columns') ?> <?php get_pattern('molecule', 'block-columns') ?> <?php get_pattern('molecule', 'block-columns') ?> </section>
  • 36. wp-pattern-library: Code Reuse Call patterns from within WordPress templates: example post loop <?php while ( have_posts() ) : the_post(); ?> <div class="block" data-equalizer-watch> <a class="block-link" href="<?php the_permalink() ?>"> <figure class="block-figure"> <img src="<?= esc_url( get_the_post_thumbnail_url( null, 'component-thumb' ) ) ?>"> </figure> <div class="block-content"> <h3 class="block-title <?= esc_attr( Harmony::has_item_been_updated( get_the_ID() ) ? 'is-recent' : '' ) ?>"> <?php the_title() ?> </h3> <p class="block-text"> <?= wp_trim_words( get_field('description'), 18, '...' ) ?> </p> </div> </a> </div> <?php endwhile; ?> <?php while ( have_posts() ) : the_post(); get_pattern('molecule', 'block', [ 'title' => get_the_title(), 'text' => wp_trim_words( get_field('description'), 18, '...' ), 'image' => get_the_post_thumbnail_url(null, 'component-thumb'), 'link' => get_permalink(), 'classes' => Harmony::has_item_been_updated(get_the_ID()) ? 'is-recent' : '', 'attrs' => 'data-equalizer-watch' ]); endwhile; ?> before after
  • 37. wp-pattern-library: Code Reuse Single source of truth for html markup. ● Map WordPress data to pattern variables (title, text, etc) ● All markup updates made from molecules/block.php ● Application and pattern library are always up to date <?php while ( have_posts() ) : the_post(); get_pattern('molecule', 'block', [ 'title' => get_the_title(), 'text' => wp_trim_words( get_field('description'), 18, '...' ), 'image' => get_the_post_thumbnail_url(null, 'component-thumb'), 'link' => get_permalink(), 'classes' => Harmony::has_item_been_updated(get_the_ID()) ? 'is-recent' : '', 'attrs' => 'data-equalizer-watch' ]); endwhile; ?>
  • 38. Pattern Library: Resources Fabricator http://fbrctr.github.io/ Starter Kit with Fabricator and Foundation 6 https://github.com/exygy-design/exygy-patterns-f6 Living Example https://sf-dahlia-pattern-library.herokuapp.com/ WordPress Plugin https://github.com/Exygy/wp-pattern-library