Skip to content

Commit 9eac3f5

Browse files
authored
Merge pull request #12074 from ethereum/dev
Release candidate v8.0.2
2 parents 6a16f6e + 08b181e commit 9eac3f5

File tree

782 files changed

+31640
-6571
lines changed

Some content is hidden

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

782 files changed

+31640
-6571
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10956,6 +10956,15 @@
1095610956
"contributions": [
1095710957
"content"
1095810958
]
10959+
},
10960+
{
10961+
"login": "duckdegen",
10962+
"name": "duckdegen",
10963+
"avatar_url": "https://avatars.githubusercontent.com/u/98649644?v=4",
10964+
"profile": "https://github.com/duckdegen",
10965+
"contributions": [
10966+
"content"
10967+
]
1095910968
}
1096010969
],
1096110970
"contributorsPerLine": 7,

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ robots.txt
4949

5050
# .crowdin folder used as temp forlder for crowdin-import script
5151
.crowdin
52+
53+
# vscode workplace configuration
54+
.vscode

README.md

Lines changed: 3 additions & 2 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
@@ -1710,6 +1710,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
17101710
<td align="center" valign="top" width="14.28%"><a href="http://benedikt-wagner.dev"><img src="https://avatars.githubusercontent.com/u/113296072?v=4?s=100" width="100px;" alt="Benedikt Wagner"/><br /><sub><b>Benedikt Wagner</b></sub></a><br /><a href="#content-b-wagn" title="Content">🖋</a></td>
17111711
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tdahar"><img src="https://avatars.githubusercontent.com/u/18716811?v=4?s=100" width="100px;" alt="Tarun Mohandas Daryanani"/><br /><sub><b>Tarun Mohandas Daryanani</b></sub></a><br /><a href="#content-tdahar" title="Content">🖋</a></td>
17121712
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Crosstons"><img src="https://avatars.githubusercontent.com/u/110349596?v=4?s=100" width="100px;" alt="Shubh"/><br /><sub><b>Shubh</b></sub></a><br /><a href="#content-Crosstons" title="Content">🖋</a></td>
1713+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/duckdegen"><img src="https://avatars.githubusercontent.com/u/98649644?v=4?s=100" width="100px;" alt="duckdegen"/><br /><sub><b>duckdegen</b></sub></a><br /><a href="#content-duckdegen" title="Content">🖋</a></td>
17131714
</tr>
17141715
</tbody>
17151716
</table>

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: 7 additions & 60 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()
@@ -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)