Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

[WIP] UI rinse #365

Closed
wants to merge 117 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
28df179
Remove Futura PT
fk Jan 16, 2021
ae0dee3
Add `transitions.sidebar` and make it snappier
fk Jan 17, 2021
6189646
Rm "Butler" illustration from contributor sidebar
fk Jan 17, 2021
e7de51c
Rm "sad card" illustration
fk Jan 17, 2021
70638bf
Replace Butler with circular loading spinner
fk Jan 17, 2021
f5c5987
Add `fontSizes` constants
fk Jan 17, 2021
43cafee
"view details" -> "View details"
fk Jan 17, 2021
004c6bb
"Back to Product List" -> "All Products"
fk Jan 17, 2021
bbdb61a
Rm `''-webkit-scrolllbar` styles
fk Jan 17, 2021
bafcea8
Align `radius` key nomenclature with other scales…
fk Jan 17, 2021
4c53c8e
Update brighter `brand` colors
fk Jan 17, 2021
4b46bd9
Add `visuallyHidden` styles
fk Jan 17, 2021
60fb491
Cart: Visually hide colon after `Subtotal`, etc.
fk Jan 17, 2021
813214d
Smaller logo
fk Jan 17, 2021
a4f70bc
Acknowledge contributors
fk Jan 17, 2021
f1daee2
Add `'<Spinner>`, use in `CartIndicator`
fk Jan 17, 2021
1094077
Improve `Cart` UI
fk Jan 17, 2021
9205942
Bump and shake `react-icons`
fk Jan 17, 2021
d99fb1f
Ditch `ButlerHand` in favor of an icon
fk Jan 17, 2021
71e906d
Whoops :D
fk Jan 17, 2021
70a7d63
Throw a gradient on the `PrimaryButton
fk Jan 17, 2021
7ab551f
A bit more visibility for the `Spinner`
fk Jan 17, 2021
766cb9a
Ditch `colors.lemon`…
fk Jan 17, 2021
acf7062
Increase `dimensions.headerHeight`…
fk Jan 17, 2021
86f8351
Try a different `Cart` icon…
fk Jan 17, 2021
9507aba
Fix a bunch of `fontSizes`…
fk Jan 17, 2021
c7ea8c7
Footer cleanup, add `minHeight` constant…
fk Jan 17, 2021
8a527e6
Don't use `colors.brand` to emphasize here
fk Jan 17, 2021
1398bfa
More subtle "pointing arrow" animation
fk Jan 17, 2021
92cf1b6
`Header` border color, alignment to `OpenBar`
fk Jan 17, 2021
4305509
Make use of `dimensions-CartWidthDesktop`
fk Jan 17, 2021
de28621
Show logged in user avatar
fk Jan 17, 2021
0af0dba
Remove `blur`, fixes #336
fk Jan 17, 2021
f7b63de
Fix Emotion `keyframes` warnings
fk Jan 17, 2021
0c2cdf7
Remove unused `webkit-scrollbar` styles
fk Jan 17, 2021
221e861
A couple more `fontSizes`
fk Jan 17, 2021
2937a5a
Remove `SmileIcon`
fk Jan 17, 2021
1baca37
Rm `SpaceMono` from `monospaceFontStack`
fk Jan 17, 2021
d946fe9
`calc` + constants > magic number
fk Jan 17, 2021
fb3b217
Fix naming (`ButlerHandBox` -> `PointerBox`)
fk Jan 17, 2021
b1bcf3b
Phase out `brandDark`, `lilac`
fk Jan 17, 2021
2e2650c
Make "Gift!" image bg transparent
fk Jan 17, 2021
ca0be42
Fuss around with `ItemsNumber`
fk Jan 17, 2021
c800f90
Stick to multiples of 4/8
fk Jan 17, 2021
b016bd4
Use `spacing`
fk Jan 17, 2021
375239f
Less `lilac`
fk Jan 17, 2021
f424e35
Add a border-left to `Cart`
fk Jan 18, 2021
5eee1a2
Fix `Remove` button border style and color
fk Jan 18, 2021
0bfe3d9
Sidebar rinse β€” no more dark background
fk Jan 18, 2021
07c298e
One less `brandDark`
fk Jan 18, 2021
c8b08f6
Replace stray `brandBright`, `lilac`
fk Jan 18, 2021
f34809f
Leaner `colors`
fk Jan 18, 2021
38d3310
Add and use `styles.lineHeights`
fk Jan 18, 2021
e1a492e
Tidy, polish `Loading`
fk Jan 18, 2021
be0305e
Polish `Footer` link `hover`
fk Jan 18, 2021
7e6abcc
Calmer `InfoLinks`
fk Jan 18, 2021
740ff8e
More descriptive and visible icon for "Size Chart"
fk Jan 18, 2021
40c9867
Align `Button` and form input heights (sloppy)
fk Jan 18, 2021
4100040
D'oh
fk Jan 18, 2021
98bc0f4
Fix `ContributorArea` `overflow: scroll` height
fk Jan 18, 2021
8b5a470
`gatsby-interface` colors
fk Jan 18, 2021
5f9be09
`gatsby-interface` colors for coupons
fk Jan 18, 2021
f95c131
Move C-19 info to shared component `Notice`
fk Jan 18, 2021
bc12df0
Nest `ProgressBar` in `CodeBadgeBox`
fk Jan 18, 2021
541cb53
Fix `SectionHeading` color
fk Jan 18, 2021
c3b9661
No `box-shadow` for product images on desktop
fk Jan 18, 2021
321f9ac
Refactor coupon code badges
fk Jan 18, 2021
0e9f851
Calmer
fk Jan 18, 2021
6b377ca
Fix `Notice` border-radius
fk Jan 18, 2021
4d0cbce
Add reference link for alpha in HEX color values
fk Jan 18, 2021
1ea0da0
D'oh
fk Jan 18, 2021
50d3eef
Calmer cart `Remove` button
fk Jan 18, 2021
890b9a4
Calmer `BackLink`
fk Jan 18, 2021
0b4d634
better `gradient.button`
fk Jan 18, 2021
e1aef69
Typography
fk Jan 18, 2021
ceb34c5
Fancy
fk Jan 18, 2021
914d773
Bolder
fk Jan 18, 2021
0bae7fc
Merge remote-tracking branch 'origin' into fk/1-day-rinse
fk Feb 3, 2021
7109f6c
Merge remote-tracking branch 'origin' into fk/1-day-rinse
fk Jul 30, 2021
5be10a9
Remove obsolete `gatsby-image` imports
fk Jul 31, 2021
2fec963
Less exclamation marks, remove emoji
fk Jul 31, 2021
443b8ea
Add Inter var typeface
fk Jul 31, 2021
c391186
Remove unused
fk Jul 31, 2021
82e7b78
✨ Bump gatsby-* deps, rm babel-plugin-react-icons
fk Jul 31, 2021
bc10da1
Name exports
fk Jul 31, 2021
acc24c7
Whoops – actually use Inter typeface
fk Jul 31, 2021
9de5576
Bump react-helmet and its Gatsby plugin
fk Jul 31, 2021
7759fd5
Bump emotion, rm stray last `gatsby-image` import
fk Aug 1, 2021
5f546bb
Remove seemingly obsolete `apiKey` option …
fk Aug 1, 2021
2a12c45
Add `fontWeights` to `styles`, begin using them
fk Aug 1, 2021
ce20a0b
Bump gatsby, gatsby-plugin-image
fk Aug 1, 2021
778c113
Add `fonts.serif`
fk Aug 1, 2021
6dfa5ec
Use Inter, finally
fk Aug 2, 2021
3986401
Grab from `fontSizes`
fk Aug 2, 2021
38ef4be
Remove `brand` color from `SizeChartTable` `th`
fk Aug 2, 2021
9fc9912
Calmer "Back to all products" link
fk Aug 2, 2021
2ccf2c5
NL OCD
fk Aug 2, 2021
edf95e5
Add `borders.grid` and start using it
fk Aug 2, 2021
4008a66
More NL OCD
fk Aug 2, 2021
bd50a4a
⚑️ :)
fk Aug 9, 2021
38d05c2
canizhazwindow
fk Aug 12, 2021
0efa01a
Somewhat fix eslintrc, lint, format
fk Aug 14, 2021
384a98e
README: "Gatsby v2" -> "Gatsby v3"
fk Aug 14, 2021
9f033f8
README: Fix typo
fk Aug 14, 2021
b9d28f2
README: Add license, CircleCI, PRs welcome, Twitter badges
fk Aug 14, 2021
4673da4
Emojis should be wrapped in <span>, …
fk Aug 14, 2021
9ea56db
Component definition is missing display name
fk Aug 14, 2021
770272c
Expected to return a value at the end of arrow function
fk Aug 14, 2021
351288d
Fix product list image `alt` text
fk Aug 14, 2021
8fa25e8
Fix (sloppy) cart thumbnail image alt text
fk Aug 14, 2021
83150c7
rm dead code
fk Aug 14, 2021
bf09120
No need to uppercase
fk Aug 14, 2021
f0398f4
Vertically center "Empty cart" message
fk Aug 14, 2021
32a9324
Emphasissssssss
fk Aug 14, 2021
df7b471
`AreaTypography` href styles
fk Aug 14, 2021
8873012
random()
fk Aug 14, 2021
8ab8739
Formatttt
fk Aug 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ AUTH0_CLIENTID=kp6gHVX1pySEYNpvktwciU5Mm1j0C52D
AUTH0_CALLBACK=http://localhost:8000/callback/
AUTH0_AUDIENCE=https://api.gatsbyjs.com/
GATSBY_API=https://us-central1-gatsby-core.cloudfunctions.net/graphql
SHOPIFY_ACCESS_TOKEN=9aa73c089d34741f36edbe4d7314373a
SHOPIFY_ACCESS_TOKEN=9aa73c089d34741f36edbe4d7314373a
41 changes: 13 additions & 28 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
"extends": [
"google",
"eslint:recommended",
"plugin:flowtype/recommended",
"plugin:jsx-a11y/recommended",
"plugin:react/recommended",
"prettier",
"prettier/flowtype",
"prettier/react"
"prettier"
],
"plugins": ["flowtype", "react"],
"plugins": ["react", "jsx-a11y"],
"parserOptions": {
"experimentalObjectRestSpread": true,
"ecmaVersion": 2016,
"sourceType": "module",
"ecmaFeatures": {
Expand All @@ -20,11 +19,10 @@
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true
"node": true
},
"globals": {
"spyOn": true
"graphql": true
},
"rules": {
"no-console": "off",
Expand All @@ -51,26 +49,13 @@
"functions": "ignore"
}
],
"react/prop-types": [
"error",
{
"ignore": ["children"]
}
]
"react/prop-types": 0,
"react/displayName": 0,
"no-invalid-this": 0
},
"overrides": [
{
"files": [
"packages/**/gatsby-browser.js",
"packages/gatsby/cache-dir/**/*"
],
"env": {
"browser": true
},
"globals": {
"___loader": false,
"___emitter": false
}
"settings": {
"react": {
"version": "detect"
}
]
}
}
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.cache
public
static
node_modules
.vscode
.idea
4 changes: 3 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"singleQuote": true
"singleQuote": false,
"semi": false,
"trailingComma": "all"
}
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@
<h1 align="center">
Gatsby <a href="https://store.gatsbyjs.org">Swag Store</a>
</h1>
<p align="center">
<a href="https://github.com/gatsbyjs/store.gatsbyjs.org/blob/master/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Gatsby is released under the MIT license." />
</a>
<a href="https://circleci.com/gh/gatsbyjs/store.gatsbyjs.org">
<img src="https://circleci.com/gh/gatsbyjs/store.gatsbyjs.org.svg?style=shield" alt="Current CircleCI build status." />
</a>
<a href="https://gatsbyjs.com/contributing/how-to-contribute/">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" />
</a>
<a href="https://twitter.com/intent/follow?screen_name=gatsbyjs">
<img src="https://img.shields.io/twitter/follow/gatsbyjs.svg?label=Follow%20@gatsbyjs" alt="Follow @GatsbyJS" />
</a>
</p>

This is the Gatsby store, where we make swag, stickers, and other Gatsby goodies available to contributors and Gatsby enthusiasts. πŸ’ͺπŸ’œ

Expand All @@ -24,13 +38,13 @@ This store is built with data from:
- The [Shopify JavaScript Buy SDK](https://shopify.github.io/js-buy-sdk/)
- [Auth0](https://auth0.com/)

We’re using [Gatsby V2](https://github.com/gatsbyjs/gatsby) and [Emotion](https://emotion.sh/) to get the data on screen.
We’re using [Gatsby v3](https://github.com/gatsbyjs/gatsby) and [Emotion](https://emotion.sh/) to get the data on screen.

The store is statically rendered using the Shopify source plugin, and the maintainer dashboard is a dynamic app (e.g. client-only routes) protected by Auth0.

## Free Swag for Contributors

If you're a contributor to Gatsby, that means you can get one free item from our store! Log in using your GitHub account and we'll give you a discount code good for a t-shirt or socks. With five or more contributions, You can claim your **level two** swag!
If you're a contributor to Gatsby, that means you can get one free item from our store! Log in using your GitHub account and we'll give you a discount code good for a t-shirt or socks. With five or more contributions, you can claim your **level two** swag!

See [the docs for claiming contributor swag](https://www.gatsbyjs.com/contributing/contributor-swag/) for additional details.

Expand Down
24 changes: 12 additions & 12 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
import React from 'react';
import { ApolloProvider } from 'react-apollo';
import { client } from './src/context/ApolloContext';
import { silentAuth } from './src/utils/auth';
import React from "react"
import { ApolloProvider } from "react-apollo"
import { client } from "./src/context/ApolloContext"
import { silentAuth } from "./src/utils/auth"

class SessionCheck extends React.Component {
constructor(props) {
super(props);
super(props)
this.state = {
loading: true
};
loading: true,
}
}

handleCheckSession = () => {
this.setState({ loading: false });
};
this.setState({ loading: false })
}

componentDidMount() {
silentAuth(this.handleCheckSession);
silentAuth(this.handleCheckSession)
}

render() {
return (
this.state.loading === false && (
<React.Fragment>{this.props.children}</React.Fragment>
)
);
)
}
}

export const wrapRootElement = ({ element }) => (
<SessionCheck>
<ApolloProvider client={client}>{element}</ApolloProvider>
</SessionCheck>
);
)
67 changes: 33 additions & 34 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,53 +1,52 @@
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`
});
require("dotenv").config({
path: `.env.${process.env.NODE_ENV}`,
})

module.exports = {
siteMetadata: {
siteUrl: 'https://store.gatsbyjs.org',
title: 'Holy buckets! Get your Gatsby swag here!',
siteUrl: "https://store.gatsbyjs.org",
title: "Holy buckets! Get your Gatsby swag here!",
description:
'Do you like spaced-out socks? All purple everything? Hitting #maximumcomf with JAMstack Jammies? Oh boy have we got the swag store for you!'
"Do you like spaced-out socks? All purple everything? Hitting #maximumcomf with JAMstack Jammies? Oh boy have we got the swag store for you!",
},
plugins: [
{
resolve: `gatsby-plugin-layout`,
options: {
component: require.resolve(`./src/components/Layout/`)
}
component: require.resolve(`./src/components/Layout/`),
},
},
'gatsby-plugin-image',
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
"gatsby-plugin-image",
"gatsby-plugin-sharp",
"gatsby-transformer-sharp",
{
resolve: 'gatsby-source-shopify',
resolve: "gatsby-source-shopify",
options: {
apiKey: process.env.SHOPIFY_ADMIN_API_KEY,
password: process.env.SHOPIFY_ADMIN_PASSWORD,
storeUrl: process.env.SHOPIFY_SHOP_ADDRESS
}
storeUrl: process.env.SHOPIFY_SHOP_ADDRESS,
},
},
'gatsby-plugin-react-helmet',
'gatsby-plugin-emotion',
"gatsby-plugin-react-helmet",
"gatsby-plugin-emotion",
{
resolve: 'gatsby-plugin-manifest',
resolve: "gatsby-plugin-manifest",
options: {
name: 'Gatsby Store',
short_name: 'Gatsby Store',
start_url: '/',
background_color: '#ffffff',
theme_color: '#663399',
display: 'minimal-ui',
icon: 'static/android-chrome-512x512.png'
}
name: "Gatsby Store",
short_name: "Gatsby Store",
start_url: "/",
background_color: "#ffffff",
theme_color: "#663399",
display: "minimal-ui",
icon: "static/android-chrome-512x512.png",
},
},
'gatsby-plugin-offline',
"gatsby-plugin-offline",
{
resolve: 'gatsby-plugin-google-analytics',
resolve: "gatsby-plugin-google-analytics",
options: {
trackingId: 'UA-93349937-6',
respectDNT: true
}
}
]
};
trackingId: "UA-93349937-6",
respectDNT: true,
},
},
],
}
74 changes: 37 additions & 37 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const path = require('path');
const path = require("path")

exports.createPages = async ({
graphql,
actions: { createPage, createRedirect }
actions: { createPage, createRedirect },
}) => {
const pages = await graphql(`
{
Expand All @@ -15,48 +15,48 @@ exports.createPages = async ({
}
}
}
`);
`)

pages.data.allShopifyProduct.edges.forEach(edge => {
pages.data.allShopifyProduct.edges.forEach((edge) => {
createPage({
path: `/product/${edge.node.handle}`,
component: path.resolve('./src/templates/ProductPageTemplate.js'),
component: path.resolve("./src/templates/ProductPageTemplate.js"),
context: {
id: edge.node.id,
handle: edge.node.handle
}
});
});
handle: edge.node.handle,
},
})
})

// Redirects for old product slugs.
[
;[
{
oldSlug: 'purple-logo-tee-w-natural-process-print',
newSlug: 'vintage-purple-tee'
oldSlug: "purple-logo-tee-w-natural-process-print",
newSlug: "vintage-purple-tee",
},
{
oldSlug: 'copy-of-gatsby-full-zip-sweatshirt-horizontal-logo',
newSlug: 'all-purple-everything-hoodie'
oldSlug: "copy-of-gatsby-full-zip-sweatshirt-horizontal-logo",
newSlug: "all-purple-everything-hoodie",
},
{
oldSlug: 'gatsby-full-zip-sweatshirt',
newSlug: 'all-purple-everything-hoodie-vertical'
oldSlug: "gatsby-full-zip-sweatshirt",
newSlug: "all-purple-everything-hoodie-vertical",
},
{ oldSlug: 'black-socks', newSlug: 'space-socks' },
{ oldSlug: 'dark-deploy-t-shirt', newSlug: 'dark-deploy-tee' },
{ oldSlug: 'gatsby-trucker-hat', newSlug: 'monogram-trucker-hat' },
{ oldSlug: 'gatsby-water-bottle', newSlug: '12oz-travel-mug' },
{ oldSlug: 'purple-gatsby-hat', newSlug: 'blazig-purple-hat' }
{ oldSlug: "black-socks", newSlug: "space-socks" },
{ oldSlug: "dark-deploy-t-shirt", newSlug: "dark-deploy-tee" },
{ oldSlug: "gatsby-trucker-hat", newSlug: "monogram-trucker-hat" },
{ oldSlug: "gatsby-water-bottle", newSlug: "12oz-travel-mug" },
{ oldSlug: "purple-gatsby-hat", newSlug: "blazig-purple-hat" },
].map(({ oldSlug, newSlug }) => {
const config = {
toPath: `/product/${newSlug}`,
isPermanent: true,
redirectInBrowser: true
};
createRedirect({ fromPath: `/product/${oldSlug}`, ...config });
createRedirect({ fromPath: `/product/${oldSlug}/`, ...config });
});
};
redirectInBrowser: true,
}
createRedirect({ fromPath: `/product/${oldSlug}`, ...config })
createRedirect({ fromPath: `/product/${oldSlug}/`, ...config })
})
}

exports.onCreatePage = async ({ page, actions: { createPage } }) => {
/*
Expand All @@ -69,14 +69,14 @@ exports.onCreatePage = async ({ page, actions: { createPage } }) => {
* Take a look at `src/pages/account.js` for more details.
*/
if (page.path.match(/^\/account/)) {
page.matchPath = '/account/*';
page.matchPath = "/account/*"

createPage(page);
createPage(page)
}
};
}

exports.onCreateWebpackConfig = ({ stage, loaders, actions }) => {
if (stage === 'build-html') {
if (stage === "build-html") {
/*
* During the build step, `auth0-js` will break because it relies on
* browser-specific APIs. Fortunately, we don’t need it during the build.
Expand All @@ -89,10 +89,10 @@ exports.onCreateWebpackConfig = ({ stage, loaders, actions }) => {
rules: [
{
test: /auth0-js/,
use: loaders.null()
}
]
}
});
use: loaders.null(),
},
],
},
})
}
};
}
Loading