SITEGEIST.
MONOCLE
STYLEGUIDE AND ATOMIC DESIGN IN TS2
Slide 2
Slide 2 text
SITEGEIST.MONOCLE
WHO I AM
» Martin Ficzel - Developer
fi[email protected]
twitter/slack: @kopfaufholz
Neos, Flow
TYPO3 3.6-6.2 / ext_caretaker
Slide 3
Slide 3 text
SITEGEIST.MONOCLE
A LIVING-STYLEGUIDE FOR
NEOS AKA
SITEGEIST.MONOCLE
A TYPOSCRIPT2 BASED
APPROACH TO ATOMIC-DESIGN
Slide 4
Slide 4 text
TERMS
Slide 5
Slide 5 text
SITEGEIST.MONOCLE
ATOMIC DESIGN
» Starts with basic Atoms
» Aggregate higher order components: Molecules, Organisms,
Templates.
» Made popular by Brad Frost
» http://atomicdesign.bradfrost.com/
THE WORDING IS A WEIRD MIX OF PHYSICAL AND
BIOLOGICAL TERMS BUT THE GENERAL IDEA IS GREAT AND
STICKING TO THE COMMON TERMS HELPS.
Slide 6
Slide 6 text
SITEGEIST.MONOCLE
STYLEGUIDES
» Renders the components of a website in isolation.
» http://patternlab.io/
» Pro: makes Styling Problems visible and encourages
clean Styling
» Con: extra Markup -> Duplicated Work / diverge over time
Slide 7
Slide 7 text
SITEGEIST.MONOCLE
MOTIVATION
» Sitegeist already uses Atomic design for styles and
js(react-components)
» No styleguide that matched our needs
» RE.A.L (RawEstimates, Agile, Lean)
WE WANTED TO USE ATOMIC DESIGN AS A COMMON
PRINCIPLE TROUGH OUR ENTIRE WORKFLOW
Slide 8
Slide 8 text
ATOMIC.TS2
ATOMIC DESIGN IN TYPOSCRIPT2
Credit: CERN
SITEGEIST.MONOCLE
USE ORGANISM FOR CUSTOM
CR-NODE
prototype(Vendor.Site:ExampleNode) < prototype(Vendor.Site:Molecules.Example) {
# this has to be done because of auto generated TS
templatePaths = NULL
# map node properties
exampleProperty = ${q(node).property('propertyName')}
}
Slide 15
Slide 15 text
SITEGEIST.
MONOCLE
LIVING STYLEGUIDE FOR NEOS
Photo by: Quinn Dombrowski
Slide 16
Slide 16 text
SITEGEIST.MONOCLE
ASSIGN ITEMS TO THE
STYLEGUIDE
prototype(Vendor.Site:Atoms.Button) < prototype(Vendor.Site:Atoms.Link) {
@styleguide {
path = 'atoms.basic'
title = 'Button'
description = 'generic Buttom Atom'
}
...
}
SITEGEIST.MONOCLE
LIVE DEMO AFTERWARDS IN CASE OF INTEREST
Slide 19
Slide 19 text
CONCLUSION
Slide 20
Slide 20 text
SITEGEIST.MONOCLE
ACHIEVEMENTS
» Atomic.TS2 feels great
» Template engine agnostic
» Ubiquitous component naming and structure
» Very flexible and reusable
» Sitegeist.Monocle - Living stileguide
» No extra code
» Isolated rendering
» Frontend is running with default TS
ALREADY MISS ATOMIC.TS2 IN FLUID PROJECTS
Slide 21
Slide 21 text
SITEGEIST.MONOCLE
OBSTACLES
» Interferences with autocreated-ts
» Missing TS-Objects
» Missing Best Practices
» Providing Dummy data for Menus
NO BIGGER PROBLEM OCCURED AND THE EXISTING
OBSTACLES COULD BE OVERCOME EASILY.
Slide 22
Slide 22 text
FUTURE
Slide 23
Slide 23 text
SITEGEIST.MONOCLE
SITEGEIST.MONOCLE
» Add some App Feeling
» Selectors for DeviceWidth, Site and Language
» Release to github/packagist soonish