Skip to content

Commit 72a710f

Browse files
Merge branch 'dev' into refactor/layer-2-page-to-chakra
2 parents 4be0bf8 + ad77d59 commit 72a710f

File tree

294 files changed

+7204
-6345
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+7204
-6345
lines changed

.all-contributorsrc

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10010,6 +10010,123 @@
1001010010
"contributions": [
1001110011
"content"
1001210012
]
10013+
},
10014+
{
10015+
"login": "azpwnz",
10016+
"name": "Andriy Zhuk",
10017+
"avatar_url": "https://avatars.githubusercontent.com/u/6987007?v=4",
10018+
"profile": "https://github.com/azpwnz",
10019+
"contributions": [
10020+
"content"
10021+
]
10022+
},
10023+
{
10024+
"login": "gooseri",
10025+
"name": "gooser.eth",
10026+
"avatar_url": "https://avatars.githubusercontent.com/u/121782105?v=4",
10027+
"profile": "https://etherscan.io/address/gooser.eth",
10028+
"contributions": [
10029+
"content"
10030+
]
10031+
},
10032+
{
10033+
"login": "feibowei",
10034+
"name": "feibowei",
10035+
"avatar_url": "https://avatars.githubusercontent.com/u/69777448?v=4",
10036+
"profile": "https://github.com/feibowei",
10037+
"contributions": [
10038+
"content"
10039+
]
10040+
},
10041+
{
10042+
"login": "mesquitaoliveira",
10043+
"name": "Mesquita Oliveira",
10044+
"avatar_url": "https://avatars.githubusercontent.com/u/92008139?v=4",
10045+
"profile": "https://github.com/mesquitaoliveira",
10046+
"contributions": [
10047+
"doc"
10048+
]
10049+
},
10050+
{
10051+
"login": "Juancamp1987",
10052+
"name": "Juan José Giraldo",
10053+
"avatar_url": "https://avatars.githubusercontent.com/u/91024217?v=4",
10054+
"profile": "http://www.juanjosegiraldo.com",
10055+
"contributions": [
10056+
"content"
10057+
]
10058+
},
10059+
{
10060+
"login": "Ash20pk",
10061+
"name": "Ash@metaschool",
10062+
"avatar_url": "https://avatars.githubusercontent.com/u/86375577?v=4",
10063+
"profile": "https://github.com/Ash20pk",
10064+
"contributions": [
10065+
"content"
10066+
]
10067+
},
10068+
{
10069+
"login": "t-rutten",
10070+
"name": "Tom Rutten",
10071+
"avatar_url": "https://avatars.githubusercontent.com/u/1389793?v=4",
10072+
"profile": "https://github.com/t-rutten",
10073+
"contributions": [
10074+
"content"
10075+
]
10076+
},
10077+
{
10078+
"login": "chawyehsu",
10079+
"name": "Chawye Hsu",
10080+
"avatar_url": "https://avatars.githubusercontent.com/u/5764917?v=4",
10081+
"profile": "http://chawyehsu.com",
10082+
"contributions": [
10083+
"doc"
10084+
]
10085+
},
10086+
{
10087+
"login": "MateusTP",
10088+
"name": "Mateus Pimenta",
10089+
"avatar_url": "https://avatars.githubusercontent.com/u/59940545?v=4",
10090+
"profile": "https://github.com/MateusTP",
10091+
"contributions": [
10092+
"content"
10093+
]
10094+
},
10095+
{
10096+
"login": "ezal",
10097+
"name": "ezal",
10098+
"avatar_url": "https://avatars.githubusercontent.com/u/6931328?v=4",
10099+
"profile": "https://github.com/ezal",
10100+
"contributions": [
10101+
"bug"
10102+
]
10103+
},
10104+
{
10105+
"login": "jarrodwatts",
10106+
"name": "Jarrod Watts",
10107+
"avatar_url": "https://avatars.githubusercontent.com/u/35651410?v=4",
10108+
"profile": "https://jarrodwatts.com",
10109+
"contributions": [
10110+
"content"
10111+
]
10112+
},
10113+
{
10114+
"login": "mlCode111",
10115+
"name": "Miao",
10116+
"avatar_url": "https://avatars.githubusercontent.com/u/34754144?v=4",
10117+
"profile": "https://github.com/mlCode111",
10118+
"contributions": [
10119+
"code"
10120+
]
10121+
},
10122+
{
10123+
"login": "ljiatu",
10124+
"name": "Jiatu Liu",
10125+
"avatar_url": "https://avatars.githubusercontent.com/u/3280973?v=4",
10126+
"profile": "https://github.com/ljiatu",
10127+
"contributions": [
10128+
"content"
10129+
]
1001310130
}
1001410131
],
1001510132
"contributorsPerLine": 7,

.github/workflows/chromatic.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# .github/workflows/chromatic.yml
2+
3+
# Workflow name
4+
name: Chromatic Publish and Testing
5+
6+
# Event for the workflow
7+
on:
8+
pull_request:
9+
types:
10+
- opened
11+
- synchronize
12+
- ready_for_review
13+
paths:
14+
# Only run on file changes in any of these paths
15+
- "src/components/**/*"
16+
- "src/pages/**/*"
17+
- "src/pages-conditional/**/*"
18+
- "src/templates/**/*"
19+
- "src/@chakra-ui/gatsby-plugin/**/*"
20+
21+
# List of jobs
22+
jobs:
23+
chromatic-deployment:
24+
# Operating System
25+
runs-on: ubuntu-latest
26+
# Job steps
27+
steps:
28+
# 👇 Version 2 of the action
29+
- name: Checkout repo
30+
uses: actions/checkout@v2
31+
with:
32+
fetch-depth: 0 # 👈 Required to retrieve git history
33+
- name: Install deps
34+
# 👇 Install dependencies with the same package manager used in the project (replace it as needed), e.g. yarn, npm, pnpm
35+
run: yarn
36+
- name: Publish to Chromatic
37+
# 👇 Adds Chromatic as a step in the workflow
38+
uses: chromaui/action@v1
39+
# Options required for Chromatic's GitHub Action
40+
with:
41+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
42+
# 👇 Only fail if Storybook contains stories that error
43+
exitZeroOnChanges: true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,6 @@ src/gatsby-types.d.ts
8484

8585
# vscode workplace configuration
8686
.vscode
87+
88+
# storybook static files
89+
storybook-static/

.storybook/babel-storybook-config.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export const babelConfig = {
2+
sourceType: "unambiguous",
3+
presets: [
4+
[
5+
"@babel/preset-env",
6+
{
7+
targets: {
8+
chrome: 100,
9+
},
10+
},
11+
],
12+
"@babel/preset-typescript",
13+
"@babel/preset-react",
14+
],
15+
plugins: [],
16+
}

.storybook/main.js

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
const { propNames } = require("@chakra-ui/react")
22

3+
const { babelConfig } = require("./babel-storybook-config")
4+
35
module.exports = {
46
stories: [
57
{
@@ -16,30 +18,43 @@ module.exports = {
1618
"@storybook/addon-a11y",
1719
"@chakra-ui/storybook-addon",
1820
],
19-
framework: "@storybook/react",
21+
babel: async (options) => ({
22+
...babelConfig,
23+
}),
24+
framework: {
25+
name: "@storybook/react-webpack5",
26+
options: {},
27+
},
2028
refs: {
2129
"@chakra-ui/react": {
2230
disable: true,
2331
},
2432
},
25-
core: {
26-
builder: "webpack5",
27-
},
28-
features: {
29-
storyStoreV7: true,
30-
emotionAlias: false,
31-
},
33+
features: {},
3234
webpackFinal: async (config) => {
33-
// Transpile Gatsby module because Gatsby includes un-transpiled ES6 code.
34-
config.module.rules[0].exclude = [
35-
/node_modules\/(?!(gatsby|gatsby-script)\/)/,
36-
]
37-
// Remove core-js to prevent issues with Storybook
38-
config.module.rules[0].exclude = [/core-js/]
39-
// Use babel-plugin-remove-graphql-queries to remove static queries from components when rendering in storybook
40-
config.module.rules[0].use[0].options.plugins.push(
41-
require.resolve("babel-plugin-remove-graphql-queries")
42-
)
35+
const isRuleExist =
36+
config.module && config.module.rules && config.module.rules.length
37+
if (isRuleExist) {
38+
// Transpile Gatsby module because Gatsby includes un-transpiled ES6 code.
39+
config.module.rules[0].exclude = [
40+
/node_modules\/(?!(gatsby|gatsby-script)\/)/,
41+
]
42+
43+
// Remove core-js to prevent issues with Storybook
44+
config.module.rules[0].exclude = [/core-js/]
45+
}
46+
47+
if (
48+
isRuleExist &&
49+
config.module.rules[0].use &&
50+
config.module.rules[0].use.length
51+
) {
52+
// Use babel-plugin-remove-graphql-queries to remove static queries from components when rendering in storybook
53+
config.module.rules[0].use[0].options.plugins.push(
54+
require.resolve("babel-plugin-remove-graphql-queries")
55+
)
56+
}
57+
4358
config.resolve.mainFields = ["browser", "module", "main"]
4459
return config
4560
},
@@ -72,4 +87,7 @@ module.exports = {
7287
},
7388
},
7489
},
90+
docs: {
91+
autodocs: true,
92+
},
7593
}

.storybook/preview.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { action } from "@storybook/addon-actions"
2+
23
import theme from "../src/@chakra-ui/gatsby-plugin/theme"
3-
import { theme as DefaultChakraTheme } from "@chakra-ui/react"
44

5-
const chakraBreakpointArray = Object.entries(DefaultChakraTheme.breakpoints)
5+
const chakraBreakpointArray = Object.entries(theme.breakpoints)
66

77
// Gatsby's Link overrides:
88
// Gatsby Link calls the `enqueue` & `hovering` methods on the global variable ___loader.

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,23 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
15671567
<td align="center" valign="top" width="14.28%"><a href="http://shawkisukkar.com/"><img src="https://avatars.githubusercontent.com/u/57439827?v=4?s=100" width="100px;" alt="Shawki Sukkar"/><br /><sub><b>Shawki Sukkar</b></sub></a><br /><a href="#content-ShawkiS" title="Content">🖋</a></td>
15681568
<td align="center" valign="top" width="14.28%"><a href="https://github.com/therealharpaljadeja"><img src="https://avatars.githubusercontent.com/u/38040789?v=4?s=100" width="100px;" alt="Harpal Jadeja"/><br /><sub><b>Harpal Jadeja</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=therealharpaljadeja" title="Code">💻</a></td>
15691569
<td align="center" valign="top" width="14.28%"><a href="http://www.zlog.in"><img src="https://avatars.githubusercontent.com/u/67903793?v=4?s=100" width="100px;" alt="Zion"/><br /><sub><b>Zion</b></sub></a><br /><a href="#content-zlog-in" title="Content">🖋</a></td>
1570+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/azpwnz"><img src="https://avatars.githubusercontent.com/u/6987007?v=4?s=100" width="100px;" alt="Andriy Zhuk"/><br /><sub><b>Andriy Zhuk</b></sub></a><br /><a href="#content-azpwnz" title="Content">🖋</a></td>
1571+
<td align="center" valign="top" width="14.28%"><a href="https://etherscan.io/address/gooser.eth"><img src="https://avatars.githubusercontent.com/u/121782105?v=4?s=100" width="100px;" alt="gooser.eth"/><br /><sub><b>gooser.eth</b></sub></a><br /><a href="#content-gooseri" title="Content">🖋</a></td>
1572+
</tr>
1573+
<tr>
1574+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/feibowei"><img src="https://avatars.githubusercontent.com/u/69777448?v=4?s=100" width="100px;" alt="feibowei"/><br /><sub><b>feibowei</b></sub></a><br /><a href="#content-feibowei" title="Content">🖋</a></td>
1575+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mesquitaoliveira"><img src="https://avatars.githubusercontent.com/u/92008139?v=4?s=100" width="100px;" alt="Mesquita Oliveira"/><br /><sub><b>Mesquita Oliveira</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=mesquitaoliveira" title="Documentation">📖</a></td>
1576+
<td align="center" valign="top" width="14.28%"><a href="http://www.juanjosegiraldo.com"><img src="https://avatars.githubusercontent.com/u/91024217?v=4?s=100" width="100px;" alt="Juan José Giraldo"/><br /><sub><b>Juan José Giraldo</b></sub></a><br /><a href="#content-Juancamp1987" title="Content">🖋</a></td>
1577+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Ash20pk"><img src="https://avatars.githubusercontent.com/u/86375577?v=4?s=100" width="100px;" alt="Ash@metaschool"/><br /><sub><b>Ash@metaschool</b></sub></a><br /><a href="#content-Ash20pk" title="Content">🖋</a></td>
1578+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/t-rutten"><img src="https://avatars.githubusercontent.com/u/1389793?v=4?s=100" width="100px;" alt="Tom Rutten"/><br /><sub><b>Tom Rutten</b></sub></a><br /><a href="#content-t-rutten" title="Content">🖋</a></td>
1579+
<td align="center" valign="top" width="14.28%"><a href="http://chawyehsu.com"><img src="https://avatars.githubusercontent.com/u/5764917?v=4?s=100" width="100px;" alt="Chawye Hsu"/><br /><sub><b>Chawye Hsu</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=chawyehsu" title="Documentation">📖</a></td>
1580+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MateusTP"><img src="https://avatars.githubusercontent.com/u/59940545?v=4?s=100" width="100px;" alt="Mateus Pimenta"/><br /><sub><b>Mateus Pimenta</b></sub></a><br /><a href="#content-MateusTP" title="Content">🖋</a></td>
1581+
</tr>
1582+
<tr>
1583+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ezal"><img src="https://avatars.githubusercontent.com/u/6931328?v=4?s=100" width="100px;" alt="ezal"/><br /><sub><b>ezal</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Aezal" title="Bug reports">🐛</a></td>
1584+
<td align="center" valign="top" width="14.28%"><a href="https://jarrodwatts.com"><img src="https://avatars.githubusercontent.com/u/35651410?v=4?s=100" width="100px;" alt="Jarrod Watts"/><br /><sub><b>Jarrod Watts</b></sub></a><br /><a href="#content-jarrodwatts" title="Content">🖋</a></td>
1585+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mlCode111"><img src="https://avatars.githubusercontent.com/u/34754144?v=4?s=100" width="100px;" alt="Miao"/><br /><sub><b>Miao</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=mlCode111" title="Code">💻</a></td>
1586+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ljiatu"><img src="https://avatars.githubusercontent.com/u/3280973?v=4?s=100" width="100px;" alt="Jiatu Liu"/><br /><sub><b>Jiatu Liu</b></sub></a><br /><a href="#content-ljiatu" title="Content">🖋</a></td>
15701587
</tr>
15711588
</tbody>
15721589
</table>

docs/best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ import Emoji from "./Emoji"
163163
// Example of how to add new icon not listed
164164
import { ZzIconName } from "react-icons/zz"
165165
166-
// Then add to IconContect.Provider children:
166+
// Then add to IconContext.Provider children:
167167
{
168168
name === "alias" && <ZzIconName />
169169
}

gatsby-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const config: GatsbyConfig = {
7070
{
7171
resolve: `gatsby-plugin-sitemap`,
7272
options: {
73+
output: "/sitemap",
7374
query: `{
7475
site {
7576
siteMetadata {

package.json

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereum-org-website",
3-
"version": "7.1.0",
3+
"version": "7.4.1",
44
"description": "Website of ethereum.org",
55
"main": "index.js",
66
"repository": "[email protected]:ethereum/ethereum-org-website.git",
@@ -76,17 +76,19 @@
7676
},
7777
"devDependencies": {
7878
"@babel/core": "^7.19.6",
79+
"@babel/preset-env": "^7.20.2",
80+
"@babel/preset-react": "^7.18.6",
81+
"@babel/preset-typescript": "^7.18.6",
7982
"@chakra-ui/storybook-addon": "^4.0.12",
8083
"@netlify/functions": "^1.2.0",
81-
"@storybook/addon-a11y": "^6.5.13",
82-
"@storybook/addon-actions": "^6.5.13",
83-
"@storybook/addon-essentials": "^6.5.13",
84-
"@storybook/addon-interactions": "^6.5.13",
85-
"@storybook/addon-links": "^6.5.13",
86-
"@storybook/builder-webpack5": "^6.5.13",
87-
"@storybook/manager-webpack5": "^6.5.13",
88-
"@storybook/react": "^6.5.13",
89-
"@storybook/testing-library": "^0.0.13",
84+
"@storybook/addon-a11y": "^7.0.0-beta.51",
85+
"@storybook/addon-actions": "^7.0.0-beta.51",
86+
"@storybook/addon-essentials": "^7.0.0-beta.51",
87+
"@storybook/addon-interactions": "^7.0.0-beta.51",
88+
"@storybook/addon-links": "^7.0.0-beta.51",
89+
"@storybook/react": "^7.0.0-beta.51",
90+
"@storybook/react-webpack5": "^7.0.0-beta.51",
91+
"@storybook/testing-library": "^0.0.14-next.1",
9092
"@types/browser-lang": "^0.1.0",
9193
"@types/github-slugger": "^1.3.0",
9294
"@types/luxon": "^2.3.2",
@@ -105,6 +107,7 @@
105107
"minimist": "^1.2.6",
106108
"prettier": "^2.2.1",
107109
"pretty-quick": "^3.1.0",
110+
"storybook": "^7.0.0-beta.51",
108111
"ts-node": "^10.9.1",
109112
"typescript": "^4.6.3"
110113
},
@@ -116,15 +119,15 @@
116119
"crowdin-clean": "rm -rf .crowdin && mkdir .crowdin",
117120
"crowdin-import": "ts-node src/scripts/crowdin-import.ts",
118121
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
119-
"markdown-checker": "node src/scripts/markdown-checker.js",
122+
"markdown-checker": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/markdownChecker.ts",
120123
"generate-heading-ids": "ts-node -O '{ \"module\": \"commonjs\" }' src/scripts/generateHeadingIds.ts",
121124
"start": "gatsby develop",
122125
"start:lambda": "netlify-lambda serve src/lambda",
123126
"start:static": "gatsby build && gatsby serve",
124127
"serve": "gatsby serve",
125128
"type-check": "tsc --noEmit",
126-
"storybook": "start-storybook -p 6006",
127-
"build-storybook": "build-storybook"
129+
"storybook": "storybook dev -p 6006 -c .storybook",
130+
"build-storybook": "storybook build"
128131
},
129132
"husky": {
130133
"hooks": {

0 commit comments

Comments
 (0)