New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(www): Add brand guidelines, design tokens docs (humble beginnings) #14360
Conversation
A humble first shot at documenting our brand guidelines, providing a place for people to find our logo, and document the design tokens used to create our OSS website UI. Prior work shipped to mutability.netlify.com used https://styled-system.com/ under the hood. I really enjoyed working with it, but using it for .org `www` of course should be thoroughly discussed. I’m including it here to facilitate a discussion, …and to ship things! ;-) - consolidate prior work with existing .org `www` design tokens - add a breakpoint `xxs`, required to make styled-system’s https://styled-system.com/responsive-styles work - add rudimentary `colors.blackFade` and `colors.whiteFade` - extend `tokens/font-sizes`, now generated via a formula that outputs (device) pixel values; generated values are manually adjusted, then converted to `rem` in `utils/presets` - update link to mutability.netlify.com on `/contributing/organize-a-gatsby-event` to point to `/guidelines/logo/` - add an item „Logo & Assets“ to the global footer, linking to `/guidelines/logo/` - add `presets.fontWeights` - add `presets.borders` The original PoC implementation also makes use of `react-spring` and `react-visibility-sensor` to add some „text highlighting“ animations, and uses `react-copy-to-clipboard` and the `color` package to facilitate UI behavior and various calculations for the „Color“ part of the guidelines. I’m not opposed to remove the animations — they don’t add much — but might need some help in dropping the `color` lib if we want to get that dep out of the bundle. Noob alert! ;-) Oh, `react-copy-to-clipboard` probably should go, too. Unfortunately we still didn’t settle on anything reusable. — Wether we go for `styled-system` or not, we should think about using `emotion`’s context/`emotion-theming` moving forward. No need to explicitly import stuff esp. now that refactoring things have settled down. I recall @jxnblk saying there are treeshaking/bundle size benefits to not doing so, though. — Todo: - fix/expand „Color“ data, content and UI - fix missing color swatches for black and white on the „Logo“ page - add `letterSpacing`, `lineHeights`, `fontWeights` token documentation to „Typography“, tidy examples here and there - add partner logo lockup guide to „Logo“ - give the copy a very close second look - lots more in and out of scope for this PR :-P — will follow up on that
A first set of questions irt to all the additional dependencies that this adds:
|
It's that the action isn't discoverable without right clicking, and it differs from the initial |
...propTypes.layout, | ||
...propTypes.position, | ||
...propTypes.space, | ||
...propTypes.typography, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jxnblk <3 the new style categories!
…go in header" This reverts commit 3c47ad1.
@marcysutton I just revered 3c47ad1, so no more worries about the right-click a11y. |
Wow, I never like orange colors, and I like that orange hue. This is beautiful! I would like to see a movie set to some nice music to just watch the colors pass me by, please! |
- licensed for up to 2,000,000 page views - added `font-display: swap`
Let's go "dark deploy" (as discussed with @KyleAMathews)
Updated the new font (Futura PT Bold), and removed the link to the "Logo" guidelines in the footer (as discussed with @KyleAMathews today). Asked @marcysutton to give this another look irt a11y, which she thankfully agreed to. 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few suggestions, this is really awesome work! I think it's big enough that we should try to keep it moving and we can make improvements later on. So you are welcome to take my comments as suggestions for later or address them now–up to you.
display: `block`, | ||
}, | ||
}} | ||
onClick={this.handleClick} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we give these buttons an aria label of the hex color so they aren't empty by default?
I'm also wishing the widget didn't force keyboard users through every swatch. But we could easily solve that with a skip link past it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we give these buttons an aria label of the hex color so they aren't empty by default?
At least this is fixed in 3017886; also read https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-skip.html because I wondered about how to pull of the skip link. I assume we'd want that skip link
- after the each (but the last) color name (== button to open the modal) and before the associated swatches,
- the link title would be "Skip color name swatches and jump to next color",
- every color name button would need an
id
attribute?
Oh, also: Colors are listed by group (primary, secondary, neutral) — would the skip link for the last color in each group have to point to the title of the group?
🤷♂
Happy to fix this in a follow-up PR!
`Copied!` | ||
) : ( | ||
<> | ||
Copy HEX <SrOnly>${color.hex}</SrOnly> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the visual of the hex color could be useful, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S/th like edadcdd? 🤔
I hope to have addressed the majority and left comments for everything else—only one thing completely untouched, and super happy to give that a go after a little feedback! |
…s) (gatsbyjs#14360) * Basic port of https://mutability.netlify.com/ A humble first shot at documenting our brand guidelines, providing a place for people to find our logo, and document the design tokens used to create our OSS website UI. Prior work shipped to mutability.netlify.com used https://styled-system.com/ under the hood. I really enjoyed working with it, but using it for .org `www` of course should be thoroughly discussed. I’m including it here to facilitate a discussion, …and to ship things! ;-) - consolidate prior work with existing .org `www` design tokens - add a breakpoint `xxs`, required to make styled-system’s https://styled-system.com/responsive-styles work - add rudimentary `colors.blackFade` and `colors.whiteFade` - extend `tokens/font-sizes`, now generated via a formula that outputs (device) pixel values; generated values are manually adjusted, then converted to `rem` in `utils/presets` - update link to mutability.netlify.com on `/contributing/organize-a-gatsby-event` to point to `/guidelines/logo/` - add an item „Logo & Assets“ to the global footer, linking to `/guidelines/logo/` - add `presets.fontWeights` - add `presets.borders` The original PoC implementation also makes use of `react-spring` and `react-visibility-sensor` to add some „text highlighting“ animations, and uses `react-copy-to-clipboard` and the `color` package to facilitate UI behavior and various calculations for the „Color“ part of the guidelines. I’m not opposed to remove the animations — they don’t add much — but might need some help in dropping the `color` lib if we want to get that dep out of the bundle. Noob alert! ;-) Oh, `react-copy-to-clipboard` probably should go, too. Unfortunately we still didn’t settle on anything reusable. — Wether we go for `styled-system` or not, we should think about using `emotion`’s context/`emotion-theming` moving forward. No need to explicitly import stuff esp. now that refactoring things have settled down. I recall @jxnblk saying there are treeshaking/bundle size benefits to not doing so, though. — Todo: - fix/expand „Color“ data, content and UI - fix missing color swatches for black and white on the „Logo“ page - add `letterSpacing`, `lineHeights`, `fontWeights` token documentation to „Typography“, tidy examples here and there - add partner logo lockup guide to „Logo“ - give the copy a very close second look - lots more in and out of scope for this PR :-P — will follow up on that * @styled-system/should-forward-prop * Content * Remove <Annotation>, <Words> * No need for custom badge * Remove „Logo“ masthead background * Rm Spectral * Copy * Callout styles * Add radii * teal -> orange * Tidy * Basic fixes for „Copy HEX“ tooltip * Copy, hierarchy * Bump styled-system to v4.2.4 * Wrap up `shadows`; no need to put in more work here right now * Fix nav item active state 🙏 @jxnblk * Betterer?! :P * Fix „Logo“ <ColorSwatch> * Expand „Color Blindness“ section * Remove a bunch of „Purple“ color names * Reorder footer links * Nicer „Footnotes“ links * Add Futura PT Bold, make it the default for <h1> * Basic improvements to the color modal * More whitespace in between content columns * Various <h1> fixes, add+use tokens/font-weights * Add first shot at partnership lockup * Rm textRendering:optimizeLegibility, we do this globally already * Let it breathe ;) * Fix a couple more stray `fontWeight`s * Buttons * Fix buttons * Mv placeholder.js -> image-placeholder.js * Mv navigation.js -> nav.item.js * Simpler * Fix Pantone link text color * Date * Rinse * Add letter-spacing docs, rm letterSpacings.mega * Various cleanup - fix avatar size - nicer `fontTokens` join to improve readability of the generated `font-family` value - modify `fonts.header`, no need to repeat the system font stack - Typography - add „Line Heights“ docs - tidy examples - Design Tokens - add reference to the System UI Theme Specification - add reference to styled-system - improve „Shadows & Elevation“ layout - add docs for „Fonts“, „Font Sizes“, „Line Heights“ - Color - minor copy improvements - fix color overview layout - add WCAG contrast radio „legend“ * Fix tab-ability of color copy button * <th scope=„col“> * Fix markup, DRY * Fix keys * Add color code to copy button label Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update www/src/assets/guidelines/wordmark.svg Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update www/src/assets/guidelines/clearspace.svg Prevent SVGs from being focusable in IE Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVGs from being focusable in IE Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVGs from being focusable in IE Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVG from being focusable in IE, add title Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVG from being focusable in IE, add title Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Render main content as <main> * Prevent SVG from being focusable in IE, add title Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVG from being focusable in IE, add title Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Fix d'oh Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update www/src/pages/guidelines/logo.js Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Mention design tokens in `www` README * Copy d'oh Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Fix color contrast * Rm yellow background for „Scale“. A11y FTW! * Bump color contrast * Add basic <Helmet> stuff (title, html lang, canonical link, OG, Twitter site) * Render as <ul> * Add screenreader-only text describing the PMS link * One more focusable="false" * Fix ecosystem card title font-weight * Change `<div>` to `<section>` to allow `<h1>` * Don’t show HEX color value when focussing copy button * Fix copy button hover; minor UI fixes * Full-width `font-sizes` tokens * Small screen <3 * Add screenreader-only text that describes `space` and `border-radius` examples * Change container tag to `section` to be able to use `<h1>` * chore: format * Add breakpoints+mediaQueries, colors, letterSpacings to „Design Tokens“ * Lowercase * Add system font stack back to fonts.header * Bring back focusable=„false“ via SVGO plugin * Try * chore: format * Rm `data-image: icon` * Lint * Add zIndices, fontWeights, transitions * Fix internal link * Screenreader-only text for the „Colors“ design token examples * Drop `color` dep …in favor of `color-blend`, `wcag-contrast`, `hex-rgb`. Saves us a couple bytes of overhead. Along the way: - expand `blackFade`, `whiteFade` - fix `blackFade` base color - update "white or black text on colored background" examples in the color modal: - now all values from the `blackFade`/`whiteFade` that pass the WCAG color contrast ratio will be rendered (as opposed to a generic set of text colors ("High/medium emphasis", "Disabled") without any a11y information) - using `color-blend` to blend `rgba` values with the background color; scores very similar, but not exactly the same as on https://contrast-ratio.com/ - simplify the (very simple) inverted theme - fix palette meta information - fix aliases * Doc * Clearer "Color" modal links <3 @amberleyromo * Last minute fixes Thank you @amberleyromo for teaching me how to spell. * Navigate to `/guidelines/logo/` when right-clicking Gatsby logo in header I smell a11y issues TBH. Paging @marcysutton! /cc @DSchau @KyleAMathews * Bump to styled-system v5 🎉 * Rm `themed` * Revert "Navigate to `/guidelines/logo/` when right-clicking Gatsby logo in header" This reverts commit 3c47ad1. * Use `themes.sizes.avatar` to define avatar dimensions * Update Futura PT Bold font - licensed for up to 2,000,000 page views - added `font-display: swap` * Rm link in footer Let's go "dark deploy" (as discussed with @KyleAMathews) * Change "WCAG Contrast Score" from <h4> to <h3> * Add `aria-label` for color modal close button * Add `title` to button that opens the modal * Rm unused import * Add `aria-label` to color swatch buttons * Add HEX color value to swatch "copy" tooltip * Lint
…s) (gatsbyjs#14360) * Basic port of https://mutability.netlify.com/ A humble first shot at documenting our brand guidelines, providing a place for people to find our logo, and document the design tokens used to create our OSS website UI. Prior work shipped to mutability.netlify.com used https://styled-system.com/ under the hood. I really enjoyed working with it, but using it for .org `www` of course should be thoroughly discussed. I’m including it here to facilitate a discussion, …and to ship things! ;-) - consolidate prior work with existing .org `www` design tokens - add a breakpoint `xxs`, required to make styled-system’s https://styled-system.com/responsive-styles work - add rudimentary `colors.blackFade` and `colors.whiteFade` - extend `tokens/font-sizes`, now generated via a formula that outputs (device) pixel values; generated values are manually adjusted, then converted to `rem` in `utils/presets` - update link to mutability.netlify.com on `/contributing/organize-a-gatsby-event` to point to `/guidelines/logo/` - add an item „Logo & Assets“ to the global footer, linking to `/guidelines/logo/` - add `presets.fontWeights` - add `presets.borders` The original PoC implementation also makes use of `react-spring` and `react-visibility-sensor` to add some „text highlighting“ animations, and uses `react-copy-to-clipboard` and the `color` package to facilitate UI behavior and various calculations for the „Color“ part of the guidelines. I’m not opposed to remove the animations — they don’t add much — but might need some help in dropping the `color` lib if we want to get that dep out of the bundle. Noob alert! ;-) Oh, `react-copy-to-clipboard` probably should go, too. Unfortunately we still didn’t settle on anything reusable. — Wether we go for `styled-system` or not, we should think about using `emotion`’s context/`emotion-theming` moving forward. No need to explicitly import stuff esp. now that refactoring things have settled down. I recall @jxnblk saying there are treeshaking/bundle size benefits to not doing so, though. — Todo: - fix/expand „Color“ data, content and UI - fix missing color swatches for black and white on the „Logo“ page - add `letterSpacing`, `lineHeights`, `fontWeights` token documentation to „Typography“, tidy examples here and there - add partner logo lockup guide to „Logo“ - give the copy a very close second look - lots more in and out of scope for this PR :-P — will follow up on that * @styled-system/should-forward-prop * Content * Remove <Annotation>, <Words> * No need for custom badge * Remove „Logo“ masthead background * Rm Spectral * Copy * Callout styles * Add radii * teal -> orange * Tidy * Basic fixes for „Copy HEX“ tooltip * Copy, hierarchy * Bump styled-system to v4.2.4 * Wrap up `shadows`; no need to put in more work here right now * Fix nav item active state 🙏 @jxnblk * Betterer?! :P * Fix „Logo“ <ColorSwatch> * Expand „Color Blindness“ section * Remove a bunch of „Purple“ color names * Reorder footer links * Nicer „Footnotes“ links * Add Futura PT Bold, make it the default for <h1> * Basic improvements to the color modal * More whitespace in between content columns * Various <h1> fixes, add+use tokens/font-weights * Add first shot at partnership lockup * Rm textRendering:optimizeLegibility, we do this globally already * Let it breathe ;) * Fix a couple more stray `fontWeight`s * Buttons * Fix buttons * Mv placeholder.js -> image-placeholder.js * Mv navigation.js -> nav.item.js * Simpler * Fix Pantone link text color * Date * Rinse * Add letter-spacing docs, rm letterSpacings.mega * Various cleanup - fix avatar size - nicer `fontTokens` join to improve readability of the generated `font-family` value - modify `fonts.header`, no need to repeat the system font stack - Typography - add „Line Heights“ docs - tidy examples - Design Tokens - add reference to the System UI Theme Specification - add reference to styled-system - improve „Shadows & Elevation“ layout - add docs for „Fonts“, „Font Sizes“, „Line Heights“ - Color - minor copy improvements - fix color overview layout - add WCAG contrast radio „legend“ * Fix tab-ability of color copy button * <th scope=„col“> * Fix markup, DRY * Fix keys * Add color code to copy button label Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update www/src/assets/guidelines/wordmark.svg Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update www/src/assets/guidelines/clearspace.svg Prevent SVGs from being focusable in IE Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVGs from being focusable in IE Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVGs from being focusable in IE Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVG from being focusable in IE, add title Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVG from being focusable in IE, add title Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Render main content as <main> * Prevent SVG from being focusable in IE, add title Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Prevent SVG from being focusable in IE, add title Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Fix d'oh Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Update www/src/pages/guidelines/logo.js Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Mention design tokens in `www` README * Copy d'oh Co-Authored-By: Marcy Sutton <marcy@gatsbyjs.com> * Fix color contrast * Rm yellow background for „Scale“. A11y FTW! * Bump color contrast * Add basic <Helmet> stuff (title, html lang, canonical link, OG, Twitter site) * Render as <ul> * Add screenreader-only text describing the PMS link * One more focusable="false" * Fix ecosystem card title font-weight * Change `<div>` to `<section>` to allow `<h1>` * Don’t show HEX color value when focussing copy button * Fix copy button hover; minor UI fixes * Full-width `font-sizes` tokens * Small screen <3 * Add screenreader-only text that describes `space` and `border-radius` examples * Change container tag to `section` to be able to use `<h1>` * chore: format * Add breakpoints+mediaQueries, colors, letterSpacings to „Design Tokens“ * Lowercase * Add system font stack back to fonts.header * Bring back focusable=„false“ via SVGO plugin * Try * chore: format * Rm `data-image: icon` * Lint * Add zIndices, fontWeights, transitions * Fix internal link * Screenreader-only text for the „Colors“ design token examples * Drop `color` dep …in favor of `color-blend`, `wcag-contrast`, `hex-rgb`. Saves us a couple bytes of overhead. Along the way: - expand `blackFade`, `whiteFade` - fix `blackFade` base color - update "white or black text on colored background" examples in the color modal: - now all values from the `blackFade`/`whiteFade` that pass the WCAG color contrast ratio will be rendered (as opposed to a generic set of text colors ("High/medium emphasis", "Disabled") without any a11y information) - using `color-blend` to blend `rgba` values with the background color; scores very similar, but not exactly the same as on https://contrast-ratio.com/ - simplify the (very simple) inverted theme - fix palette meta information - fix aliases * Doc * Clearer "Color" modal links <3 @amberleyromo * Last minute fixes Thank you @amberleyromo for teaching me how to spell. * Navigate to `/guidelines/logo/` when right-clicking Gatsby logo in header I smell a11y issues TBH. Paging @marcysutton! /cc @DSchau @KyleAMathews * Bump to styled-system v5 🎉 * Rm `themed` * Revert "Navigate to `/guidelines/logo/` when right-clicking Gatsby logo in header" This reverts commit 3c47ad1. * Use `themes.sizes.avatar` to define avatar dimensions * Update Futura PT Bold font - licensed for up to 2,000,000 page views - added `font-display: swap` * Rm link in footer Let's go "dark deploy" (as discussed with @KyleAMathews) * Change "WCAG Contrast Score" from <h4> to <h3> * Add `aria-label` for color modal close button * Add `title` to button that opens the modal * Rm unused import * Add `aria-label` to color swatch buttons * Add HEX color value to swatch "copy" tooltip * Lint
A humble first shot at documenting our brand guidelines, providing a place for people to find our logo, and document the design tokens used to create our OSS website UI.
Preview: https://5cf57e9e4594ebb221088c18--relaxed-saha-83a4fd.netlify.com/guidelines/color/
www
design tokensxxs
, required to make styled-system’s https://styled-system.com/responsive-styles workcolors.blackFade
,colors.whiteFade
,borders
, andfontWeights
tokenstokens/font-sizes
, now generated via a formula that outputs (device) pixel values; generated values are manually adjusted, then converted torem
inutils/presets
rgba
text colors, see 31a22bc)/contributing/organize-a-gatsby-event
to point to/guidelines/logo/
/guidelines/logo/
SVGO
configuration to add thefocusable="false"
attribute to every SVG (to prevent SVGs from gaining focus in IE, thanks @marcysutton!), and not strip the<title>
any longerborder
andsizes
missing) tokens inwww/src/utils/presets
/www/src/components/guidelines/themes
(the latter is where the emotion-theme lives)www/src/utils/tokens/colors.js
Prior work shipped to mutability.netlify.com used https://styled-system.com/ under the hood. I really enjoyed working with it, but using it for .org
www
of course should be thoroughly discussed. I’m including it here to facilitate a discussion, …and to ship things! ;-)Whether we go for
styled-system
or not, we should think about usingemotion
’s context/emotion-theming
moving forward. No need to explicitly import stuff esp. now that refactoring things have settled down.I recall @jxnblk saying there are treeshaking/bundle size benefits to not doing so, though.
The original PoC implementation also makes use of
react-spring
andreact-visibility-sensor
to add some „text highlighting“ animations, and usesreact-copy-to-clipboard
and thecolor
package to facilitate UI behavior and various calculations for the „Color“ part of the guidelines.I’m not opposed to remove the animations — they don’t add much.Gave this a night of sleep, and decided to remove them. No need to talk aboutreact-spring
andreact-visibility-sensor
anymore.~I might need some help in dropping the
color
lib if we want to get that dep out of the bundle.~~_Edit: Dropped that in 31a22bc!
Noob alert! ;-)
Oh,
react-copy-to-clipboard
probably should go, too. Unfortunately we still didn’t settle on anything reusable.—
Todo:
@styled-system/should-forward-prop
(https://styled-system.com/guides/removing-props-from-html#emotion)letterSpacing
lineHeights
fontWeights