Skip to content

Commit e0541fd

Browse files
committed
Merge branch 'dev' into pr/rex4539/12032
2 parents e2292a3 + 1004745 commit e0541fd

File tree

170 files changed

+3462
-1218
lines changed

Some content is hidden

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

170 files changed

+3462
-1218
lines changed

.all-contributorsrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10700,7 +10700,7 @@
1070010700
"login": "g0rbe",
1070110701
"name": "Dániel Görbe",
1070210702
"avatar_url": "https://avatars.githubusercontent.com/u/36860942?v=4",
10703-
"profile": "http://www.danielgorbe.com",
10703+
"profile": "https://www.gorbe.io",
1070410704
"contributions": [
1070510705
"doc"
1070610706
]

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ git checkout -b new_branch_name
9191
2. Start developing!
9292

9393
```sh
94-
yarn start
94+
yarn dev
9595
```
9696

97-
- Open this directory in your favorite text editor / IDE, and see your changes live by visiting `localhost:8000` from your browser
97+
- Open this directory in your favorite text editor / IDE, and see your changes live by visiting `localhost:3000` from your browser
9898
- Pro Tip:
9999
- Explore scripts within `package.json` for more build options
100100
- Get **faster** local builds by building only one language. E.g. in your `.env` file, set `BUILD_LOCALES=en` to build the content only in English
@@ -1673,7 +1673,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
16731673
<td align="center" valign="top" width="14.28%"><a href="https://github.com/costgallo"><img src="https://avatars.githubusercontent.com/u/49433698?v=4?s=100" width="100px;" alt="Costanza"/><br /><sub><b>Costanza</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=costgallo" title="Documentation">📖</a></td>
16741674
<td align="center" valign="top" width="14.28%"><a href="https://github.com/joaolago1113"><img src="https://avatars.githubusercontent.com/u/22820692?v=4?s=100" width="100px;" alt="joao"/><br /><sub><b>joao</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=joaolago1113" title="Documentation">📖</a></td>
16751675
<td align="center" valign="top" width="14.28%"><a href="http://p2p.org"><img src="https://avatars.githubusercontent.com/u/3310192?v=4?s=100" width="100px;" alt="Eugene"/><br /><sub><b>Eugene</b></sub></a><br /><a href="#content-rgb2hsl" title="Content">🖋</a></td>
1676-
<td align="center" valign="top" width="14.28%"><a href="http://www.danielgorbe.com"><img src="https://avatars.githubusercontent.com/u/36860942?v=4?s=100" width="100px;" alt="Dániel Görbe"/><br /><sub><b>Dániel Görbe</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=g0rbe" title="Documentation">📖</a></td>
1676+
<td align="center" valign="top" width="14.28%"><a href="https://www.gorbe.io"><img src="https://avatars.githubusercontent.com/u/36860942?v=4?s=100" width="100px;" alt="Dániel Görbe"/><br /><sub><b>Dániel Görbe</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=g0rbe" title="Documentation">📖</a></td>
16771677
<td align="center" valign="top" width="14.28%"><a href="https://blog.insubli.me"><img src="https://avatars.githubusercontent.com/u/41712656?v=4?s=100" width="100px;" alt="s-crypt"/><br /><sub><b>s-crypt</b></sub></a><br /><a href="#content-s-crypt" title="Content">🖋</a></td>
16781678
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tudorpintea999"><img src="https://avatars.githubusercontent.com/u/87604944?v=4?s=100" width="100px;" alt="iwantanode"/><br /><sub><b>iwantanode</b></sub></a><br /><a href="#content-tudorpintea999" title="Content">🖋</a></td>
16791679
<td align="center" valign="top" width="14.28%"><a href="https://github.com/shak58"><img src="https://avatars.githubusercontent.com/u/150069539?v=4?s=100" width="100px;" alt="shak58"/><br /><sub><b>shak58</b></sub></a><br /><a href="#content-shak58" title="Content">🖋</a></td>

docs/api-keys.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ We recommend setting this up when running the project locally, as we use the Git
1111
1212
```sh
1313
# .env Example:
14-
GATSBY_GITHUB_TOKEN_READ_ONLY=48f84de812090000demo00000000697cf6e6a059
14+
NEXT_PUBLIC_GITHUB_TOKEN_READ_ONLY=48f84de812090000demo00000000697cf6e6a059
1515
```
1616

1717
2. Add Etherscan API token (free)
@@ -25,13 +25,3 @@ GATSBY_GITHUB_TOKEN_READ_ONLY=48f84de812090000demo00000000697cf6e6a059
2525
# .env Example:
2626
ETHERSCAN_API_KEY=K6NUTARFJZJCIXHF1F1E1YGJZ8RQ29BE4U
2727
```
28-
29-
3. Add DeFiPulse API token (free)
30-
31-
> - [Follow this guide](https://docs.defipulse.com/quick-start-guide) to create an account and get your DeFiPulse API token
32-
> - Copy & paste your Active API Key from DeFiPulse into `.env`
33-
34-
```sh
35-
# .env Example:
36-
DEFI_PULSE_API_KEY=4953aaf7966dad9c129397e197a0630ed0594f66962dd5fb058972b250da
37-
```

docs/best-practices.md

Lines changed: 8 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Markdown will be translated as whole pages of content, so no specific action is
5252

5353
- _tl;dr Each individual JSON entry should be a complete phrase by itself_
5454

55-
- This is done using the `Translation` component. However there is an alternative method for regular JS: using the `t` function from `gatsby-plugin-react-i18next`
55+
- This is done using the `Translation` component. However there is an alternative method for regular JS: using the `t` function from `next-i18next`
5656

5757
- **Method one: `<Translation />` component (preferred if only needed in JSX)**
5858

@@ -66,7 +66,7 @@ Markdown will be translated as whole pages of content, so no specific action is
6666
- **Method two: `t()`**
6767

6868
```tsx
69-
import { useTranslation } from "gatsby-plugin-react-i18next"
69+
import { useTranslation } from "next-i18next"
7070
7171
// Utilize anywhere in JS using
7272
const { t } = useTranslation()
@@ -85,7 +85,7 @@ Markdown will be translated as whole pages of content, so no specific action is
8585
// Example
8686
import React, { useState, useEffect } from "react"
8787
88-
const ComponentName: React.FC = (props) => {
88+
const ComponentName = () => {
8989
// useState hook for managing state variables
9090
const [greeting, setGreeting] = useState("")
9191
@@ -104,7 +104,7 @@ export default ComponentName
104104

105105
We use [Chakra UI](https://chakra-ui.com/).
106106

107-
`src/@chakra-ui/gatsby-plugin/theme.ts` - Holds all the theme configuration. This is where you can find the colors, fonts, component themes, variants, etc.
107+
`src/@chakra-ui/theme.ts` - Holds all the theme configuration. This is where you can find the colors, fonts, component themes, variants, etc.
108108

109109
- Wrappers or layout divs
110110

@@ -149,7 +149,7 @@ Use [the Chakra default breakpoints](https://chakra-ui.com/docs/styled-system/th
149149
<Text color="primary.base" bg="background.base" />
150150
```
151151

152-
> Note the dotted notation. In Chakra, the values are referred to as "semantic tokens" and the new theme applies a nested structure of like tokens for better organization. See [semanticTokens.ts](../src/%40chakra-ui/gatsby-plugin/semanticTokens.ts)
152+
> Note the dotted notation. In Chakra, the values are referred to as "semantic tokens" and the new theme applies a nested structure of like tokens for better organization. See [semanticTokens.ts](../src/@chakra-ui/semanticTokens.ts)
153153

154154
> Note 2: all the previous colors defined in the old theme `src/theme.ts` were
155155
> ported into the new theme for compatibility reasons. Those colors will
@@ -177,63 +177,10 @@ import { BsQuestionSquareFill } from "react-icons/bs"
177177
;<Icon as={BsQuestionSquareFill} />
178178
```
179179

180-
## Image loading and API calls using GraphQL
180+
## Using custom `Image` component
181181

182-
- [Gatsby + GraphQL](https://www.gatsbyjs.com/docs/graphql/) used for loading of images and preferred for API calls (in lieu of REST, if possible/practical). Utilizes static page queries that run at build time, not at run time, optimizing performance.
183-
- Image loading example:
182+
[Next Image](https://nextjs.org/docs/pages/api-reference/components/image) is the component of choice to handle responsive images. However, we use a custom version of this component that is properly optimized with Chakra. This way we can use style props from Chakra but still be able to forward common or Next Image-specific props to the component for correct usage and rendering.
184183

185184
```tsx
186-
import { graphql } from "gatsby"
187-
188-
export const query = graphql`
189-
query {
190-
hero: file(relativePath: { eq: "developers-eth-blocks.png" }) {
191-
childImageSharp {
192-
gatsbyImageData(
193-
width: 800
194-
layout: FIXED
195-
placeholder: BLURRED
196-
quality: 100
197-
)
198-
}
199-
}
200-
}
201-
`
202-
// These query results get passed as an object `props.data` to your component
203-
```
204-
205-
- API call example:
206-
207-
```tsx
208-
import { graphql } from "gatsby"
209-
210-
export const repoInfo = graphql`
211-
fragment repoInfo on GitHub_Repository {
212-
stargazerCount
213-
languages(orderBy: { field: SIZE, direction: DESC }, first: 2) {
214-
nodes {
215-
name
216-
}
217-
}
218-
url
219-
}
220-
`
221-
export const query = graphql`
222-
query {
223-
hardhatGitHub: github {
224-
repository(owner: "nomiclabs", name: "hardhat") {
225-
...repoInfo
226-
}
227-
}
228-
}
229-
`
230-
// These query results get passed as an object `props.data` to your component
231-
```
232-
233-
### Using custom `GatsbyImage`
234-
235-
[GatsbyImage](https://www.gatsbyjs.com/plugins/gatsby-plugin-image/) is the component of choice to handle responsive images processed through graphql. However, we use a custom version of this component that is properly optimized with Chakra. This way we can use style props from Chakra but still be able to forward common or GatsbyImage-specific props to the Gatsby component for correct usage and rendering.
236-
237-
```tsx
238-
import GatsbyImage from "./components/GatsbyImage"
185+
import { Image } from "@/components/Image"
239186
```
File renamed without changes.

docs/ds-implementation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is part of our [Design System implementation epic](https://github.com/ethe
77
## Basics
88

99
- Use Chakra tokens for spacing, sizes, and breakpoints. [Chakra theme docs](https://chakra-ui.com/docs/styled-system/theme)
10-
- For colors use the semantic tokens defined in [this file](https://github.com/ethereum/ethereum-org-website/blob/dev/src/@chakra-ui/gatsby-plugin/semanticTokens.ts). These tokens will match the color variables used in the DS Figma file
10+
- For colors use the semantic tokens defined in [this file](https://github.com/ethereum/ethereum-org-website/blob/dev/src/%40chakra-ui/semanticTokens.ts). These tokens will match the color variables used in the DS Figma file
1111
- Use as many Chakra components and utils as possible
1212
- Read the [Best Practices doc](https://github.com/ethereum/ethereum-org-website/blob/dev/docs/best-practices.md) for more examples and info
1313

@@ -29,7 +29,7 @@ If you are implementing:
2929

3030
- A base component (a component that already exists in the [Chakra components list](https://chakra-ui.com/docs/components/), for example, the button or inputs)
3131
- Try to avoid creating a new component file `/ComponentA/index.tsx` if there is no additional or custom logic we need to add to them
32-
- Create a theme file to override the default Chakra styles with the DS specs. See examples under the [Chakra theme folder](https://github.com/ethereum/ethereum-org-website/blob/dev/src/@chakra-ui/gatsby-plugin/components/)
32+
- Create a theme file to override the default Chakra styles with the DS specs. See examples under the [Chakra theme folder](https://github.com/ethereum/ethereum-org-website/tree/dev/src/%40chakra-ui/components)
3333
- Create a `.stories.tsx` file under `src/components/BaseStories`
3434
- A new custom component (e.g. the PageHero)
3535
- Use as many Chakra components as possible

docs/event-tracking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Event tracking is a great way to validate our design decisions and assumptions.
1616

1717
ethereum.org uses Matomo, an open-source alternative to Google Analytics, allowing us to protect user privacy by not sharing any analytics with third parties.
1818

19-
We implemented Matomo using the [JavaScript tracking client](https://developer.matomo.org/guides/tracking-javascript-guide) via the [`gatsby-matomo-plugin`](https://github.com/kremalicious/gatsby-plugin-matomo) Gatsby plugin.
19+
We implemented Matomo using the [JavaScript tracking client](https://developer.matomo.org/guides/tracking-javascript-guide) via the [`@socialgouv/matomo-next`](https://github.com/SocialGouv/matomo-next) package.
2020

2121
## What to measure?
2222

docs/next-docs/stack.md

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

docs/schema.md

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

0 commit comments

Comments
 (0)