https engineering pinterest com
play

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 /


  1. https://engineering.pinterest.com/ Pinterest Template 1.0

  2. Pushing The Boundaries Of The Layout System And Typography

  3. Who We Are Engineers at Pinterest Lin Wang Thorben Primke Core Experience Team Commerce Team Efficiency / Stability / Dev-Velocity Making Pins Buyable 3

  4. - Catalog of Ideas Confidentia l

  5. Discover

  6. Discover Save

  7. Typography Text Sizing XS S M L XL Display XS S M L XL

  8. Discover Save Do

  9. Design System Layout System Typography Learnings 9

  10. Design System aka Brio

  11. One Framework For All Platforms

  12. Layout Grid

  13. Layout Grid Device Groups https://design.google.com/devices/

  14. Layout Grid Device Groups Boints: Brio + Points

  15. Layout Grid Device Groups Boints: Brio + Points Design Specs

  16. Typography Sizing Leading https://en.wikipedia.org/wiki/Leading

  17. Typography Sizing Leading Tracking https://creativemarket.com/blog/2014/09/18/whats-the-difference-between-leading-kerning-and-tracking

  18. Typography Sizing Leading Tracking Word spacing http://2.bp.blogspot.com/-Jo0rNkjo_AM/UlrWJMAXj0I/AAAAAAAAOlQ/-N8o737Xz0M/s1600/quads.gif

  19. Typography Order History Sizing Leading Tracking Bestellungsübe... Word spacing Bestellungsübersicht Auto Fitting

  20. Design System Layout System Typography Learnings 20

  21. Layout System Brio Point Grid System

  22. Layout System Brio Point Grid System http://www.goodworklabs.com/ux-tips-to-promote-easier-self-service/

  23. Layout System Brio Point - Unit of measurement - Device size independent Grid System

  24. Layout System Brio Point - Unit of measurement - Device size independent Grid System - Fixed 12 gray columns - 13 white gutters - Focus on contents - Ignore small platform differences

  25. B rio P oint Boint-to-DP ratio Device DP Device Device Horizontal dp Vertical dp Width Category per bt 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

  26. B rio P oint Boint-to-DP ratio Device DP Device Device Horizontal dp Vertical dp Width Category per bt per bt sw160dp Watch sw320dp Phone sw480dp Note sw600dp Tablet

  27. B rio P oint Boint-to-DP ratio Device DP Device Device Horizontal dp Vertical dp Width Category per bt per bt sw160dp Watch LG G Watch sw320dp Phone Samsung S6 sw480dp Note Galaxy Note 4 sw600dp Tablet Nexus 9

  28. B rio P oint Boint-to-DP ratio Device DP Device Device Horizontal dp Vertical dp Width Category per bt 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

  29. B rio P oint Example on “320dp x 480dp” device 1 brio point = 4 dp - (horizontally and vertically)

  30. Brio Grid Grid System 12 columns - 13 gutters -

  31. Brio Grid Grid System 12 columns - 13 gutters - Fixed gutter width: 4 brio points - Variable column width -

  32. Brio Grid Grid System 12 columns - 13 gutters - Fixed gutter width: 4 brio points - Variable column width - Graphical objects aligned on columns - Graphical objects acquire more - attentions than separators

  33. Brio Grid Brio units

  34. Brio Grid

  35. Brio Grid

  36. Brio Grid

  37. Brio Grid

  38. Brio in XML Custom Attributes in attrs.xml

  39. Brio in XML Custom Attributes in attrs.xml

  40. Example: ListCell

  41. Example: ListCell

  42. Example: ListCell

  43. Custom Attribute Extraction LayoutInflator.Factory as a hook

  44. Custom Attribute Extraction Extendable to styles.xml

  45. Custom Attribute Extraction Validation - Custom Lint Rule - implement ResourceXmlDetector - Publish in the lint.jar

  46. Custom Attribute Extraction Validation - Custom Lint Rule - implement ResourceXmlDetector - Publish in the lint.jar Performance - Minimum extra work

  47. Problems Single LayoutInflator.Factory - Impossible for multi-customization

  48. Problems Single LayoutInflator.Factory - Impossible for multi-customization Confusing custom attributes - android:layout_width vs. brio:layout_width

  49. Problems Single LayoutInflator.Factory - Impossible for multi-customization Confusing custom attributes - android:layout_width vs. brio:layout_width No dimension support Brio units cannot be used as dimensions -

  50. Do it in Java Internal Brio conversion functions

  51. Do it in Java Internal Brio conversion functions Performance - Most efficient without xml parsing Readability - Poor, boilerplate code

  52. Anko Domain Specific Language (DSL) for android Written in Kotlin Built on class extension

  53. Anko

  54. Anko Readability - As clear as xml Performance - No xml parsing, same as Do it in Java Usability Most xml attributes are defined in DSL - Easy to add if not -

  55. Design System Layout System Typography Learnings 55

  56. Typography

  57. Text Sizing Avoid Specifying Font Sizes 10 Text Styles Set Programmatically Set Via XML

  58. Text Sizing Avoid Specifying Font Sizes 10 Text Styles Set Programmatically Set Via XML

  59. Text Sizing New Attribute In XML Layout

  60. Text Sizing Leading Tracking Word Spacing Font Size -> Value Map

  61. Leading Support Line spacing in TextView (API 1) Multiplier, Additive Value

  62. Tracking Support Tracking or letter spacing (API 21) Values in “em”

  63. Tracking Support - <21?

  64. Tracking - Span? What is a Span ? Links

  65. Tracking - Span? What is a Span ? Links Bold

  66. Tracking - Span? What is a Span ? Links Bold Image

  67. Tracking - Span? What is a Span ? Links Bold Image Scaling

  68. Tracking Support ScaleXSpan Non-Breaking Space Increase/Decrease Space Width

  69. Tracking Support 1) Original Text 2) Split using BreakIterator 3) Non-breaking space is inserted before each character ( \u00A0 )

  70. Tracking Support 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

  71. Word Spacing Support No TextView Support Span technique

  72. Demo

  73. Demo

  74. Demo

  75. Auto Fitting Support Internationalization Order History Single Line Only Max Reduce Two Text Styles Bestellungsübe... Last Option Ellipsis Bestellungsübersicht

  76. Auto Fitting Support View Width Required StaticLayout

  77. Auto Fitting Support View Width StaticLayout

  78. Performance Tracking / Letter Spacing - 2-5 ms Word Spacing - 0-1 ms Auto Fitting - 0-1 ms

  79. Design System Layout System Typography Learnings 79

  80. Layout System Multiple Options - XML - Do it in Java - Anko/Kotlin

  81. Layout System Multiple Options - XML - Do it in Java - Anko/Kotlin Single Layout Inflator’s Factory (Not Solved) - Impossible for multi-customization

  82. Generic Layout Inflater Hooks into LayoutInflater - Brio - Calligraphy - Custom views - A/B Experiments

  83. Generic Layout Inflater Hooks into LayoutInflater - Brio - Calligraphy - Custom views - A/B Experiments

  84. Generic Layout Inflater Hooks into LayoutInflater - Brio - Calligraphy - Custom views - A/B Experiments

  85. Generic Layout Inflater Hooks into LayoutInflater - Brio - Calligraphy - Custom views - A/B Experiments

  86. Typography Demands can be met Out Of Box - Best! Span Hack Powerful UI Component Span Performance impact

  87. Visual Tools Brio Grid Screen Overlay Requires Screen Draw Permission

  88. Visual Tools Brio Grid Screen Overlay Requires Screen Draw Permission Rhythm Part Of Layout Layout Wrapped in Rhythm Layout https://github.com/Actinarium/Rhythm

  89. Question? Thorben Primke: @tprimke thorben@pinterest.com We Are Hiring! Lin Wang: https://engineering.pinterest.com/ linwang@pinterest.com Pinterest Template 1.0

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend