Skip to content

Commit b7ecb5d

Browse files
committed
Merge branch 'dev' into feedback-v2
2 parents 09a1536 + 8a31c7e commit b7ecb5d

File tree

665 files changed

+68944
-34472
lines changed

Some content is hidden

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

665 files changed

+68944
-34472
lines changed

.all-contributorsrc

Lines changed: 576 additions & 3 deletions
Large diffs are not rendered by default.

.babelrc

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

README.md

Lines changed: 1326 additions & 1245 deletions
Large diffs are not rendered by default.

gatsby-browser.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ require("prismjs/components/prism-solidity")
3131

3232
// Prevents <Layout/> from unmounting on page transitions
3333
// https://www.gatsbyjs.com/docs/layout-components/#how-to-prevent-layout-components-from-unmounting
34+
// @ts-ignore: returning `null` is not accepted by the `GatsbyBrowser` type def.
3435
export const wrapPageElement: GatsbyBrowser<
3536
any,
3637
Context
@@ -60,8 +61,7 @@ export const wrapPageElement: GatsbyBrowser<
6061
window.localStorage.setItem("eth-org-language", detected)
6162
window.location.replace(newUrl)
6263

63-
// can't return null here, must return an element
64-
return <div />
64+
return null
6565
}
6666

6767
return <Layout {...props}>{element}</Layout>

gatsby-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ const config: GatsbyConfig = {
205205
options: {
206206
resetCSS: true,
207207
isUsingColorMode: true,
208+
portalZIndex: 1001,
208209
},
209210
},
210211
// Source assets

gatsby-ssr.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,26 @@ import type { GatsbySSR } from "gatsby"
1111
import Layout from "./src/components/Layout"
1212

1313
import { Context } from "./src/types"
14+
import { IS_DEV } from "./src/utils/env"
15+
import { isLang } from "./src/utils/languages"
1416

1517
// Prevents <Layout/> from unmounting on page transitions
1618
// https://www.gatsbyjs.com/docs/layout-components/#how-to-prevent-layout-components-from-unmounting
19+
// @ts-ignore: returning `null` is not accepted by the `GatsbySSR` type def.
1720
export const wrapPageElement: GatsbySSR<any, Context>["wrapPageElement"] = ({
1821
element,
1922
props,
2023
}) => {
24+
const { location } = props
25+
const { pathname } = location
26+
27+
const [, pathLocale] = pathname.split("/")
28+
29+
// this is to avoid having hydration issues on dev mode. Check the logic
30+
// inside gatsby-browser.tsx
31+
if (IS_DEV && !isLang(pathLocale)) {
32+
return null
33+
}
34+
2135
return <Layout {...props}>{element}</Layout>
2236
}

i18n/config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,14 @@
191191
"langDir": "ltr",
192192
"dateFormat": "MM/DD/YYYY"
193193
},
194+
{
195+
"code": "km",
196+
"hrefLang": "km",
197+
"name": "Khmer",
198+
"localName": "ចក្រភពខ្មែរ",
199+
"langDir": "ltr",
200+
"dateFormat": "MM/DD/YYYY"
201+
},
194202
{
195203
"code": "ko",
196204
"hrefLang": "ko",

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereum-org-website",
3-
"version": "6.6.0",
3+
"version": "6.9.2",
44
"description": "Website of ethereum.org",
55
"main": "index.js",
66
"repository": "git@github.com:ethereum/ethereum-org-website.git",
@@ -69,14 +69,13 @@
6969
"react-icons": "^4.3.1",
7070
"react-instantsearch-dom": "^6.32.0",
7171
"react-intl": "^3.12.1",
72-
"react-rewards": "^2.0.4",
7372
"react-select": "^4.3.0",
7473
"recharts": "^2.1.9",
7574
"styled-system": "^5.1.5",
7675
"unist-util-visit-parents": "^2.1.2"
7776
},
7877
"devDependencies": {
79-
"@netlify/functions": "^1.0.0",
78+
"@netlify/functions": "^1.2.0",
8079
"@types/browser-lang": "^0.1.0",
8180
"@types/github-slugger": "^1.3.0",
8281
"@types/luxon": "^2.3.2",
@@ -86,7 +85,7 @@
8685
"@types/react-dom": "^18.0.6",
8786
"@types/react-instantsearch-core": "^6.26.2",
8887
"@types/styled-system": "^5.1.15",
89-
"babel-preset-gatsby": "^2.14.0",
88+
"babel-preset-gatsby": "^2.23.0",
9089
"github-slugger": "^1.3.0",
9190
"gray-matter": "^4.0.3",
9291
"husky": "^4.2.5",
@@ -99,7 +98,7 @@
9998
},
10099
"scripts": {
101100
"build": "gatsby build",
102-
"build:lambda": "netlify-lambda build src/lambda",
101+
"build:lambda": "netlify-lambda build src/lambda --config=./webpack.lambda.js",
103102
"build:10gb": "NODE_OPTIONS=--max-old-space-size=10240 gatsby build",
104103
"clean": "gatsby clean",
105104
"crowdin-clean": "rm -rf .crowdin && mkdir .crowdin",

src/@chakra-ui/gatsby-plugin/components/Button.ts

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
import type { ComponentStyleConfig } from "@chakra-ui/theme"
22

3+
const disabledStylesSolid = {
4+
bg: "disabled",
5+
opacity: 1,
6+
}
7+
8+
const disabledStylesOutline = {
9+
color: "disabled",
10+
borderColor: "disabled",
11+
opacity: 1,
12+
}
13+
314
const commonOutline = {
415
border: "1px",
516
color: "text",
@@ -9,6 +20,9 @@ const commonOutline = {
920
color: "primary",
1021
bg: "background",
1122
borderColor: "primary",
23+
_disabled: {
24+
...disabledStylesOutline,
25+
},
1226
},
1327
_active: {
1428
color: "primary",
@@ -18,11 +32,12 @@ const commonOutline = {
1832
_focus: {
1933
color: "primary",
2034
borderColor: "background",
35+
_disabled: {
36+
...disabledStylesOutline,
37+
},
2138
},
2239
_disabled: {
23-
color: "disabled",
24-
borderColor: "disabled",
25-
opacity: 1,
40+
...disabledStylesOutline,
2641
},
2742
}
2843

@@ -33,6 +48,9 @@ export const Button: ComponentStyleConfig = {
3348
_hover: {
3449
textDecoration: "none",
3550
boxShadow: "primary",
51+
_disabled: {
52+
boxShadow: "none",
53+
},
3654
},
3755
_focus: {
3856
boxShadow: "outline",
@@ -53,13 +71,15 @@ export const Button: ComponentStyleConfig = {
5371
_hover: {
5472
bg: "primary",
5573
opacity: 0.8,
74+
_disabled: {
75+
...disabledStylesSolid,
76+
},
5677
},
5778
_active: {
5879
bg: "primaryHover",
5980
},
6081
_disabled: {
61-
bg: "disabled",
62-
opacity: 1,
82+
...disabledStylesSolid,
6383
},
6484
},
6585
outline: {
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import type { ComponentMultiStyleConfig } from "@chakra-ui/theme"
2+
3+
const baseStyleControl = {
4+
bg: "background",
5+
_checked: {
6+
bg: "primary400",
7+
_hover: {
8+
bg: "primary400",
9+
borderColor: "primary600",
10+
},
11+
borderColor: "black50",
12+
},
13+
border: "1px",
14+
borderColor: "black50",
15+
borderRadius: "3px",
16+
transition: "all 150ms",
17+
_focusVisible: {
18+
boxShadow: "none",
19+
},
20+
_hover: {
21+
boxShadow: "tableItemBoxShadow",
22+
border: "1px",
23+
borderStyle: "solid",
24+
borderColor: "primary600",
25+
transition: "transform 0.1s",
26+
transform: "scale(1.02)",
27+
},
28+
}
29+
30+
export const Checkbox: ComponentMultiStyleConfig = {
31+
parts: ["control"],
32+
baseStyle: {
33+
control: baseStyleControl,
34+
},
35+
sizes: {
36+
md: {
37+
control: {
38+
h: "1.5rem",
39+
w: "1.5rem",
40+
},
41+
icon: {
42+
fontSize: "md",
43+
},
44+
},
45+
},
46+
variants: {
47+
alignTop: {
48+
control: {
49+
mt: "0.25rem",
50+
},
51+
},
52+
},
53+
defaultProps: {
54+
size: "md",
55+
},
56+
}

0 commit comments

Comments
 (0)