COMPONENT DRIVEN DESIGN AND DEVELOPMENT Cristina Chumillas - - PowerPoint PPT Presentation

component driven
SMART_READER_LITE
LIVE PREVIEW

COMPONENT DRIVEN DESIGN AND DEVELOPMENT Cristina Chumillas - - PowerPoint PPT Presentation

COMPONENT DRIVEN DESIGN AND DEVELOPMENT Cristina Chumillas CRISTINA CHUMILLAS @chumillas ckrina / Designer and frontend developer at Ymbra WHAT ARE WE GOING TO TALK ABOUT Components Design Systems CSS Methodologies Styles Guides In


slide-1
SLIDE 1
slide-2
SLIDE 2

COMPONENT DRIVEN

DESIGN AND DEVELOPMENT

Cristina Chumillas

slide-3
SLIDE 3

CRISTINA CHUMILLAS

/ @chumillas ckrina Designer and frontend developer at Ymbra

slide-4
SLIDE 4

WHAT ARE WE GOING TO TALK ABOUT

Components Design Systems CSS Methodologies Styles Guides In Drupal

slide-5
SLIDE 5

WEB PROJECTS

slide-6
SLIDE 6
slide-7
SLIDE 7

invisble

slide-8
SLIDE 8

vs Responsive Interactions ...

slide-9
SLIDE 9

COMPONENTS

slide-10
SLIDE 10

invisble

slide-11
SLIDE 11

<!-- Last News component --> <div class="last-news"> <h2 class="last-news__title"> Últimas noticias </h2> <ul class="last-news__list"> <li class="last-news__item">(...)</li> <li class="last-news__item">(...)</li> </ul> <a class="last-news__more">Ver más</a> </div>

slide-12
SLIDE 12

USE COMPONENTS TO MAKE SYSTEMS MODULAR

For a system to be modular, it must have interchangeable parts.

slide-13
SLIDE 13

WHAT MAKES A COMPONENT MODULAR?

Standard & shared design Centralized code Controlled via system, not the user Customizable options

slide-14
SLIDE 14
slide-15
SLIDE 15
slide-16
SLIDE 16

“We’re not designing pages, we’re designing systems of components.”

  • -Stephen Hay
slide-17
SLIDE 17

DESIGN SYSTEMS

slide-18
SLIDE 18

Everything that makes up your product.

  • -Mark Otto, FOWA 2013

Everything.

Typography, layouts and grids, colors, icons, components, coding conventions...

slide-19
SLIDE 19
slide-20
SLIDE 20
slide-21
SLIDE 21

WHY DESIGN SYSTEMS?

Reusable work - COMPONENTS More efficient projects Large-scale ready code Everybody knows how everything works Integrates multi-disciplinary workflow

slide-22
SLIDE 22

ATOMIC DESIGN

slide-23
SLIDE 23

BRAD FROST

slide-24
SLIDE 24
slide-25
SLIDE 25
slide-26
SLIDE 26
slide-27
SLIDE 27
slide-28
SLIDE 28
slide-29
SLIDE 29

WHEN?

slide-30
SLIDE 30

WIREFRAMES

Static wireframes vs HTML Wireframes

slide-31
SLIDE 31

STATIC WIREFRAMES

They are abstractions They are full of assumptions They are never complete

slide-32
SLIDE 32

HTML WIREFRAMES

They get into the browser quicker They reinforce the notion that you’re creating a website They are interactive They allow annotations They are the base for the final product

slide-33
SLIDE 33

DESIGN

Static delirables vs HTML delirables-prototypes

slide-34
SLIDE 34

DESIGNING IN THE BROWSER

PSD for early planning/research phases The composition in the browser Make decisions in the browser Reusable work > Developer will know how do you want you output

slide-35
SLIDE 35

CSS METHODOLOGIES

slide-36
SLIDE 36

OOCSS

(Object Oriented CSS)

Based in Object Oriented programming paradigm: Do One Thing Well Single Responsibility Principle

(1 responsability = 1 class)

Focuses on Separation of Concerns(SoC)

slide-37
SLIDE 37

OOCSS

(Object Oriented CSS)

/* Media Object */ .media {} .media .image {} .media .comment {}

slide-38
SLIDE 38

BEM

(Block Element Modifier)

.site-search {} /* Block */ .site-search__field {} /* Element */ .site-search--full {} /* Modifier */

slide-39
SLIDE 39

BEM

<div class="block-name__wrapper"> <div class="block-name"> <h2 class="block-name__title">Block title</h2> <p class="block-name__text">Block text</p> </div> </div>

slide-40
SLIDE 40

SMACSS

slide-41
SLIDE 41

STYLE GUIDES

Documentation of a Design System

slide-42
SLIDE 42
slide-43
SLIDE 43

WHY?

Improve User Experience Easy onboarding of new team members Efficient Design and Development Makes Testing easier

slide-44
SLIDE 44
slide-45
SLIDE 45
slide-46
SLIDE 46
slide-47
SLIDE 47

STYLEGUIDE DRIVEN DEVELOPMENT(SDD)

Style guides that are generated directly from the style definition sources

slide-48
SLIDE 48

KSS (KNYLE STYLE SHEETS)

Documentation specification and styleguide format. Structured to be automatically extracted and processed.

slide-49
SLIDE 49

base/ layout/ components/ pager/ _pager.scss _pager.hbs

slide-50
SLIDE 50

_pager.scss

// Pager // // Markup: pager.hbs // // Style guide: components.navigation.pager .pager, %pager { margin: 0; // All the styles here. }

slide-51
SLIDE 51

_pager.hbs

// Pager <ul class="pager {{modifier_class}}"> <li class="pager__item"> <a title="Go to page 1" href="/admin/content">1</a> </li> <li class="pager__item"> <a title="Go to page 2" href="/admin/content?page=1">2</a> </li> <li class="pager__current-item">3</li> <li class="pager__item"> <a title="Go to page 4" href="/admin/content?page=3">4</a> </li> <li class="pager__item"> <a title="Go to page 5" href="/admin/content?page=4">5</a> </li> </ul>

slide-52
SLIDE 52
slide-53
SLIDE 53

STYLE GUIDES - RESOURCES

styleguides.io Articles, Books, Podcasts, Talks, Tools, Examples, etc.

slide-54
SLIDE 54

IN DRUPAL

slide-55
SLIDE 55

GENERAL APPROACHES

  • 1. Wrapping components
  • 2. Changing default markup
slide-56
SLIDE 56

OUR COMPONENTS TO DRUPAL COMPONENTS

In code Display Suite Panels

slide-57
SLIDE 57

IN CODE

Field formatter Process and preprocess functions hook_(...)_alter hook_page_alter() hook_form_alter() hook_node_view_alter() (...) ...

slide-58
SLIDE 58

DISPLAY SUITE

View modes

slide-59
SLIDE 59

DISPLAY SUITE

Field templates (Display Suite extras)

slide-60
SLIDE 60

PANELS

Custom Panes Templates for pane Add class to the pane Mini Panels Context

slide-61
SLIDE 61

PANELS

Custom Panes (CTools Content Type or Plugin)

<?php $plugin = array( 'single' => TRUE, 'title' => t('Menu shortcuts to the themes'), 'category' => t('MSF ES: Themes'), 'render callback' => 'jumpmenu_themes_render', 'admin info' => 'jumpmenu_themes_admin_info', ); /** * The 'admin info' callback for panel pane. */ function jumpmenu_themes_admin_info($subtype, $conf, $contexts) { (...) } /** * Render callback function. */ function jumpmenu_themes_render($subtype, $conf, $args, $contexts) { (...) }

slide-62
SLIDE 62

PANELS

Custom template for pane

/** * Implements hook_preprocess_panels_pane(). */ function mymodule_preprocess_panels_pane(&$variables) { switch ($variables['pane']->subtype) { case 'my-pane-name': $variables['template_files'][] = 'panels-pane-test'; break; } }

slide-63
SLIDE 63

PANELS

Custom class

/** * Implements hook_preprocess_panels_pane(). */ function mymodule_preprocess_panels_pane(&$variables) { switch ($variables['pane']->subtype) { case 'my-pane-name': $classes = 'my-custum-class'; $variables['classes_array'][] = $classes; break; } }

slide-64
SLIDE 64

PANELS

Mini-panels

slide-65
SLIDE 65

PANELS

Context

slide-66
SLIDE 66

THANKS!

/ @chumillas ckrina

Drupal-generated markup is not your friend -- use a styleguide!

Robert Caracaus Tuesday 22 14:15-15:15 Room 112

Prototypes and Drupal: from designing in-browser to implementing custom templates

Yuriy Gerasimov and Morten Christoffersen Wednesday 23 10:45-11:45 Room 111