Skip to content

Commit 3429349

Browse files
committed
Merge branch 'dev' into feat/chromatic-story-modes
2 parents 23533cd + 4c5efcf commit 3429349

File tree

115 files changed

+2226
-1438
lines changed

Some content is hidden

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

115 files changed

+2226
-1438
lines changed

.all-contributorsrc

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12042,6 +12042,78 @@
1204212042
"contributions": [
1204312043
"doc"
1204412044
]
12045+
},
12046+
{
12047+
"login": "woxjro",
12048+
"name": "woxjro",
12049+
"avatar_url": "https://avatars.githubusercontent.com/u/63214188?v=4",
12050+
"profile": "https://github.com/woxjro",
12051+
"contributions": [
12052+
"tool"
12053+
]
12054+
},
12055+
{
12056+
"login": "SeanXLChen",
12057+
"name": "bambooskySean",
12058+
"avatar_url": "https://avatars.githubusercontent.com/u/78134555?v=4",
12059+
"profile": "https://github.com/SeanXLChen",
12060+
"contributions": [
12061+
"code"
12062+
]
12063+
},
12064+
{
12065+
"login": "VikVM",
12066+
"name": "VikVM",
12067+
"avatar_url": "https://avatars.githubusercontent.com/u/60881781?v=4",
12068+
"profile": "https://github.com/VikVM",
12069+
"contributions": [
12070+
"content"
12071+
]
12072+
},
12073+
{
12074+
"login": "checkomkar",
12075+
"name": "Omkar Kamale",
12076+
"avatar_url": "https://avatars.githubusercontent.com/u/8987373?v=4",
12077+
"profile": "https://github.com/checkomkar",
12078+
"contributions": [
12079+
"code"
12080+
]
12081+
},
12082+
{
12083+
"login": "mingoing",
12084+
"name": "Mingo",
12085+
"avatar_url": "https://avatars.githubusercontent.com/u/344175?v=4",
12086+
"profile": "https://github.com/mingoing",
12087+
"contributions": [
12088+
"doc"
12089+
]
12090+
},
12091+
{
12092+
"login": "zkVlad",
12093+
"name": "zkVlad",
12094+
"avatar_url": "https://avatars.githubusercontent.com/u/125317045?v=4",
12095+
"profile": "https://github.com/zkVlad",
12096+
"contributions": [
12097+
"doc"
12098+
]
12099+
},
12100+
{
12101+
"login": "yunseonna",
12102+
"name": "yunseon na",
12103+
"avatar_url": "https://avatars.githubusercontent.com/u/148749864?v=4",
12104+
"profile": "https://github.com/yunseonna",
12105+
"contributions": [
12106+
"doc"
12107+
]
12108+
},
12109+
{
12110+
"login": "alex1092",
12111+
"name": "Alex",
12112+
"avatar_url": "https://avatars.githubusercontent.com/u/59183749?v=4",
12113+
"profile": "https://github.com/alex1092",
12114+
"contributions": [
12115+
"code"
12116+
]
1204512117
}
1204612118
],
1204712119
"contributorsPerLine": 7,

.github/labeler.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1-
"needs review 👀":
2-
- src/**/*
3-
- public/*
4-
51
"documentation 📖":
62
- README.md
3+
- docs/**/*
74

85
"tooling 🔧":
96
- .github/**/*
10-
- src/scripts/*
11-
- src/lib/*
12-
- src/hooks/*
7+
- src/scripts/**/*
8+
- src/lib/**/*
9+
- src/hooks/**/*
10+
- .storybook/**/*
1311

1412
"dependencies 📦":
1513
- package.json
1614
- yarn.lock
1715

18-
"internal 🏠":
19-
- .all-contributorsrc
16+
"config ⚙️":
2017
- i18n.config.json
2118
- next.config.js
2219
- next-i18next.config,js
@@ -30,12 +27,11 @@
3027
- netlify.toml
3128

3229
"translation 🌍":
33-
- src/content/translations/**/*
30+
- public/content/translations/**/*
3431
- src/intl/**/*
35-
- src/lib/utils/translations.ts
3632

3733
"content 🖋️":
38-
- src/pages/*
34+
- src/intl/en/**
3935
- public/content/**/*
4036

4137
"event 📅":

.github/workflows/label.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,26 @@ jobs:
1111
- uses: actions/labeler@v2
1212
with:
1313
repo-token: "${{ secrets.GITHUB_TOKEN }}"
14+
15+
- name: Refine labels
16+
uses: actions/github-script@v5
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}
19+
script: |
20+
try {
21+
const { owner, repo, number: pull_number } = context.issue;
22+
const { data: files } = await github.pulls.listFiles({ owner, repo, pull_number });
23+
24+
const allInEn = files.every(file => file.filename.startsWith('src/intl/en/'));
25+
const allInTranslations = files.every(file => file.filename.startsWith('public/content/translations/'));
26+
27+
if (allInEn) {
28+
await github.issues.removeLabel({ owner, repo, issue_number: pull_number, name: 'translation 🌍' });
29+
}
30+
31+
if (allInTranslations) {
32+
await github.issues.removeLabel({ owner, repo, issue_number: pull_number, name: 'content 🖋️' });
33+
}
34+
} catch (error) {
35+
console.warn("Problem occurred refining labels")
36+
}

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

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,34 @@ on:
55
paths:
66
- "public/content/translations/**/*.md"
77
- "src/intl/**/*.json"
8-
- "!src/intl/en/**
8+
- "!src/intl/en/**"
99

1010
jobs:
11-
check_branch_name:
11+
check_and_label:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Exit early if branch name contains 'crowdin'
14+
- name: Exit early if branch name contains 'crowdin' or is 'dev', 'staging', or 'master'
15+
id: check_branch
1516
run: |
16-
if [[ "${{ github.head_ref }}" == *crowdin* ]]; then
17-
echo "Branch name contains 'crowdin', stopping workflow"
18-
exit 1
17+
if [[ "${{ github.head_ref }}" == *crowdin* ]] ||
18+
[[ "${{ github.ref }}" == 'refs/heads/dev' ]] ||
19+
[[ "${{ github.ref }}" == 'refs/heads/staging' ]] ||
20+
[[ "${{ github.ref }}" == 'refs/heads/master' ]]
21+
then
22+
echo "Branch name contains 'crowdin' or is 'dev', 'staging', or 'master', stopping workflow"
23+
echo "::set-output name=skip::true"
24+
exit 0
25+
else
26+
echo "::set-output name=skip::false"
1927
fi
2028
21-
check_changes:
22-
needs: check_branch_name
23-
runs-on: ubuntu-latest
24-
outputs:
25-
all_changes_include_href: ${{ steps.check.outputs.all_changes_include_href }}
26-
steps:
2729
- name: Checkout code
30+
if: steps.check_branch.outputs.skip == 'false'
2831
uses: actions/checkout@v2
32+
2933
- name: Check changes
30-
id: check
34+
if: steps.check_branch.outputs.skip == 'false'
35+
id: check_changes
3136
run: |
3237
git fetch origin ${{ github.base_ref }}
3338
DIFF=$(git diff --no-ext-diff --unified=0 origin/${{ github.base_ref }}..${{ github.head_ref }} -- 'public/content/translations/**/*.md' 'src/intl/**/*.json' '!src/intl/en/**' | grep -E -v '^[-+]href=')
@@ -38,27 +43,24 @@ jobs:
3843
fi
3944
echo "::set-output name=all_changes_include_href::$ALL_CHANGES_INCLUDE_HREF"
4045
41-
add_label_and_comment:
42-
needs: check_changes
43-
runs-on: ubuntu-latest
44-
steps:
4546
- name: Add label and comment
47+
if: steps.check_branch.outputs.skip == 'false'
4648
uses: actions/github-script@v5
4749
with:
4850
github-token: ${{secrets.GITHUB_TOKEN}}
4951
script: |
5052
const prNumber = context.issue.number;
5153
const repo = context.repo;
5254
const prAuthor = context.payload.pull_request.user.login;
53-
const allChangesIncludeHref = '${{ needs.check_changes.outputs.all_changes_include_href }}' === 'true';
54-
const status = allChangesIncludeHref ? 'question ❓' : 'blocked 🛑';
55+
const allChangesIncludeHref = '${{ steps.check_changes.outputs.all_changes_include_href }}' === 'true';
56+
const status = allChangesIncludeHref ? 'question ❓' : 'Status: Blocked 🛑';
5557
await github.rest.issues.addLabels({
5658
...repo,
5759
issue_number: prNumber,
5860
labels: [status, 'non-crowdin translation updates']
5961
});
6062
const commentWithoutHrefs = `This pull request contains changes to non-English content, which must also be handled through the Crowdin platform instead of only on GitHub.`
61-
const commentWithHrefs = `This pull request contains changes to non-English content files, which may also need to be handled through the Crowdin platform instead of only on GitHub.
63+
const commentWithHrefs = `This pull request contains changes to non-English content files, which may also need to be handled through the Crowdin platform instead of only on GitHub.`
6264
await github.rest.issues.createComment({
6365
...repo,
6466
issue_number: prNumber,
@@ -71,4 +73,4 @@ jobs:
7173
7274
Please post here or join [our Discord](https://ethereum.org/discord) if you have questions!
7375
`
74-
});
76+
});

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ robots.txt
5050
# .crowdin folder used as temp forlder for crowdin-import script
5151
.crowdin
5252

53-
# vscode workplace configuration
53+
# workplace configuration
5454
.vscode
55+
.idea
5556

5657
# Crowdin report output
57-
src/data/crowdin/bucketsAwaitingReviewReport.csv
58+
src/data/crowdin/bucketsAwaitingReviewReport.csv

.storybook/i18next.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const baseLocales = {
1313
const ns = [
1414
"common",
1515
"glossary",
16+
"learn-quizzes",
1617
"page-about",
1718
"page-index",
1819
"page-learn",
@@ -49,6 +50,7 @@ const resources: Resource = ns.reduce((acc, n) => {
4950

5051
return acc
5152
}, {})
53+
console.log("🚀 ~ constresources:Resource=ns.reduce ~ resources:", resources)
5254

5355
i18n.use(initReactI18next).init({
5456
debug: true,
@@ -57,6 +59,7 @@ i18n.use(initReactI18next).init({
5759
react: { useSuspense: false },
5860
supportedLngs,
5961
resources,
62+
defaultNS: "common",
6063
})
6164

6265
export default i18n

.storybook/manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ addons.setConfig({
1010
// In order to override the default favicon, and inject a data hash link to the png
1111
const link = document.createElement("link")
1212
link.setAttribute("rel", "shortcut icon")
13-
link.setAttribute("href", favicon)
13+
link.setAttribute("href", favicon.src)
1414
document.head.appendChild(link)

.storybook/preview.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import type { Preview } from "@storybook/react"
2+
import isChromatic from "chromatic/isChromatic"
23

34
import theme from "../src/@chakra-ui/theme"
45

56
import { ChakraDecorator } from "./ChakraDecorator"
67
import i18n, { baseLocales } from "./i18next"
78

89
import "../src/styles/global.css"
10+
import { MotionGlobalConfig } from "framer-motion"
11+
12+
MotionGlobalConfig.skipAnimations = isChromatic()
913

1014
export const chakraBreakpointArray = Object.entries(theme.breakpoints) as [
1115
string,
@@ -43,6 +47,9 @@ const preview: Preview = {
4347
backgrounds: {
4448
disable: true,
4549
},
50+
chromatic: {
51+
prefersReducedMotion: "reduce",
52+
},
4653
options: {
4754
storySort: {
4855
order: ["Atoms", "Molecules", "Organisms", "Templates", "Pages"],

.storybook/theme.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { create } from "@storybook/theming"
22

3-
// @ts-ignore
4-
import brandImage from "./preview-logo.svg"
5-
63
export default create({
74
base: "dark",
85

@@ -11,7 +8,7 @@ export default create({
118
appBorderRadius: 4,
129

1310
brandTitle: "Ethereum.org",
14-
brandImage,
11+
brandImage: "./preview-logo.svg",
1512
brandUrl: "https://www.ethereum.org",
1613

1714
barSelectedColor: "#ff7324",

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,6 +1844,16 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
18441844
<td align="center" valign="top" width="14.28%"><a href="https://github.com/raxhvl"><img src="https://avatars.githubusercontent.com/u/10168946?v=4?s=100" width="100px;" alt="rahul"/><br /><sub><b>rahul</b></sub></a><br /><a href="#content-raxhvl" title="Content">🖋</a></td>
18451845
<td align="center" valign="top" width="14.28%"><a href="https://abhayporwals.live/"><img src="https://avatars.githubusercontent.com/u/76243309?v=4?s=100" width="100px;" alt="Abhay Gupta "/><br /><sub><b>Abhay Gupta </b></sub></a><br /><a href="#content-professorabhay" title="Content">🖋</a></td>
18461846
<td align="center" valign="top" width="14.28%"><a href="https://github.com/somethingstup"><img src="https://avatars.githubusercontent.com/u/166286712?v=4?s=100" width="100px;" alt="somethingstup"/><br /><sub><b>somethingstup</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=somethingstup" title="Documentation">📖</a></td>
1847+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/woxjro"><img src="https://avatars.githubusercontent.com/u/63214188?v=4?s=100" width="100px;" alt="woxjro"/><br /><sub><b>woxjro</b></sub></a><br /><a href="#tool-woxjro" title="Tools">🔧</a></td>
1848+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SeanXLChen"><img src="https://avatars.githubusercontent.com/u/78134555?v=4?s=100" width="100px;" alt="bambooskySean"/><br /><sub><b>bambooskySean</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=SeanXLChen" title="Code">💻</a></td>
1849+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/VikVM"><img src="https://avatars.githubusercontent.com/u/60881781?v=4?s=100" width="100px;" alt="VikVM"/><br /><sub><b>VikVM</b></sub></a><br /><a href="#content-VikVM" title="Content">🖋</a></td>
1850+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/checkomkar"><img src="https://avatars.githubusercontent.com/u/8987373?v=4?s=100" width="100px;" alt="Omkar Kamale"/><br /><sub><b>Omkar Kamale</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=checkomkar" title="Code">💻</a></td>
1851+
</tr>
1852+
<tr>
1853+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mingoing"><img src="https://avatars.githubusercontent.com/u/344175?v=4?s=100" width="100px;" alt="Mingo"/><br /><sub><b>Mingo</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=mingoing" title="Documentation">📖</a></td>
1854+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zkVlad"><img src="https://avatars.githubusercontent.com/u/125317045?v=4?s=100" width="100px;" alt="zkVlad"/><br /><sub><b>zkVlad</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=zkVlad" title="Documentation">📖</a></td>
1855+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yunseonna"><img src="https://avatars.githubusercontent.com/u/148749864?v=4?s=100" width="100px;" alt="yunseon na"/><br /><sub><b>yunseon na</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=yunseonna" title="Documentation">📖</a></td>
1856+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/alex1092"><img src="https://avatars.githubusercontent.com/u/59183749?v=4?s=100" width="100px;" alt="Alex"/><br /><sub><b>Alex</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=alex1092" title="Code">💻</a></td>
18471857
</tr>
18481858
</tbody>
18491859
</table>

0 commit comments

Comments
 (0)