Pinterest Template 1.0
https://engineering.pinterest.com/
https://engineering.pinterest.com/ Pinterest Template 1.0 Pushing - - PowerPoint PPT Presentation
https://engineering.pinterest.com/ Pinterest Template 1.0 Pushing The Boundaries Of The Layout System And Typography Who We Are Engineers at Pinterest Lin Wang Thorben Primke Core Experience Team Commerce Team Efficiency / Stability /
Pinterest Template 1.0
https://engineering.pinterest.com/
Thorben Primke
Commerce Team Making Pins Buyable
Who We Are
3Engineers at Pinterest
Lin Wang
Core Experience Team Efficiency / Stability / Dev-Velocity
Sizing
Text XS S M L XL Display XS S M L XL
Design System Layout System Typography Learnings
Grid
Grid Device Groups
https://design.google.com/devices/
Grid Device Groups Boints: Brio + Points
Grid Device Groups Boints: Brio + Points Design Specs
Sizing Leading
https://en.wikipedia.org/wiki/Leading
Sizing Leading Tracking
https://creativemarket.com/blog/2014/09/18/whats-the-difference-between-leading-kerning-and-tracking
Sizing Leading Tracking Word spacing
http://2.bp.blogspot.com/-Jo0rNkjo_AM/UlrWJMAXj0I/AAAAAAAAOlQ/-N8o737Xz0M/s1600/quads.gif
Sizing Leading Tracking Word spacing Auto Fitting Order History Bestellungsübe...
Bestellungsübersicht
Design System Layout System Typography Learnings
Brio Point Grid System
Brio Point Grid System
http://www.goodworklabs.com/ux-tips-to-promote-easier-self-service/
Brio Point
Grid System
Brio Point
Grid System
Boint-to-DP ratio
Device DP Width Device Category Device Horizontal dp per bt Vertical dp per bt sw160dp Watch LG G Watch 3 3 sw320dp Phone Samsung S6 4 4 sw480dp Note Galaxy Note 4 6 5 sw600dp Tablet Nexus 9 8 6
Boint-to-DP ratio
Device DP Width Device Category Device Horizontal dp per bt Vertical dp per bt sw160dp Watch sw320dp Phone sw480dp Note sw600dp Tablet
Boint-to-DP ratio
Device DP Width Device Category Device Horizontal dp per bt Vertical dp per bt sw160dp Watch LG G Watch sw320dp Phone Samsung S6 sw480dp Note Galaxy Note 4 sw600dp Tablet Nexus 9
Boint-to-DP ratio
Device DP Width Device Category Device Horizontal dp per bt Vertical dp per bt sw160dp Watch LG G Watch 3 3 sw320dp Phone Samsung S6 4 4 sw480dp Note Galaxy Note 4 6 5 sw600dp Tablet Nexus 9 8 6
Example on “320dp x 480dp” device
(horizontally and vertically)
Grid System
Grid System
Grid System
attentions than separators
Brio units
Custom Attributes in attrs.xml
Custom Attributes in attrs.xml
LayoutInflator.Factory as a hook
Extendable to styles.xml
Validation
Validation
Performance
Single LayoutInflator.Factory
Single LayoutInflator.Factory
Confusing custom attributes
Single LayoutInflator.Factory
Confusing custom attributes
No dimension support
Internal Brio conversion functions
Internal Brio conversion functions Performance
Readability
Domain Specific Language (DSL) for android Written in Kotlin Built on class extension
Readability
Performance
Usability
Design System Layout System Typography Learnings
Avoid Specifying Font Sizes 10 Text Styles Set Programmatically Set Via XML
Avoid Specifying Font Sizes 10 Text Styles Set Programmatically Set Via XML
New Attribute In XML Layout
Leading Tracking Word Spacing Font Size -> Value Map
Line spacing in TextView (API 1) Multiplier, Additive Value
Tracking or letter spacing (API 21) Values in “em”
What is a Span? Links
What is a Span? Links Bold
What is a Span? Links Bold Image
What is a Span? Links Bold Image Scaling
ScaleXSpan Non-Breaking Space Increase/Decrease Space Width
1) Original Text 2) Split using BreakIterator 3) Non-breaking space is inserted before each character (\u00A0)
4) The space character is then wrapped with a ScaleXSpan 5) Text is post-processed to reduce the space at the beginning of a line with StaticLayout
No TextView Support Span technique
Internationalization Single Line Only Max Reduce Two Text Styles Last Option Ellipsis Order History Bestellungsübe...
Bestellungsübersicht
View Width Required StaticLayout
View Width StaticLayout
Tracking / Letter Spacing
Word Spacing
Auto Fitting
Design System Layout System Typography Learnings
Multiple Options
Multiple Options
Single Layout Inflator’s Factory (Not Solved)
Hooks into LayoutInflater
Hooks into LayoutInflater
Hooks into LayoutInflater
Hooks into LayoutInflater
Demands can be met
Out Of Box - Best! Span Hack
Powerful UI Component Span
Performance impact
Brio Grid
Screen Overlay Requires Screen Draw Permission
Brio Grid
Screen Overlay Requires Screen Draw Permission
Rhythm
Part Of Layout Layout Wrapped in Rhythm Layout
https://github.com/Actinarium/Rhythm
Pinterest Template 1.0
Thorben Primke: @tprimke thorben@pinterest.com Lin Wang: linwang@pinterest.com https://engineering.pinterest.com/