<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chris DePaul on Medium]]></title>
        <description><![CDATA[Stories by Chris DePaul on Medium]]></description>
        <link>https://medium.com/@cdepaul?source=rss-d1ad971085ae------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0CaGDSjD6gMN6NfvfDzvlQ.jpeg</url>
            <title>Stories by Chris DePaul on Medium</title>
            <link>https://medium.com/@cdepaul?source=rss-d1ad971085ae------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 12:09:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cdepaul/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Van Gogh, InVision Design System Manager and a new NPM package]]></title>
            <link>https://medium.com/@cdepaul/van-gogh-invision-design-system-manager-and-a-new-npm-package-3833c20ff778?source=rss-d1ad971085ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/3833c20ff778</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[styled-components]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Chris DePaul]]></dc:creator>
            <pubDate>Mon, 20 Apr 2020 15:45:58 GMT</pubDate>
            <atom:updated>2020-04-20T15:45:58.032Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0NLQ313eaQyiMIFY_X_lqQ.jpeg" /></figure><blockquote>“Great things are not done by impulse, but by a series of small things brought together. And great things are not accidental, but must certainly be willed.”<br> — Vincent van Gogh</blockquote><p>Last month, Rangle became an InVision Partner and the developers at Rangle leapt at the opportunity to play around with<a href="https://www.invisionapp.com/design-system-manager"> InVision’s Design System Manager (DSM)</a>.</p><p>After building a sample project, I created <a href="https://www.npmjs.com/package/invision-dsm-utils">invision-dsm-utils</a>, a Node.js package to support front-end developers with:</p><ul><li>Downloading InVision DSM design tokens into their projects, and</li><li>Transforming those design tokens into JavaScript objects that meet the Styled System Theme Specification.</li></ul><p>In this article, I’ll take you through the use cases for the scripts and how you can integrate this library into your development process.</p><h3>Sample Project</h3><p>As a developer in Amsterdam, I have been looking for an excuse to work on a side-project that could incorporate Vincent van Gogh — one of the Netherland’s most famous exports — in some way. With InVision DSM in mind, I came up with a small app idea that could be designed in Sketch, uploaded to InVision DSM, and developed in React.</p><p>I called this project, <strong>WhereVanGogh</strong>: An app that provides the museum location of publicly available van Gogh works of art.</p><h3>The Sample Design</h3><p>Here is the design I made for a <em>Painting</em> page, developed in Sketch and uploaded to InVision DSM. Note, the images have a public-domain license from museums like<a href="https://www.rijksmuseum.nl/en/photoservice"> Rijkmuseum</a> and<a href="https://www.metmuseum.org/about-the-met/policies-and-documents/image-resources"> The Metropolitan Museum of Art</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s5pfpWf35dM6cWZpeZ07rw.png" /></figure><h3>Integrating design tokens into code base</h3><p>Designing the page layout in Sketch in a manner that would integrate with InVision DSM was straight forward and well supported by InVision’s excellent documentation (see below).</p><p>When it came time to develop my React components, I knew I wanted to:</p><ol><li>Utilize the design tokens provided by InVision DSM</li><li>Build the components using styled-components and styled-system</li></ol><p>Out of the box, achieving this would require some manual effort; and that’s not fun for anyone.</p><p>Specifically, the two manual interventions were:</p><ul><li><strong>Integrating the design tokens into the code base:</strong> The DSM provides you with nine URLs to different design token file types, leaving it up to you to decide how to integrate them into your project (i.e. download and distribute them in your bundle).</li><li><strong>Transforming the design token schema into a Styled System theme:</strong> The design token files use a schema that is not the same as the <a href="https://styled-system.com/theme-specification/">styled-system theme schema</a>, so manual mapping from one schema to the other is required.</li></ul><h3>Developing some handy Node scripts</h3><p>I sought to solve this problem through<a href="https://www.npmjs.com/package/invision-dsm-utils"> a couple of Node.js scripts</a> that Rangle has now released with an MIT license and has made available on the NPM registry. The package is called <a href="https://github.com/rangle/invision-dsm-utlities">invision-dsm-utils</a> and it currently contains two scripts:</p><ol><li><strong>Download</strong>: Download design token files from InVision DSM</li><li><strong>Transform</strong>: Transform those design tokens into a JavaScript object that meets the<a href="https://styled-system.com/theme-specification"> Styled System Theme Specification</a></li></ol><h3>Installation</h3><p>npm install --dev invision-dsm-utils</p><h3>Download design tokens in JSON</h3><p>invision-dsm-utils download json ./src</p><h3>Set-up configuration file .invisiondsmutilsrc</h3><pre>{<br>    dsmExportUrl: string,<br>    key: string<br>}</pre><h3>Transform JSON into JavaScript object that meets the Styled System Theme Specification</h3><p>invision-dsm-utils transform ./src/style-data.json ./src/theme.dsm.js</p><h3>Use scripts in development flow</h3><p>In my React app, I added these scripts into my package.json as follows:</p><pre>{<br> &quot;scripts&quot;: {<br>    &quot;tokens:download&quot;: &quot;invision-dsm-utils download json ./src&quot;,<br>    &quot;tokens:transform&quot;: &quot;invision-dsm-utils transform ./src/style-data.json ./src/theme.dsm.js&quot;<br>  }<br>}</pre><p>You can be even more creative with this by triggering these scripts on a postinstall.</p><h3>Use theme in App</h3><pre>import React, { Component } from &#39;react&#39;;<br>import { ThemeProvider } from &#39;styled-components&#39;;</pre><pre>import themeDSM from &#39;./src/theme.dsm&#39;;</pre><pre>// You could add additional values to themeDSM by<br>// extending the object<br>const theme = {<br>   ...themeDSM,<br>   space: [0, 4, 8, 16, 32, 64, 128, 256, 512],<br>};</pre><pre>class App extends Component {<br>    render() {	<br>       return (<br>           &lt;ThemeProvider theme={theme}&gt;<br>		&lt;div&gt;Example&lt;/div&gt;<br>	    &lt;/ThemeProvider&gt;</pre><pre>	);<br>     }  <br>}</pre><pre>export default App;</pre><h3>Contribute to package</h3><p><a href="https://github.com/rangle/invision-dsm-utlities">invision-dsm-utils</a> is an open source project and we encourage you to submit pull requests to improve and extend this library for your InVision DSM needs.</p><h3>About Rangle and InVision partnership</h3><p><a href="https://rangle.io/blog/rangle-becomes-invision-partner/">Rangle and InVision are proud to announce a strategic partnership</a>, enabling Rangle to advise InVision’s clients on successful approaches to Design Systems and Design Operations. This new offering will cover a wide range of topics, including building and maintaining a design system using InVision Design System Manager, ensuring wide adoption, and methods to improve collaboration between designers and developers.</p><h3>Recommended InVision DSM documentation</h3><p>InVision has done an exceptional job creating documentation and content for InVision Design System Manager. As a first time user of their system, I used the following resources to get my project up and running.</p><ul><li><a href="https://www.invisionapp.com/design-system-manager/learn">Explore the Possibilities of InVision DSM</a> [Video]</li><li><a href="https://support.invisionapp.com/hc/en-us/articles/115005685166-Intro-to-DSM">Intro to DSM</a></li><li><a href="https://support.invisionapp.com/hc/en-us/articles/207773013-Using-Craft-by-InVision">Using Craft by InVision</a></li><li><a href="https://www.invisionapp.com/inside-design/dsm-design-tokens/">A step-by-step guide to using design tokens in InVision DSM</a></li><li><a href="https://support.invisionapp.com/hc/en-us/articles/360029167532-DSM-in-Inspect">DSM in Inspect</a></li><li><a href="https://support.invisionapp.com/hc/en-us/sections/360004449791-Design-System-Manager-DSM-">Design System Manager Knowledge Base</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3833c20ff778" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Styled Components, Styled Systems and How They Work]]></title>
            <link>https://medium.com/rangle-io/styled-components-styled-systems-and-how-they-work-c667be460c19?source=rss-d1ad971085ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/c667be460c19</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[styled-components]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Chris DePaul]]></dc:creator>
            <pubDate>Thu, 12 Dec 2019 13:53:22 GMT</pubDate>
            <atom:updated>2019-12-12T15:30:00.842Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6o0TODDSyF17NGUj0F-Djw.png" /></figure><p>Sometimes the libraries that we use daily can seem a little bit like magic. By taking the time to understand the fundamental JavaScript features that make these libraries possible, we become better equipped to improve our use of those libraries, applying their functionality in unique and relevant ways.</p><p>In React, there are two libraries that work together to make the creation of presentational components very simple: styled-components and styled-system.</p><p>Here is an example of these libraries working together, courtesy of the <a href="https://styled-system.com/">styled-system documentation</a>.</p><pre>import styled from &#39;styled-components&#39;<br>import { color } from &#39;styled-system&#39;</pre><pre>const Box = styled.div`<br>  ${color}<br>`</pre><p>This code created a React component named Box that receives the props color and bg.</p><pre>&lt;Box color=&quot;#fff&quot; bg=&quot;tomato&quot;&gt;<br>  Tomato<br>&lt;/Box&gt;</pre><p>In this article I am going to cover:</p><ul><li>Generating React Components with Tagged Templates</li><li>Implementing a simple version of Styled Components</li><li>Diving into how styled-components and styled-systems actually operate together</li></ul><h3>Template Literals</h3><p>In order to understand how styled-components and styled-systems work, it&#39;s best to first understand where these libraries get their power from: Template Literals.</p><p>The most common use-case of Template Literals is string concatenation.</p><pre>// Template Literal<br>const string = `I am a template literal, because I am enclosed by the back-tick`;</pre><pre>// Template Literal with placeholder<br>const expressions = &#39;dynamic values&#39;;<br>const string = `I can contain ${expressions}`;</pre><p>Template Literals are clean, they are effective and they have been so well adopted for string concatenation that some of us (e.g. me) don’t even care how this syntax works, or realize that its functionality can be expanded upon.</p><h3>Template Literals and the preceding function</h3><p>When we implement Template Literals, something unintuitive happens: The contents of the Template Literal (e.g. the text and placeholders) are passed to a function.</p><p>Which function? In the two examples above, a <em>default function</em> with the job of concatenating the text and placeholders into a single string.</p><pre>const expressions = &#39;dynamic values&#39;;<br>const example = `I can contain ${expressions}`;</pre><pre>console.log(example);  // &gt;&gt; I can contain dynamic values</pre><p>But Template Literals are not confined to performing only string concatenations. JavaScript lets us use our own custom functions to do whatever we want with the text and placeholders within the Template Literal. This type of function is called a <em>Tag</em> and to use it, you simply reference the function name — the Tag — in front of the Template Literal. Doing this results in the creation of a Tagged Template.</p><p>For example, here is a simple function that does not accept any parameters and prints a static message to the console.</p><pre>const printStaticMessage = () =&gt; { console.log(&#39;My static message&#39;); }</pre><p>We can invoke this function in two ways: As a traditional function call and as a Tagged Template.</p><pre>printStaticMessage();  // &gt;&gt;&gt; My static message<br>printStaticMessage``;  // &gt;&gt;&gt; My static message</pre><p>Notice that each invocation generated the same result. So, we can conclude that Tagged Templates are just an alternative way to invoke a function.</p><h3>Using the Template Literal as Arguments for the Tag</h3><p>A more useful Tagged Template would utilize the text and placeholders within the Template Literal. Let’s create a Tag that prints out its arguments.</p><pre>const printArguments = (...args) =&gt; { console.log(...args); }</pre><pre>const var1 = &quot;my&quot;;<br>const var2 = &quot;message&quot;</pre><pre>printArguments`This is ${var1} custom ${var2}!`;<br>// <br>//   [&quot;This is &quot;,&quot; custom &quot;,&quot;!&quot;],<br>//   &quot;my&quot;,<br>//   &quot;message&quot;<br>//</pre><p>The first argument is an array of strings that represent the text in the Template Literal, separated into elements based on the location of the placeholders.</p><p>The remaining <em>n</em> arguments are strings with the value of each placeholder, ordered based on when they are defined in the Template Literal.</p><p>Knowing that these are the arguments that Tags receive, we can guess what the implementation of the default Template Literals concatenation function looks like:</p><pre>const defaultFunction = (stringArray, ...values) =&gt; {<br>  return stringArray.reduce((acc, str, i) =&gt; {<br>    return values[i] ? acc + str + values[i] : acc + str;<br>  }, &#39;&#39;);<br>}</pre><pre>const var1 = &quot;my&quot;;<br>const var2 = &quot;message&quot;</pre><pre>const example = defaultFunction`This is ${var1} custom ${var2}!`;<br>console.log(example);  // &gt;&gt;&gt; This is my custom message!</pre><h3>Passing functions into the Tagged Template</h3><p>Since the Tag is simply receiving the Template Literal placeholders as argument variables, those variables can contain any JavaScript object, like a number, string or function. Here is an non-useful example where we pass a function in the Template Literal placeholder and execute it in the Tag.</p><pre>const executeFirstPlaceholder = (textArray, placeholder) =&gt; {<br>  placeholder();<br>}</pre><pre>executeFirstPlaceholder`${() =&gt; { console.log(&#39;first placeholder&#39;)}}`; </pre><pre>// &gt;&gt;&gt; first placeholder</pre><h3>Returning functions from a Tagged Template</h3><p>Like any other function in JavaScript, a Tagged Template can return objects, strings, numbers, and, of course, functions.</p><pre>const multiply = (multiple) =&gt; (num) =&gt;<br>	parseInt(num[0]) * parseInt(multiple[0]);</pre><pre>const double = multiply`2`<br>const result = double`4`;</pre><pre>console.log(result);  // &gt;&gt;&gt; 8</pre><h3>Making the leap to React</h3><p>React’s “function components” are very simply JavaScript functions that can be rendered into the DOM. Here is an example of a Tagged Template returning a React function component.</p><pre>const withGreeting = ([greeting]) =&gt; <br>  ({ name }) =&gt; &lt;h1&gt;{greeting}, {name}!&lt;/h1&gt;;</pre><pre>const Greet = withGreeting`Greetings`;</pre><pre>// Render component<br>&lt;Greet name=&quot;Chris&quot; /&gt;</pre><pre>// Renders in DOM<br>&lt;h1&gt;Greetings, Chris&lt;/h1&gt;</pre><p>This is the crux for how Styled Components generate React components.</p><h3>Styled Components</h3><blockquote><em>Utilising tagged template literals (a recent addition to JavaScript) and the power of CSS, styled-components allows you to write actual CSS code to style your components. It also removes the mapping between components and styles — using components as a low-level styling construct could not be easier!</em></blockquote><blockquote><a href="https://www.styled-components.com/">https://www.styled-components.com</a></blockquote><p>Styled Components use Tagged Templates to return React components.</p><p>In the following example, styled.h1 is used to create a simple React component containing a &lt;h1&gt; HTML tag, display using the CSS styles specified within the Template Literal</p><pre>import styled from &#39;styled-components&#39;;</pre><pre>const Title = styled.h1`color: blue;`;</pre><pre>// Render<br>&lt;Title&gt;Regular Title&lt;/Title&gt;</pre><pre>// Renders to DOM<br>&lt;h1 style=&quot;color: blue;&quot;&gt;Regular Title&lt;/h1&gt;</pre><p>The styled object contains keys named after common HTML tags — like H1, H2, and div. These keys reference a function that can be used as the Tag in a Tagged Template.</p><h3>A simple implementation of styled.h1</h3><p>Let’s try to make a simple implementation of styled.h1. At it&#39;s simplest, the styled.h1 function receives the CSS styles in the back-ticks and transforms them into a style object that it attaches to the underlying element (e.g. h1).</p><pre>const styledH1 = ([styles]) =&gt; ({ children })=&gt; {<br>  const lines = styles<br>                  .split(&#39;;&#39;)<br>                  .map(line =&gt; line.trim())<br>                  .filter(line =&gt; line !== &quot;&quot;)</pre><pre>  // Function courtesy of mck89 on StackOverflow<br>  const convertToCamelCase = (key) =&gt;<br>    key.replace(/-([a-z])/g, (x, up) =&gt; up.toUpperCase())</pre><pre>  const style = lines.reduce((acc, line) =&gt; {<br>    const lineParsed = line.split(&#39;:&#39;);<br>    const key = convertToCamelCase(lineParsed[0]);<br>    const val = lineParsed[1];<br>    return { ...acc, [key]: val };<br>  }, {});</pre><pre>  return &lt;h1 style={style}&gt;{children}&lt;/h1&gt;<br>}</pre><pre>const H1 = styledH1`<br>  color: red;<br>  font-size: 18px;<br>`;</pre><pre>// Render<br>&lt;H1&gt;Hello&lt;/H1&gt;</pre><pre>// Renders in DOM<br>&lt;h1 style=&quot;color: red; font-size: 18px;&quot;&gt;Hello&lt;/h1&gt;</pre><p>At this point, the style we are passing to the function is hard coded and fixed; not able to dynamically change, based on the prop values the component receives.</p><p>Let’s look at how the ability to pass functions into our tagged templates can enable things to become more dynamic.</p><h3>Using functions to access Props in Template Literals and Styled Components</h3><p>As discussed we discussed, a function passed to a Template Literal placeholder can be executed. Styled Components utilize this feature to generate dynamic styles.</p><pre>import styled from &#39;styled-components&#39;;</pre><pre>const Button = styled.button`<br>  color: ${ (props) =&gt; props.primary ? &#39;blue&#39; : &#39;red&#39; };<br>`;</pre><pre>class StyledComponentsDemo extends Component { <br>  render() {<br>    return(<br>      &lt;&gt;<br>      &lt;Button primary&gt;Primary&lt;/Button&gt;<br>      &lt;Button&gt;Secondary&lt;/Button&gt;<br>      &lt;Button primary <br>              onSubmit={() =&gt; handleSubmit()}&gt;Submit<br>      &lt;/Button&gt;<br>     &lt;/&gt;<br>    )<br>  }<br>}</pre><p>When the Styled Component is rendered, each function in the Template Literal is passed the component’s props and those props can be used to impact the presentation of the component.</p><p>Note: not all props passed to a Styled Component need to impact the presentation (e.g. onSubmit); they could also be used only by the underlying HTML element.</p><h3>Styling regular, custom components</h3><p>Styled Components allow you to style any custom component that you’ve created. First, the custom component must receive the prop className and pass it to the underlying DOM element. Once that is done, pass the custom component to the styled function and invoke it as a Tagged Template to receive a new Styled Component.</p><pre>import styled from &#39;styled-components&#39;;</pre><pre>const Button = ({ className, children }) =&gt; <br>  &lt;button className={className}&gt;{children}&lt;/button&gt;</pre><pre>const ButtonBlue = styled(Button)`color: blue`;</pre><pre>// Render<br>&lt;ButtonBlue&gt;Blue Button&lt;/ButtonBlue&gt;</pre><h3>Styling the Styled Components</h3><p>Styled Components uses the CSS preprocessor <a href="https://stylis.js.org/">stylis</a>, supporting SCSS-like syntax for automatically nesting styles.</p><pre>const Thing = styled.button`<br>  color: black;</pre><pre>  :hover {<br>    color: blue;<br>  }<br>`</pre><p>Within SCSS syntax, &amp; references the current component. You can also reference other components like you would reference any other type of selector (e.g. .class or #id) by simply referencing ${OtherComponentName} , but only if it is a Styled Component.</p><pre>import styled from &#39;styled-components&#39;;</pre><pre>const Item = styled.div`<br>   color: red;<br>`<br>const Container = styled.div`<br>   &amp; &gt; ${Item} {<br>      font-size: 2rem;<br>   }<br>`<br>class StyledComponentsDemo extends Component { <br>  render() {<br>    return(<br>      &lt;Container&gt;<br>        &lt;Item&gt;Item 1&lt;/Item&gt;<br>      &lt;/Container&gt;<br>    )<br>  }<br>}</pre><p>As you can see, we have the ability to not only specify the styles in our components, but also the ability to add some dynamic functionality. Building on this, we are able to better accommodate some common use cases such as adding themes to our applications.</p><h3>Using Themes</h3><p>Theming is accomplished by exporting the ThemeProvider component, passing an object to its theme prop, and wrapping the entire app in the ThemeProvider component. This will give every Styled Component access to the theme object.</p><pre>import styled, { ThemeProvider } from &#39;styled-components&#39;;</pre><pre>const Item = styled.div`<br>  color: ${( props ) =&gt; props.theme.color.primary}<br>`</pre><pre>const theme = {<br>  color: {<br>    primary: &#39;red&#39;<br>  }<br>}</pre><pre>class StyledComponentsDemo extends Component { <br>  render() {<br>    return(<br>      &lt;ThemeProvider theme={theme}&gt;<br>	      &lt;Item&gt;Item 1&lt;/Item&gt;<br>      &lt;/ThemeProvider&gt;<br>    )<br>  }<br>}</pre><p>Components that are <em>not S</em>tyled Components can also access theme by using the withTheme function.</p><pre>import { withTheme } from &#39;styled-components&#39;;</pre><pre>class MyComponent extends React.Component {<br>  render() {<br>    return &lt;p&gt;{this.props.theme.color.primary}&lt;/p&gt;<br>  }<br>}</pre><pre>export default withTheme(MyComponent);</pre><h3>Styled System</h3><blockquote><em>Styled System is a collection of utility functions that add style props to your React components and allows you to control styles based on a global theme object with typographic scales, colors, and layout properties.</em></blockquote><blockquote><a href="https://styled-system.com/">https://styled-system.com</a></blockquote><p>If you created a Button component from Styled Components and you want it to receive foreground and background color props, you can use the styled-system utility function color and pass it as a placeholder function in the Template Literal to enable these props.</p><pre>import styled, { ThemeProvider } from &#39;styled-components&#39;;<br>import { color } from &#39;styled-system&#39;</pre><pre>const theme = {<br>  colors: {<br>    primary: &#39;blue&#39;<br>  }<br>}</pre><pre>const Box = styled.div`<br>  ${color}<br>`</pre><pre>class StyledSystemDemo extends Component {<br>  render() {<br>    return (<br>      &lt;ThemeProvider theme={theme}&gt;<br>        &lt;&gt;<br>          &lt;Box color=&quot;#fff&quot; bg=&quot;tomato&quot;&gt;Tomato&lt;/Box&gt;<br>          &lt;Box color=&quot;white&quot; bg=&quot;primary&quot;&gt;Tomato&lt;/Box&gt;<br>        &lt;/&gt;<br>      &lt;/ThemeProvider&gt;<br>    )<br>  }<br>}</pre><p>Note: The name of the generated props are all outlined in the <a href="https://styled-system.com/api/">styled system API</a>.</p><p>If there is a theme available, the utility function will try to match the prop value to the theme before using the value as the raw value (e.g. #fff).</p><h3>Structuring Theme objects</h3><p>The structure of the theme object and styled-system are tightly coupled. The structure follows a Work-in-Progress specification called <a href="https://system-ui.com/theme/">System UI Theme Specification</a>.</p><p>For instance, the fontSizes and colors keys follow this specification, and their values (arrays or objects) also follow this specification.</p><pre>export const theme = {<br>   fontSizes: [<br>      12, 14, 16, 20, 24, 32<br>   ]<br>   fontSizes.body = fontSizes[1]<br>   colors: {<br>      blue: &#39;#07c&#39;,<br>      green: &#39;#0fa&#39;,<br>   }<br>}</pre><p>With the above theme, the fontSize prop on a component could receive the index value of the array, or the alias body.</p><h3>Under the hood of color</h3><p>Let’s look at how styled-system implements the utility function color. Remember that a utility function is called like this:</p><pre>const Button = styled.div`<br>   ${color}<br>`</pre><p>This is what the function looks like.</p><pre>// &lt;https://github.com/styled-system/styled-system/blob/v2.3.6/src/styles.js&gt;</pre><pre>export const color = props =&gt; ({<br>  ...textColor(props),<br>  ...bgColor(props)<br>})</pre><p>Which is akin to writing this in the Template Literal:</p><pre>const Button = styled.div`<br>   ${(props) =&gt; ({<br>      ...textColor(props),<br>      ...bgColor(props)<br>   })}<br>`</pre><p>The textColor and bgColor functions will return style objects that are spread within the function. These functions look like this.</p><pre>// &lt;https://github.com/styled-system/styled-system/blob/v2.3.6/src/styles.js&gt;</pre><pre>export const textColor = responsiveStyle({<br>  prop: &#39;color&#39;,<br>  key: &#39;colors&#39;, // theme key<br>})</pre><pre>export const bgColor = responsiveStyle({<br>  prop: &#39;bg&#39;,<br>  cssProperty: &#39;backgroundColor&#39;,<br>  key: &#39;colors&#39;<br>})</pre><p>The responsiveStyle function handles all the breakpoints, fallbacks and prop naming. Below, I simplified the styled-system code for demonstrative purposes.</p><pre>// &lt;https://github.com/styled-system/styled-system/blob/v2.3.6/src/util.js&gt;<br>// I simplified this for demonstrative purposes</pre><pre>export const responsiveStyle = ({<br>  prop,<br>  cssProperty,<br>  key,<br>}) =&gt; {<br>  const fn = props =&gt; {<br>    cssProperty = cssProperty || prop<br>    const n = props[prop];<br>    const theme = props.theme;<br>		<br>    // ...<br>		<br>    return {<br>      [cssProperty]: theme[key][n]<br>    } <br>    <br>    // ...</pre><pre>  }</pre><pre>  return fn<br>}</pre><p>Which can be represented to look something like this:</p><pre>const Button = styled.div`<br>   {<br>     ${...(props) =&gt; (<br>         { color: props.theme[&#39;colors&#39;][props.color] }<br>     )}<br>     ${...(props) =&gt; (<br>         { backgroundColor: props.theme[&#39;colors&#39;][props.bg] }<br>     )}<br>   }<br>`</pre><h3>Breakpoints and responsive themes</h3><p>For responsive themes, styled-system lets you establish breakpoints in the theme and then lets you pass an array as a prop with different values for each breakpoint. styled-system takes a mobile first approach, so the first index will always be the smallest breakpoint.</p><pre>&lt;Box<br>  width={[<br>    1, // 100% below the smallest breakpoint (all viewports)<br>    1 / 2, // 50% from the next breakpoint and up<br>    1 / 4, // 25% from the next breakpoint and up<br>  ]}<br>/&gt;</pre><pre>// theme.js<br>const breakpoints = [&#39;40em&#39;, &#39;52em&#39;, &#39;64em&#39;, &#39;80em&#39;]</pre><pre>export default { breakpoints };</pre><h3>Conclusion</h3><p>I was inspired to see how the developers of styled-components and styled-system employed the extended functionality of Template Literals and Tagged Templates to provide users with an intuitive way for adding SCSS to React components.</p><p>Have you seen any interesting uses of common functionality in your work recently? Please share!</p><h3>Sources</h3><p><a href="https://styled-system.com/">Styled System</a></p><p><a href="https://www.styled-components.com/">Styled Components</a></p><p><a href="https://mxstbr.blog/2016/11/styled-components-magic-explained/">The magic behind 💅 styled-components</a></p><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals">MDN Web Docs: Template Literals</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c667be460c19" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rangle-io/styled-components-styled-systems-and-how-they-work-c667be460c19">Styled Components, Styled Systems and How They Work</a> was originally published in <a href="https://medium.com/rangle-io">Rangle.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing an Amsterdam Blog with Gatsby, Netlify and Jet Lag]]></title>
            <link>https://medium.com/rangle-io/developing-an-amsterdam-blog-with-gatsby-netlify-and-jet-lag-8d5685da9d44?source=rss-d1ad971085ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d5685da9d44</guid>
            <category><![CDATA[gatsbyjs]]></category>
            <category><![CDATA[auth0]]></category>
            <category><![CDATA[amsterdam]]></category>
            <category><![CDATA[netlify]]></category>
            <category><![CDATA[netlifycms]]></category>
            <dc:creator><![CDATA[Chris DePaul]]></dc:creator>
            <pubDate>Mon, 30 Sep 2019 20:20:07 GMT</pubDate>
            <atom:updated>2019-09-30T20:34:16.222Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wybVHhi3mDynmQu7-gAjFA.png" /></figure><p>This past weekend, my family and I relocated to Amsterdam for the opening of <a href="https://rangle.io/amsterdam/">Rangle’s first European office</a>. When we left our home in Toronto, friends and family said <em>farewell</em> and told us to post lots of photos and send updates to them back home.</p><p>We decided that the best thing we could do to document our year abroad — for our family and our future selves — is to keep a personal blog that we’d fill with our reflections and stories over the year.</p><p>We don’t want the blog to be shared widely or <em>ever</em> go viral, so in deciding the blog framework to use, I thought it best if we created the blog ourselves, away from the popular community blog websites.</p><p><strong>My design criteria for developing the blog was as follows:</strong></p><ul><li>Be very quick to set-up</li><li>Be very affordable to host and manage</li><li>Be very easy for my partner and I to update</li></ul><p>I decided the best solution was to use the static-site generator <a href="http://gatsbyjs.org/">Gatsby</a>, with code hosted on <a href="https://github.com/">GitHub</a>, deployments handled by <a href="https://netlify.com/">Netlify</a>, content managed using <a href="https://netlifycms.org/">Netlify CMS</a> and password protection managed by <a href="http://auth0.com/">Auth0</a>.</p><p>Here is how I built my family’s Amsterdam blog on the second day of arriving — through the fog of jet lag.</p><h3>Install Gatsby CLI</h3><pre>npm install -g gatsby-cli</pre><h3>Create Gatsby project using a starter</h3><p>I used the gatsby-blog-starter to provide the scaffolding for our project.</p><pre>gatsby new amsterdam-blog https://github.com/gatsbyjs/gatsby-starter-blog</pre><p>Open the newly created project:</p><pre>cd amsterdam-blog</pre><h3>Run locally</h3><p>To confirm everything is set up correctly and to see the default behaviour of the starter, run the project locally:</p><pre>gastby develop</pre><p>There should be three blog posts in the browser, with a default header and footer.</p><p>In the root of the amsterdam-blog folder, there is a subfolder called content that looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*neq_9YYnAx1gDmqu.png" /></figure><p>These markdown files *.md are what generate the blog&#39;s content.</p><h3>Set-up GitHub repository</h3><p>In GitHub, create a New Repository. Set the repository name to amsterdam-blog and chose the Private option.</p><p>In the terminal, add the the GitHub repository to your local repo:</p><pre>git remote add origin &lt;your-github-ssh-address&gt;</pre><p>Push the local changes to GitHub:</p><pre>git push -u origin master</pre><h3>Create a Netlify account &amp; set-up automated deployments</h3><p>Go to <a href="https://www.netlify.com/">Netlify</a> and create a free account (I signed up using GitHub). Once logged in, connect the GitHub repository created above to Netlify:</p><ul><li>Select <strong>Sites</strong> &gt; <strong>New site from Git</strong></li><li>Select <strong>Continuous Deployment</strong> &gt; <strong>GitHub</strong></li><li>Authorize access to GitHub, if prompted</li><li>Select the repository <strong>amsterdam-blog</strong></li><li>Keep the default selections</li><li><strong>Deploy site</strong></li></ul><p>The site will be deployed to the public domain displayed at the top of the overview page.</p><h3>Add Netlify CMS to publish content</h3><p>Manually writing blog posts in markdown and storing them in the /content/blog folder doesn&#39;t seem like a convenient solution for my partner and I to publish content. Instead, set up Netlify CMS.</p><pre>npm install --save netlify-cms-app gatsby-plugin-netlify-cms</pre><p>Add the plugin to the gatsby-config.js somewhere in the existing plugin array:</p><pre>plugins: [     <br>       { ...other plugins },     <br>       &#39;gatsby-plugin-netlify-cms&#39;,<br>       { ...other plugins } <br>]</pre><h3>Add Identity to Netlify account</h3><p>Users must have credentials and be authorized to access Netlify CMS. To enable Netlify Identity:</p><ul><li>On the Netlify project page, select <strong>Settings</strong></li><li>Select <strong>Identity</strong> &gt; <strong>Enable Identity</strong></li><li>Scroll down to <strong>Registration</strong> &gt; <strong>Edit Settings</strong> &gt; <strong>Invite Only</strong> to allow only invited users to edit your blog</li><li>Scroll down to <strong>Services</strong> and selected <strong>Enable Git Gateway</strong></li></ul><h3>Configure Netlify CMS</h3><p>Within the static folder of the Gastby project, create a folder named admin and within that folder create a file named config.yml.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fJZLzNL4FHmS-JEL.png" /></figure><p>Open the config.yml file and add the following content:</p><pre>backend:   <br>    name: git-gateway<br>    branch: master  <br>    <br>media_folder: static/img <br>public_folder: /img  <br><br>collections:   <br>- name: &quot;blog&quot;<br>  label: &quot;Blog&quot;<br>  folder: &quot;content/blog&quot;<br>  create: true<br>  slug: &quot;{{year}}-{{month}}-{{day}}-{{slug}}&quot;<br>  editor:<br>      preview: false<br>  fields:<br>  - { label: &quot;Title&quot;, name: &quot;title&quot;, widget: &quot;string&quot; }<br>  - { label: &quot;Publish Date&quot;, name: &quot;date&quot;, widget: &quot;datetime&quot; }<br>  - { label: &quot;Description&quot;, name: &quot;description&quot;, widget: &quot;string&quot; }<br>  - { label: &quot;Body&quot;, name: &quot;body&quot;, widget: &quot;markdown&quot; }</pre><h3>Invite authors</h3><p>Invite people to be blog authors:</p><ul><li>Go to <strong>Netlify</strong></li><li>Select <strong>Identity</strong> in the top menu &gt; <strong>Invite Users</strong> &gt; <strong>Input an email address</strong> (try yours first)</li><li>An email invite should be sent to the user.</li><li>Click the link to confirm the registration and create a password</li><li>User is logged into the blog’s CMS</li></ul><h3>Write a post</h3><p>Write the first post.</p><ul><li>Log into the CMS by going to https://&lt;your-blog&gt;.com/admin</li><li>Select <strong>New Blog</strong></li><li>Complete each of the fields in the blog authoring page</li><li>Add an image</li><li>Select <strong>Publish</strong></li></ul><p>When you select <strong>Publish</strong> the changes will not appear on the live website immediately.</p><p>What happens when you click Publish is the Netlify CMS takes your content and commits it to your GitHub repo in a file located at content/blog (markdown) and static/img (images). Go have a look at your GitHub commit history to prove it!</p><p>This commit prompts the Netlify Continuous Deployment to trigger and redeploy the website with the new blog post.</p><p>After a rebuild on Netlify, the new blog post will be displayed.</p><h3>Remove default posts provided by starter</h3><p>Now is a good time to remove those default blog posts that came with the starter. But, before making any changes locally, git pull to get the new blog post that you create with the CMS.</p><p>Once the local repo is up to date:</p><ul><li>Delete the default blog folders in content/blog</li><li>git commit your changes</li><li>git push to redeploy</li></ul><h3>Customize Blog</h3><p>Update the Gatsby Blog Starter’s default content — particularly the bio, footer, and metadata — and the default URL that Netlify assigns the site.</p><h3>Password Protect</h3><p>Since I want this blog to be for friends and family only, I’d like to require users to enter a password to access the content. Netlify offers this capability with their <a href="https://www.netlify.com/docs/visitor-access-control/#password-protection">Visitor Access Control</a> feature. Unfortunately this feature is not part of Netlify’s free plan.</p><p>I want to keep this project as affordable as possible, so I looked into other solutions. It turns out <a href="https://auth0.com/blog/securing-gatsby-with-auth0/">Auth0 has a great tutorial</a> on creating protected directories in Gatsby. Follow this tutorial to protect the blog behind a login screen.</p><pre>Note: The Auth0 tutorial looks at protecting the directory /account/*. In my case, I wanted to protect every directoy /*.</pre><h3>Deviations from Auth0 Tutorial</h3><h4>blog-post.js</h4><p>Add the same isAuthenticated test to blog-post.js as was added to index.js</p><pre>// src/templates/blog-post.js <br>...<br>import { login, isAuthenticated } from &quot;../utils/auth&quot;  <br><br>class BlogPostTemplate extends React.Component {     <br>    render() {          <br>        ....          <br>        if (!isAuthenticated()) {               <br>            login()               <br>            return &lt;p&gt;Redirecting to login...&lt;/p&gt;          <br>        }          <br>        ...     <br>    } <br>}</pre><h4>gatsby-node.js</h4><p>Change the onCreatePage function to do the following:</p><pre>// gatsby-node.js  <br><br>exports.onCreatePage = async ({ page, actions }) =&gt; {     <br>    const { createPage } = actions     <br>    page.matchPath = &quot;/*/*&quot;     <br>    createPage(page) <br>}</pre><h4>gatsby-config.js</h4><p>The Auth0 integration will conflict with the Netlify CMS Identity. To avoid this, make the following change in gatsby-config.js:</p><pre>{<br>    resolve: `gatsby-plugin-netlify-cms`,<br>    options: {<br>        enableIdentityWidget: false<br>    } <br>}</pre><h3>Turn off Auth0 Sign-up</h3><p>To prevent people from registering for the blog, turn off Auth0’s default sign-up feature:</p><ul><li>Log into Auth0</li><li>Select <strong>Connections</strong> &gt; <strong>Database</strong></li><li>Select <strong>Username-Password-Authentication</strong></li><li>Under <strong>Settings</strong> toggle</li><li><strong>Disable Sign Ups</strong></li></ul><h3>Provide readers access to the blog</h3><p>There are two ways to approach this: (1) Create one account using your email address and password that you share to all your readers, or (2) In Auth0, enter all the email addresses of the users you want to access the blog and require them to verify their email.</p><p>Since this blog is just for friends and family, I am comfortable creating an account with my email address and emailing my invite list the credentials for them to access the blog.</p><pre>Obviously, this isn&#39;t a secure solution, but it&#39;s secure enough for this project.</pre><h3>Dat is het!</h3><p>You now have a CMS powered blog that is continuously deployed on each code commit and each time you publish a new post from the browser.</p><h3>Sources</h3><p>Much of this blog was the compilation of three different sources:</p><ul><li><a href="https://www.netlifycms.org/docs/gatsby/">Netlify CMS &amp; Gatsby Docs</a></li><li><a href="https://www.netlify.com/docs/identity/?_ga=2.268855281.1266805620.1568660149-675374067.1568660149">Netlify Identity</a></li><li><a href="https://auth0.com/blog/securing-gatsby-with-auth0/">Securing Gatsby with Auth0</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d5685da9d44" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rangle-io/developing-an-amsterdam-blog-with-gatsby-netlify-and-jet-lag-8d5685da9d44">Developing an Amsterdam Blog with Gatsby, Netlify and Jet Lag</a> was originally published in <a href="https://medium.com/rangle-io">Rangle.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The lost or stolen wallet scenario: Is your product designed to handle it?]]></title>
            <link>https://uxdesign.cc/the-lost-or-stolen-wallet-scenario-is-your-product-designed-to-handle-it-c4dbec239141?source=rss-d1ad971085ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4dbec239141</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[user-research]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[Chris DePaul]]></dc:creator>
            <pubDate>Mon, 15 Apr 2019 17:56:17 GMT</pubDate>
            <atom:updated>2019-04-15T23:31:27.069Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p32sp1MWi_U6M89E" /><figcaption>Photo by <a href="https://unsplash.com/@neonbrand?utm_source=medium&amp;utm_medium=referral">NeONBRAND</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Losing your wallet is a stressful experience. Your cash, your identity, your credit, your <em>loyalty points</em> — gone! You were <em>only </em>two coffees away from having a free coffee? Think again, buddy. You are now <em>10 coffees away </em>from that free coffee.</p><p>A few weeks ago, I went to grab my wallet from my usual wallet spot, but it wasn’t there. Keeping my cool, I checked my jacket pockets, my yesterday’s pants, under the bed (not sure why), and my jacket, again. Nothing. Getting a little more stressed, and becoming late for work, I went outside to check if I had left the wallet in the car. What I found was a smashed passenger-side window, small bits of glass strewn across the seats, a rifled-through glove box and <em>no wallet</em>.</p><p>Its absence and the surrounding carnage made it clear: I had left my wallet in the car.</p><p>By stealing the wallet, the bandit made away with:</p><ul><li>$80 cash</li><li>Credit cards (x2)</li><li>Debit card</li><li>Drivers license</li><li>Health insurance</li><li>Transit card</li><li>Wallet</li></ul><p>I quickly got to work cancelling and replacing all the cards I had just lost, and then dealt with the cascading problem of updating my auto-payments and food delivery apps with my new credit card details.</p><p>Nothing about this experience is desirable, but working with some companies is more pleasant than others. For instance, the credit card companies were very good at taking my call, canceling my credit cards and getting replacements to me in two business days.</p><p>The transit card company, on the other hand, provided an arduous experience filled with phone calls, in person questions, websites that only save payment information every 24 hours, and an ominous warning that one wrong click would cause all the money in my account to be lost forever.</p><p>It’s been 20 days since my wallet disappeared and I’m still dealing with transit related issues.</p><p>This whole experience taught me a simple lesson in product design and development:</p><blockquote>“Do not be the most frustrating part of losing a wallet.”</blockquote><p>When a customer of yours falls victim to the <em>Lost or Stolen Wallet </em>scenario, their experience of coming to you to fix service errors should add minimal to no additional stress to their already stressful situation. In fact, handling the situation well could leave the person feeling grateful and positive towards your product.</p><p>But, handling the situation poorly could make your product the unwitting target of the customer’s ire, and even an additional antagonist in the person’s wallet-theft story!</p><p>I implore companies impacted by the <em>Lost or Stolen Wallet </em>scenario to measure their performance by one simple metric: is replacing a government-issued ID <em>easier</em> than whatever your customer has to do with your product?</p><p>If it is easier for a customer to navigate a large bureaucracy to obtain their official identification card than it is to remedy the problem they face with your product, then you just might be the most frustrating part of losing a wallet.</p><p><em>As a developer, I am often looking for edge cases within an algorithm, like when an array is empty, or null, or a given number is negative or undefined. I use unit testing tools like </em><a href="https://jestjs.io/"><em>Jest</em></a><em> to define and run tests on those edge cases to help ensure the algorithm is considering “all” scenarios before moving to production.</em></p><p><em>I am not sure if any similar tools exist for product design. Do you know of tools or exercises that can be used to help product designers find edge cases for the products they are building?</em></p><p><em>Share in the comments below!</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F50d69a%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fux&amp;image=https%3A%2F%2Fucarecdn.com%2F6e8986c7-e64a-4116-9afb-fd71a476f0a9%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/a19f46680bac3cbdc42953c920d0c104/href">https://medium.com/media/a19f46680bac3cbdc42953c920d0c104/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4dbec239141" width="1" height="1" alt=""><hr><p><a href="https://uxdesign.cc/the-lost-or-stolen-wallet-scenario-is-your-product-designed-to-handle-it-c4dbec239141">The lost or stolen wallet scenario: Is your product designed to handle it?</a> was originally published in <a href="https://uxdesign.cc/">UX Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Changing diapers and the UX revelation that came with it]]></title>
            <link>https://uxdesign.cc/changing-diapers-and-the-ux-revelation-that-came-with-it-4257c32be618?source=rss-d1ad971085ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/4257c32be618</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[parenting]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Chris DePaul]]></dc:creator>
            <pubDate>Mon, 25 Mar 2019 17:46:06 GMT</pubDate>
            <atom:updated>2019-03-26T22:48:46.547Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*n2yHMccC2NRlPwSo" /><figcaption>Photo by <a href="https://unsplash.com/@ignaciocampo?utm_source=medium&amp;utm_medium=referral">Ignacio Campo</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>A software developer learns a valuable User Experience lesson while changing his daughter’s diapers in the middle of the night.</em></p><p>Four months ago, I became the proud father of a beautiful baby named June. Her and I get along famously: I strap her into a baby carrier to go for walks; I feed her a bottle when she demands it; and, I play for her all the best music, as determined by me and my exquisite taste. When she’s tired, I put her in her crib, and when she’s “filled her pants”, I change her diaper. It’s all part of the experience and I like to think I’ve taken them on with grace and poise.</p><p>That is, unless it’s 3AM and my sweet darling angel awakens with something on her mind.</p><p>Presented with a similar moment in broad daylight — at the peak of my awakeness — I operate like an octopus simultaneously opening 8 jars of jam. But in the middle of the night, with the lights dim, my glasses off, and my little apple dumpling screaming her angelic cries for…something…I operate like a warthog tromping around without its glasses on.</p><p>When I go to help June, I have a standard night time approach: pick her up, feed her, burp her and, if she’s still doing her little dances of discomfort, I go to change her diaper.</p><p>This is the moment when I had my UX revelation.</p><p>I typically have two different diaper brands in circulation, each with their own design printed on its exterior:</p><ul><li>Brand A has one graphic, located only on the front of the diaper;</li><li>Brand B has graphics on the front and back of the diaper <em>and </em>text on the front and back that read “<em>front</em>” and “<em>back</em>.”</li></ul><p>I never thought I’d notice or care about the design of diapers, but I guess I was warned by my elders that “kids will change you.” I get it now.</p><p>When it’s 3AM and I’m trying to get June back to sleep, I’m looking for efficiency, clarity and intuitiveness. When I grab a diaper, I want to spend <em>no time</em> figuring out the diaper’s orientation. I want to glance, understand, adjust and implement.</p><p>When I grab Brand A, I know that if I see a graphic, I am looking at the diaper’s front and if I see <em>no</em> graphic, I’m looking at the diaper’s back.</p><p>With Brand B, I have to work harder. I have to first locate the text on the diaper, read that text and let my brain realize “this says b-a-c-k…this is the back.”</p><p><em>That took time!!</em></p><p>It took enough time for June to release another scream and for me to feel a pang of frustration.</p><p>Listen, I know that reading “front” and “back” is not completely exhausting, but you have to remember, I am a warthog without glasses in this moment and everything just feels a little more difficult.</p><p>When I entered fatherhood, I expected to have some revelations about myself, family, and life as a whole. I’ll admit that I’m surprised to also have had a UX revelation as well.</p><p>Sometimes users are tired, stressed and just wanting to use a product with as minimal friction as possible. If you can explain something through <a href="https://theblog.adobe.com/design-visual-cues-better-ux/">visual or interactive cues</a>, rather than through language, you might just be bringing some well appreciated calmness to a user’s life.</p><p><em>Check out </em><a href="https://cantunsee.space/"><em>Can’t Unsee</em></a><em>, a fun game that teaches you common best practices in user experience design.</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F50d69a%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fux&amp;image=https%3A%2F%2Fucarecdn.com%2F6e8986c7-e64a-4116-9afb-fd71a476f0a9%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/a19f46680bac3cbdc42953c920d0c104/href">https://medium.com/media/a19f46680bac3cbdc42953c920d0c104/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4257c32be618" width="1" height="1" alt=""><hr><p><a href="https://uxdesign.cc/changing-diapers-and-the-ux-revelation-that-came-with-it-4257c32be618">Changing diapers and the UX revelation that came with it</a> was originally published in <a href="https://uxdesign.cc/">UX Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>