Skip to content

Commit 5a6e82b

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into feat/bannergridcomponents-story
2 parents 6dd70d4 + fb601b2 commit 5a6e82b

File tree

394 files changed

+15828
-8420
lines changed

Some content is hidden

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

394 files changed

+15828
-8420
lines changed

.all-contributorsrc

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12362,6 +12362,78 @@
1236212362
"contributions": [
1236312363
"content"
1236412364
]
12365+
},
12366+
{
12367+
"login": "tr1sm0s1n",
12368+
"name": "Mobin Mohanan",
12369+
"avatar_url": "https://avatars.githubusercontent.com/u/47410557?v=4",
12370+
"profile": "https://github.com/tr1sm0s1n",
12371+
"contributions": [
12372+
"content"
12373+
]
12374+
},
12375+
{
12376+
"login": "Baystef",
12377+
"name": "Adebayo Steve",
12378+
"avatar_url": "https://avatars.githubusercontent.com/u/36106823?v=4",
12379+
"profile": "https://github.com/Baystef",
12380+
"contributions": [
12381+
"code"
12382+
]
12383+
},
12384+
{
12385+
"login": "sanjanaynvsdl",
12386+
"name": "Sanjana",
12387+
"avatar_url": "https://avatars.githubusercontent.com/u/142678317?v=4",
12388+
"profile": "https://github.com/sanjanaynvsdl",
12389+
"contributions": [
12390+
"bug"
12391+
]
12392+
},
12393+
{
12394+
"login": "zaryab2000",
12395+
"name": "Zaryab",
12396+
"avatar_url": "https://avatars.githubusercontent.com/u/42082608?v=4",
12397+
"profile": "https://www.zaryabs.com/",
12398+
"contributions": [
12399+
"content"
12400+
]
12401+
},
12402+
{
12403+
"login": "yannggg",
12404+
"name": "Yann Gerardi",
12405+
"avatar_url": "https://avatars.githubusercontent.com/u/29145014?v=4",
12406+
"profile": "https://www.mtpelerin.com",
12407+
"contributions": [
12408+
"code"
12409+
]
12410+
},
12411+
{
12412+
"login": "panditdhamdhere",
12413+
"name": "Pandit Dhamdhere",
12414+
"avatar_url": "https://avatars.githubusercontent.com/u/85685981?v=4",
12415+
"profile": "https://github.com/panditdhamdhere",
12416+
"contributions": [
12417+
"code"
12418+
]
12419+
},
12420+
{
12421+
"login": "ferreiramarcelo",
12422+
"name": "M@rC3L0",
12423+
"avatar_url": "https://avatars.githubusercontent.com/u/11818521?v=4",
12424+
"profile": "http://linkedin.com/in/fmarcelo",
12425+
"contributions": [
12426+
"ideas"
12427+
]
12428+
},
12429+
{
12430+
"login": "Refdeveloper",
12431+
"name": "DevOFtoken",
12432+
"avatar_url": "https://avatars.githubusercontent.com/u/87125773?v=4",
12433+
"profile": "https://github.com/Refdeveloper",
12434+
"contributions": [
12435+
"ideas"
12436+
]
1236512437
}
1236612438
],
1236712439
"contributorsPerLine": 7,

.env.example

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,11 @@ BUILD_LOCALES=
3333

3434
# If resource constraints are being hit during builds, change LIMIT_CPUS to a
3535
# fixed number of CPUs (e.g. 2) to limit the demand during build time
36-
LIMIT_CPUS=
36+
LIMIT_CPUS=
37+
38+
# Sentry auth token required for error tracking
39+
SENTRY_AUTH_TOKEN=
40+
NEXT_PUBLIC_SENTRY_DSN=
41+
42+
# Enables the bundle analyzer
43+
ANALYZE=false

.eslintrc.json

Lines changed: 12 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
"env": {
1010
"es6": true
1111
},
12-
"plugins": [
13-
"simple-import-sort",
14-
"@typescript-eslint",
15-
"unused-imports"
16-
],
12+
"plugins": ["simple-import-sort", "@typescript-eslint", "unused-imports"],
1713
"parser": "@typescript-eslint/parser",
1814
"rules": {
1915
"simple-import-sort/imports": [
@@ -26,55 +22,29 @@
2622
],
2723
// Packages. `react` related packages come first.
2824
// Also, put `react-icons` in sorting order not with `react`
29-
[
30-
"^react(?!-.)$",
31-
"^\\w",
32-
"^@\\w"
33-
],
25+
["^react(?!-.)$", "^\\w", "^@\\w"],
3426
// The Chakra theme directory if imported to story file or other places
35-
[
36-
"^@/@chakra-ui"
37-
],
27+
["^@/@chakra-ui"],
3828
// From the `types` directory.
39-
[
40-
"^@/lib/types",
41-
"^@/lib/interfaces"
42-
],
29+
["^@/lib/types", "^@/lib/interfaces"],
4330
// From the `components` directory.
44-
[
45-
"^@/components"
46-
],
31+
["^@/components"],
4732
// From the `utils` directory.
48-
[
49-
"^@/lib/utils"
50-
],
33+
["^@/lib/utils"],
5134
// From the `data` directory.
52-
[
53-
"^@/data"
54-
],
35+
["^@/data"],
5536
// From the `constants` directory.
5637
["^@/lib/constants"],
5738
// From the `.storybook/utils` file
5839
["^@/storybook-utils"],
5940
// Parent imports. Put `..` last.
60-
[
61-
"^\\.\\.(?!/?$)",
62-
"^\\.\\./?$"
63-
],
41+
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
6442
// Other relative imports. Put same-folder imports and `.` last.
65-
[
66-
"^\\./(?=.*/)(?!/?$)",
67-
"^\\.(?!/?$)",
68-
"^\\./?$"
69-
],
43+
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
7044
// Style imports.
71-
[
72-
"^.+\\.s?css$"
73-
],
45+
["^.+\\.s?css$"],
7446
// Side effect imports.
75-
[
76-
"^\\u0000"
77-
]
47+
["^\\u0000"]
7848
]
7949
}
8050
],
@@ -89,7 +59,7 @@
8959
],
9060
"unused-imports/no-unused-vars": [
9161
"error",
92-
{
62+
{
9363
"args": "all",
9464
"argsIgnorePattern": "^_$",
9565
"varsIgnorePattern": "^_$"
@@ -98,4 +68,3 @@
9868
"unused-imports/no-unused-imports-ts": "warn"
9969
}
10070
}
101-

.github/workflows/non-english-warning.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

.storybook/i18next.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const ns = [
2121
"page-upgrades",
2222
"page-developers-index",
2323
"page-what-is-ethereum",
24+
"page-upgrades-index",
2425
] as const
2526
const supportedLngs = Object.keys(baseLocales)
2627

.storybook/main.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ const config: StorybookConfig = {
4747
},
4848
},
4949
webpackFinal: async (config) => {
50+
config.module = config.module || {}
51+
config.module.rules = config.module.rules || []
52+
5053
if (config.resolve) {
5154
config.resolve.plugins = [
5255
...(config.resolve.plugins || []),
@@ -55,6 +58,22 @@ const config: StorybookConfig = {
5558
}),
5659
]
5760
}
61+
62+
// This modifies the existing image rule to exclude .svg files
63+
// since you want to handle those files with @svgr/webpack
64+
const imageRule = config.module.rules.find((rule) =>
65+
rule?.["test"]?.test(".svg")
66+
)
67+
if (imageRule) {
68+
imageRule["exclude"] = /\.svg$/
69+
}
70+
71+
// Configure .svg files to be loaded with @svgr/webpack
72+
config.module.rules.push({
73+
test: /\.svg$/,
74+
use: ["@svgr/webpack"],
75+
})
76+
5877
return config
5978
},
6079
typescript: {

.storybook/preview.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import isChromatic from "chromatic/isChromatic"
22
import { MotionGlobalConfig } from "framer-motion"
3-
import { withThemeByDataAttribute } from "@storybook/addon-themes"
43
import type { Preview } from "@storybook/react"
54

65
import ThemeProvider from "@/components/ThemeProvider"
76

87
import i18n, { baseLocales } from "./i18next"
8+
import { withNextThemes } from "./withNextThemes"
99

1010
import "../src/styles/global.css"
1111
import "../src/styles/fonts.css"
12+
import "../src/styles/docsearch.css"
13+
14+
import "@docsearch/css"
1215

1316
MotionGlobalConfig.skipAnimations = isChromatic()
1417

@@ -27,7 +30,7 @@ const preview: Preview = {
2730
locales: baseLocales,
2831
},
2932
decorators: [
30-
withThemeByDataAttribute({
33+
withNextThemes({
3134
themes: {
3235
light: "light",
3336
dark: "dark",

.storybook/withNextThemes.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { useEffect } from "react"
2+
import { useTheme } from "next-themes"
3+
import {
4+
type DataAttributeStrategyConfiguration,
5+
DecoratorHelpers,
6+
} from "@storybook/addon-themes"
7+
import type { Decorator } from "@storybook/react/*"
8+
9+
const { initializeThemeState, pluckThemeFromContext } = DecoratorHelpers
10+
11+
export const withNextThemes = ({
12+
themes,
13+
defaultTheme,
14+
}: DataAttributeStrategyConfiguration): Decorator => {
15+
initializeThemeState(Object.keys(themes), defaultTheme)
16+
17+
return (getStory, context) => {
18+
const selectedTheme = pluckThemeFromContext(context)
19+
const selected = selectedTheme || defaultTheme
20+
const { setTheme } = useTheme()
21+
22+
useEffect(() => {
23+
setTheme(selected)
24+
}, [selected, setTheme])
25+
26+
return getStory(context)
27+
}
28+
}

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ yarn dev
9696
- Pro Tip:
9797
- Explore scripts within `package.json` for more build options
9898
- Get **faster** production builds by building only one language. E.g. in your `.env` file, set `BUILD_LOCALES=en` to build the content only in English
99+
- To build the site in other selected languages too, you need to set them in `BUILD_LOCALES`, eg: `BUILD_LOCALES=en,es` if you also want to build only English (required) and Spanish.
100+
- To build all languages, simply comment this line out with a hash mark, eg: `# BUILD_LOCALES=`
99101

100102
By default the script will build all the languages (complete list in `i18n.config.json`).
101103

@@ -1889,6 +1891,16 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
18891891
<td align="center" valign="top" width="14.28%"><a href="https://github.com/krishchvn"><img src="https://avatars.githubusercontent.com/u/58606754?v=4?s=100" width="100px;" alt="Krishnakumar Chavan"/><br /><sub><b>Krishnakumar Chavan</b></sub></a><br /><a href="#content-krishchvn" title="Content">🖋</a></td>
18901892
<td align="center" valign="top" width="14.28%"><a href="https://github.com/0xV4L3NT1N3"><img src="https://avatars.githubusercontent.com/u/33112835?v=4?s=100" width="100px;" alt="0xV4L3NT1N3"/><br /><sub><b>0xV4L3NT1N3</b></sub></a><br /><a href="#tool-0xV4L3NT1N3" title="Tools">🔧</a></td>
18911893
<td align="center" valign="top" width="14.28%"><a href="https://github.com/JoshDavisLight"><img src="https://avatars.githubusercontent.com/u/82784104?v=4?s=100" width="100px;" alt="Josh Davis"/><br /><sub><b>Josh Davis</b></sub></a><br /><a href="#content-JoshDavisLight" title="Content">🖋</a></td>
1894+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tr1sm0s1n"><img src="https://avatars.githubusercontent.com/u/47410557?v=4?s=100" width="100px;" alt="Mobin Mohanan"/><br /><sub><b>Mobin Mohanan</b></sub></a><br /><a href="#content-tr1sm0s1n" title="Content">🖋</a></td>
1895+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Baystef"><img src="https://avatars.githubusercontent.com/u/36106823?v=4?s=100" width="100px;" alt="Adebayo Steve"/><br /><sub><b>Adebayo Steve</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=Baystef" title="Code">💻</a></td>
1896+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sanjanaynvsdl"><img src="https://avatars.githubusercontent.com/u/142678317?v=4?s=100" width="100px;" alt="Sanjana"/><br /><sub><b>Sanjana</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Asanjanaynvsdl" title="Bug reports">🐛</a></td>
1897+
<td align="center" valign="top" width="14.28%"><a href="https://www.zaryabs.com/"><img src="https://avatars.githubusercontent.com/u/42082608?v=4?s=100" width="100px;" alt="Zaryab"/><br /><sub><b>Zaryab</b></sub></a><br /><a href="#content-zaryab2000" title="Content">🖋</a></td>
1898+
</tr>
1899+
<tr>
1900+
<td align="center" valign="top" width="14.28%"><a href="https://www.mtpelerin.com"><img src="https://avatars.githubusercontent.com/u/29145014?v=4?s=100" width="100px;" alt="Yann Gerardi"/><br /><sub><b>Yann Gerardi</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=yannggg" title="Code">💻</a></td>
1901+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/panditdhamdhere"><img src="https://avatars.githubusercontent.com/u/85685981?v=4?s=100" width="100px;" alt="Pandit Dhamdhere"/><br /><sub><b>Pandit Dhamdhere</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=panditdhamdhere" title="Code">💻</a></td>
1902+
<td align="center" valign="top" width="14.28%"><a href="http://linkedin.com/in/fmarcelo"><img src="https://avatars.githubusercontent.com/u/11818521?v=4?s=100" width="100px;" alt="M@rC3L0"/><br /><sub><b>M@rC3L0</b></sub></a><br /><a href="#ideas-ferreiramarcelo" title="Ideas, Planning, & Feedback">🤔</a></td>
1903+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Refdeveloper"><img src="https://avatars.githubusercontent.com/u/87125773?v=4?s=100" width="100px;" alt="DevOFtoken"/><br /><sub><b>DevOFtoken</b></sub></a><br /><a href="#ideas-Refdeveloper" title="Ideas, Planning, & Feedback">🤔</a></td>
18921904
</tr>
18931905
</tbody>
18941906
</table>

0 commit comments

Comments
 (0)