Skip to content

Commit 8cfe49f

Browse files
authored
Merge branch 'dev' into addTranslatorsToContributors
2 parents 9fa4202 + 0fc7886 commit 8cfe49f

File tree

360 files changed

+46797
-28482
lines changed

Some content is hidden

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

360 files changed

+46797
-28482
lines changed

.all-contributorsrc

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8756,7 +8756,8 @@
87568756
"profile": "https://github.com/MahendraBishnoi29",
87578757
"contributions": [
87588758
"ideas",
8759-
"code"
8759+
"code",
8760+
"bug"
87608761
]
87618762
},
87628763
{
@@ -10210,6 +10211,80 @@
1021010211
"content",
1021110212
"code"
1021210213
]
10214+
},
10215+
{
10216+
"login": "maxime216-pro",
10217+
"name": "Maxime Dessez",
10218+
"avatar_url": "https://avatars.githubusercontent.com/u/66296351?v=4",
10219+
"profile": "http://maximedessez.fr",
10220+
"contributions": [
10221+
"bug",
10222+
"translation"
10223+
]
10224+
},
10225+
{
10226+
"login": "Tyler-233",
10227+
"name": "Tyler-233",
10228+
"avatar_url": "https://avatars.githubusercontent.com/u/44740396?v=4",
10229+
"profile": "https://github.com/Tyler-233",
10230+
"contributions": [
10231+
"translation",
10232+
"content"
10233+
]
10234+
},
10235+
{
10236+
"login": "neodaoist",
10237+
"name": "neodaoist",
10238+
"avatar_url": "https://avatars.githubusercontent.com/u/3170590?v=4",
10239+
"profile": "http://neodaoist.xyz",
10240+
"contributions": [
10241+
"content"
10242+
]
10243+
},
10244+
{
10245+
"login": "atharvadeosthale",
10246+
"name": "Atharva Deosthale",
10247+
"avatar_url": "https://avatars.githubusercontent.com/u/11805367?v=4",
10248+
"profile": "https://links.atharva.codes",
10249+
"contributions": [
10250+
"content"
10251+
]
10252+
},
10253+
{
10254+
"login": "ckartik",
10255+
"name": "Kartik Chopra",
10256+
"avatar_url": "https://avatars.githubusercontent.com/u/13803371?v=4",
10257+
"profile": "https://github.com/ckartik",
10258+
"contributions": [
10259+
"content"
10260+
]
10261+
},
10262+
{
10263+
"login": "BBashh",
10264+
"name": "Bibash Tandon",
10265+
"avatar_url": "https://avatars.githubusercontent.com/u/125178349?v=4",
10266+
"profile": "https://github.com/BBashh",
10267+
"contributions": [
10268+
"content"
10269+
]
10270+
},
10271+
{
10272+
"login": "vaibhavtevatia",
10273+
"name": "Vaibhav Tevatia",
10274+
"avatar_url": "https://avatars.githubusercontent.com/u/86671961?v=4",
10275+
"profile": "https://github.com/vaibhavtevatia",
10276+
"contributions": [
10277+
"code"
10278+
]
10279+
},
10280+
{
10281+
"login": "cnn-rnn",
10282+
"name": "cnn-rnn",
10283+
"avatar_url": "https://avatars.githubusercontent.com/u/44789658?v=4",
10284+
"profile": "https://github.com/cnn-rnn",
10285+
"contributions": [
10286+
"ideas"
10287+
]
1021310288
}
1021410289
],
1021510290
"contributorsPerLine": 7,

.storybook/babel-storybook-config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
export const babelConfig = {
1+
import { TransformOptions } from "@babel/core"
2+
3+
export const babelConfig: TransformOptions = {
24
sourceType: "unambiguous",
35
presets: [
46
[

.storybook/i18next.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import i18n, { Resource } from "i18next"
2+
import { initReactI18next } from "gatsby-plugin-react-i18next"
3+
4+
export const baseLocales = {
5+
en: { title: "English", left: "En" },
6+
zh: { title: "中国人", left: "Zh" },
7+
ru: { title: "Русский", left: "Ru" },
8+
uk: { title: "українська", left: "Uk" },
9+
}
10+
11+
// Only i18n files named in this array are being exposed to Storybook. Add filenames as necessary.
12+
const ns = ["common", "page-about", "page-upgrades", "page-developers-index"]
13+
const supportedLngs = Object.keys(baseLocales)
14+
15+
/**
16+
* Taking the ns array and combining all the ids
17+
* under a single ns per language, set to the default of "translation"
18+
*/
19+
const resources: Resource = ns.reduce((acc, n) => {
20+
supportedLngs.forEach((lng) => {
21+
if (!acc[lng]) acc[lng] = {}
22+
acc[lng] = {
23+
translation: {
24+
...acc[lng].translation,
25+
...require(`../src/intl/${lng}/${n}.json`),
26+
},
27+
}
28+
})
29+
return acc
30+
}, {})
31+
32+
i18n.use(initReactI18next).init({
33+
debug: true,
34+
fallbackLng: "en",
35+
interpolation: { escapeValue: false },
36+
react: { useSuspense: false },
37+
supportedLngs,
38+
resources,
39+
})
40+
41+
export default i18n
Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const { propNames } = require("@chakra-ui/react")
1+
import { StorybookConfig } from "@storybook/react-webpack5"
2+
import { propNames } from "@chakra-ui/react"
3+
import { babelConfig } from "./babel-storybook-config"
24

3-
const { babelConfig } = require("./babel-storybook-config")
4-
5-
module.exports = {
5+
const config: StorybookConfig = {
66
stories: ["../src/components/**/*.stories.tsx"],
77
addons: [
88
"@storybook/addon-links",
@@ -11,9 +11,10 @@ module.exports = {
1111
// https://storybook.js.org/addons/@storybook/addon-a11y/
1212
"@storybook/addon-a11y",
1313
"@chakra-ui/storybook-addon",
14+
"storybook-react-i18next",
1415
],
1516
staticDirs: ["../static"],
16-
babel: async (options) => ({
17+
babel: async () => ({
1718
...babelConfig,
1819
}),
1920
framework: {
@@ -27,30 +28,30 @@ module.exports = {
2728
},
2829
features: {},
2930
webpackFinal: async (config) => {
30-
const isRuleExist =
31-
config.module && config.module.rules && config.module.rules.length
32-
if (isRuleExist) {
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-
38-
// Remove core-js to prevent issues with Storybook
39-
config.module.rules[0].exclude = [/core-js/]
40-
}
41-
4231
if (
43-
isRuleExist &&
44-
config.module.rules[0].use &&
45-
config.module.rules[0].use.length
32+
config.module != undefined &&
33+
config.module.rules != undefined &&
34+
config.module.rules[0] !== "..."
4635
) {
47-
// Use babel-plugin-remove-graphql-queries to remove static queries from components when rendering in storybook
48-
config.module.rules[0].use[0].options.plugins.push(
49-
require.resolve("babel-plugin-remove-graphql-queries")
50-
)
36+
config.module.rules[0].exclude = [/node_modules\/(?!(gatsby)\/)/]
37+
config.module.rules[0].use = [
38+
{
39+
loader: require.resolve("babel-loader"),
40+
options: {
41+
presets: [
42+
// use @babel/preset-react for JSX and env (instead of staged presets)
43+
require.resolve("@babel/preset-react"),
44+
require.resolve("@babel/preset-env"),
45+
],
46+
plugins: [
47+
// use babel-plugin-remove-graphql-queries to remove static queries from components when rendering in storybook
48+
require.resolve("babel-plugin-remove-graphql-queries"),
49+
],
50+
},
51+
},
52+
]
5153
}
5254

53-
config.resolve.mainFields = ["browser", "module", "main"]
5455
return config
5556
},
5657
typescript: {
@@ -83,3 +84,5 @@ module.exports = {
8384
},
8485
},
8586
}
87+
88+
export default config
Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
import { Preview } from "@storybook/react"
12
import { action } from "@storybook/addon-actions"
23

4+
import i18n, { baseLocales } from "./i18next"
35
import theme from "../src/@chakra-ui/gatsby-plugin/theme"
46

5-
import "../static/fonts/inter-font-face.css"
6-
import "../static/fonts/ibm-plex-font-face.css"
7-
87
const chakraBreakpointArray = Object.entries(theme.breakpoints)
98

109
// Gatsby's Link overrides:
@@ -26,42 +25,48 @@ window.___navigate = (pathname) => {
2625
action("NavigateTo:")(pathname)
2726
}
2827

29-
export const parameters = {
30-
actions: { argTypesRegex: "^on[A-Z].*" },
31-
backgrounds: {
32-
disable: true,
28+
const preview: Preview = {
29+
globals: {
30+
locale: "en",
31+
locales: baseLocales,
3332
},
34-
controls: {
35-
matchers: {
36-
color: /(background|color)$/i,
37-
date: /Date$/,
33+
parameters: {
34+
i18n,
35+
actions: { argTypesRegex: "^on[A-Z].*" },
36+
controls: {
37+
matchers: {
38+
color: /(background|color)$/i,
39+
date: /Date$/,
40+
},
3841
},
39-
},
40-
backgrounds: {
41-
disable: true,
42-
},
43-
chakra: {
44-
theme,
45-
},
46-
layout: "centered",
47-
// Modify viewport selection to match Chakra breakpoints (or custom breakpoints)
48-
viewport: {
49-
viewports: chakraBreakpointArray.reduce((prevVal, currVal) => {
50-
const [token, key] = currVal
42+
backgrounds: {
43+
disable: true,
44+
},
45+
chakra: {
46+
theme,
47+
},
48+
layout: "centered",
49+
// Modify viewport selection to match Chakra breakpoints (or custom breakpoints)
50+
viewport: {
51+
viewports: chakraBreakpointArray.reduce((prevVal, currVal) => {
52+
const [token, key] = currVal
5153

52-
// Unnecessary breakpoint
53-
if (token === "base") return { ...prevVal }
54+
// Unnecessary breakpoint
55+
if (token === "base") return { ...prevVal }
5456

55-
return {
56-
...prevVal,
57-
[token]: {
58-
name: token,
59-
styles: {
60-
width: key,
61-
height: "600px",
57+
return {
58+
...prevVal,
59+
[token]: {
60+
name: token,
61+
styles: {
62+
width: key,
63+
height: "600px",
64+
},
6265
},
63-
},
64-
}
65-
}, {}),
66+
}
67+
}, {}),
68+
},
6669
},
6770
}
71+
72+
export default preview

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
13921392
<td align="center" valign="top" width="14.28%"><a href="https://carllippert.com"><img src="https://avatars.githubusercontent.com/u/16457876?v=4?s=100" width="100px;" alt="Carl Lippert"/><br /><sub><b>Carl Lippert</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=carllippert" title="Documentation">📖</a></td>
13931393
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tymtam2"><img src="https://avatars.githubusercontent.com/u/1097613?v=4?s=100" width="100px;" alt="Tymek Majewski"/><br /><sub><b>Tymek Majewski</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=tymtam2" title="Documentation">📖</a></td>
13941394
<td align="center" valign="top" width="14.28%"><a href="http://cryptolibertarian.id"><img src="https://avatars.githubusercontent.com/u/108990005?v=4?s=100" width="100px;" alt="Cryptolibertarian.id"/><br /><sub><b>Cryptolibertarian.id</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=Cryptolibertarian-id" title="Documentation">📖</a></td>
1395-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MahendraBishnoi29"><img src="https://avatars.githubusercontent.com/u/74294202?v=4?s=100" width="100px;" alt="browny"/><br /><sub><b>browny</b></sub></a><br /><a href="#ideas-MahendraBishnoi29" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/ethereum/ethereum-org-website/commits?author=MahendraBishnoi29" title="Code">💻</a></td>
1395+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MahendraBishnoi29"><img src="https://avatars.githubusercontent.com/u/74294202?v=4?s=100" width="100px;" alt="browny"/><br /><sub><b>browny</b></sub></a><br /><a href="#ideas-MahendraBishnoi29" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/ethereum/ethereum-org-website/commits?author=MahendraBishnoi29" title="Code">💻</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3AMahendraBishnoi29" title="Bug reports">🐛</a></td>
13961396
</tr>
13971397
<tr>
13981398
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sandakersmann"><img src="https://avatars.githubusercontent.com/u/6118832?v=4?s=100" width="100px;" alt="Marius Kjærstad"/><br /><sub><b>Marius Kjærstad</b></sub></a><br /><a href="#ideas-sandakersmann" title="Ideas, Planning, & Feedback">🤔</a></td>
@@ -1599,6 +1599,16 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
15991599
<td align="center" valign="top" width="14.28%"><a href="https://github.com/stephenfire"><img src="https://avatars.githubusercontent.com/u/17247036?v=4?s=100" width="100px;" alt="Stephen Guo"/><br /><sub><b>Stephen Guo</b></sub></a><br /><a href="#translation-stephenfire" title="Translation">🌍</a></td>
16001600
<td align="center" valign="top" width="14.28%"><a href="http://aumson.org/gene"><img src="https://avatars.githubusercontent.com/u/7883777?v=4?s=100" width="100px;" alt="F. Eugene Aumson"/><br /><sub><b>F. Eugene Aumson</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3AfeuGeneA" title="Bug reports">🐛</a> <a href="#content-feuGeneA" title="Content">🖋</a></td>
16011601
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rpalakkal"><img src="https://avatars.githubusercontent.com/u/19766713?v=4?s=100" width="100px;" alt="Roshan"/><br /><sub><b>Roshan</b></sub></a><br /><a href="#content-rpalakkal" title="Content">🖋</a> <a href="https://github.com/ethereum/ethereum-org-website/commits?author=rpalakkal" title="Code">💻</a></td>
1602+
<td align="center" valign="top" width="14.28%"><a href="http://maximedessez.fr"><img src="https://avatars.githubusercontent.com/u/66296351?v=4?s=100" width="100px;" alt="Maxime Dessez"/><br /><sub><b>Maxime Dessez</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Amaxime216-pro" title="Bug reports">🐛</a> <a href="#translation-maxime216-pro" title="Translation">🌍</a></td>
1603+
</tr>
1604+
<tr>
1605+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Tyler-233"><img src="https://avatars.githubusercontent.com/u/44740396?v=4?s=100" width="100px;" alt="Tyler-233"/><br /><sub><b>Tyler-233</b></sub></a><br /><a href="#translation-Tyler-233" title="Translation">🌍</a> <a href="#content-Tyler-233" title="Content">🖋</a></td>
1606+
<td align="center" valign="top" width="14.28%"><a href="http://neodaoist.xyz"><img src="https://avatars.githubusercontent.com/u/3170590?v=4?s=100" width="100px;" alt="neodaoist"/><br /><sub><b>neodaoist</b></sub></a><br /><a href="#content-neodaoist" title="Content">🖋</a></td>
1607+
<td align="center" valign="top" width="14.28%"><a href="https://links.atharva.codes"><img src="https://avatars.githubusercontent.com/u/11805367?v=4?s=100" width="100px;" alt="Atharva Deosthale"/><br /><sub><b>Atharva Deosthale</b></sub></a><br /><a href="#content-atharvadeosthale" title="Content">🖋</a></td>
1608+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ckartik"><img src="https://avatars.githubusercontent.com/u/13803371?v=4?s=100" width="100px;" alt="Kartik Chopra"/><br /><sub><b>Kartik Chopra</b></sub></a><br /><a href="#content-ckartik" title="Content">🖋</a></td>
1609+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/BBashh"><img src="https://avatars.githubusercontent.com/u/125178349?v=4?s=100" width="100px;" alt="Bibash Tandon"/><br /><sub><b>Bibash Tandon</b></sub></a><br /><a href="#content-BBashh" title="Content">🖋</a></td>
1610+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vaibhavtevatia"><img src="https://avatars.githubusercontent.com/u/86671961?v=4?s=100" width="100px;" alt="Vaibhav Tevatia"/><br /><sub><b>Vaibhav Tevatia</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=vaibhavtevatia" title="Code">💻</a></td>
1611+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/cnn-rnn"><img src="https://avatars.githubusercontent.com/u/44789658?v=4?s=100" width="100px;" alt="cnn-rnn"/><br /><sub><b>cnn-rnn</b></sub></a><br /><a href="#ideas-cnn-rnn" title="Ideas, Planning, & Feedback">🤔</a></td>
16021612
</tr>
16031613
</tbody>
16041614
</table>

0 commit comments

Comments
 (0)