Jeremias Menichelli
Front end engineer, focusing on animation, web architecture and design systems for the last years
From Argentina, living in Barcelona
I don't put pineapple on pizza
@jeremenichelli on twitter,
jeremenichelli.io on the internets
DESIGN SYSTEM
ENGINEERING TEAM
ENGINEERING TEAM
ENGINEERING TEAM
ENGINEERING TEAM
import React from 'react'
import Dialog from 'your-design-system'
import Modal from 'your-design-system'
import Drawer from 'your-design-system'
const Screen = () => (
<>
<Dialog visible />
<Modal open />
<Drawer closed={false} />
</>
)
requires the user to re-learn a new interface
puts engineers in a focus switching situation
import React from 'react'
import Dropdown from 'your-design-system'
const Screen = ({ dropdownValue }) => (
<>
<Dropdown
value={dropdownValue}
options={[ 'leia', 'luke' ]}
renderHeader={value => <span className="custom-header">{value}</span>}
renderOption={value => <span className="custom-option">{value}</span>}
/>
</>
)
an interface open to an unexpected behavior leads to unexpected usage, which leads to unexpected bugs
you are distributing behavior, you are not distributing design
import React from 'react'
import styled from 'styled-components'
const DialogWrapper = styled.div`
display: ${props => props.visible ? 'flex' : 'none'};
position: fixed;
top: 0;
left: 0;
height: 100%;
align-items: center;
justify-items: center;
`
const Dialog = props => <DialogWrapper {...props}>
export default Dialog
import React from 'react'
import styled from 'styled-components'
const DialogWrapper = styled.div`
display: ${p => p.visible ? 'flex' : 'none'};
position: fixed;
top: 0;
left: 0;
height: 100%;
align-items: center;
justify-items: center;
`
const Dialog = props => <DialogWrapper {...props}>
export default Dialog
✅ shows using "visible" prop
✅ hides when "visible" prop is false
function getVisibility(props) {
if (props.visible) {
return 'flex'
}
return 'none'
}
const DialogWrapper = styled.div`
display: ${p => getVisiblity(p);
position: fixed;
top: 0;
left: 0;
height: 100%;
align-items: center;
justify-items: center;
`
✅ shows using "visible" prop
✅ hides when "visible" prop is false
function getVisibility(props) {
if (props.visible) {
return 'flex'
}
if (props.isOpen) {
return 'flex'
}
return 'none'
}
const DialogWrapper = styled.div`
display: ${p => getVisiblity(p);
position: fixed;
top: 0;
left: 0;
height: 100%;
align-items: center;
justify-items: center;
`
✅ shows using "visible" prop
✅ shows using "isOpen" prop
✅ hides when "visible" prop is false
import { VISIBLE_PROP_MESSAGE } from './messages'
import warn from '../utils/warn'
function getVisibility(props) {
if (props.visible) {
if (process.env.NODE_ENV !== 'production') warn(VISIBLE_PROP_MESSAGE)
return 'flex'
}
if (props.isOpen) {
return 'flex'
}
return 'none'
}
✅ shows using "visible" prop
✅ warns about "visible" usage
✅ shows using "isOpen" prop
✅ hides when "visible" prop is false
import { VISIBLE_PROP_MESSAGE } from './messages'
import warn from '../utils/warn'
function getVisibility(props) {
if (props.visible) {
if (process.env.NODE_ENV !== 'production') warn(VISIBLE_PROP_MESSAGE)
return 'flex'
}
if (props.isOpen) {
return 'flex'
}
return 'none'
}
⛔️ shows using "visible" prop
⛔️ warns about "visible" usage
✅ shows using "isOpen" prop
⛔️hides when "visible" prop is false
DESIGN SYSTEM
ENGINEERING TEAM
ENGINEERING TEAM
ENGINEERING TEAM
ENGINEERING TEAM
DESIGNER
YOU
YOU
YOU
but paid
Jeremias Menichelli
@jeremenichelli on twitter,
jeremenichelli.io on the internets
"Paving the adoption path of your Design System for engineers"