Skip to content

Commit

Permalink
Merge branch 'dev' into feat/chromatic-story-modes
Browse files Browse the repository at this point in the history
  • Loading branch information
pettinarip committed May 31, 2024
2 parents 23533cd + 4c5efcf commit 3429349
Show file tree
Hide file tree
Showing 115 changed files with 2,226 additions and 1,438 deletions.
72 changes: 72 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -12042,6 +12042,78 @@
"contributions": [
"doc"
]
},
{
"login": "woxjro",
"name": "woxjro",
"avatar_url": "https://avatars.githubusercontent.com/u/63214188?v=4",
"profile": "https://github.com/woxjro",
"contributions": [
"tool"
]
},
{
"login": "SeanXLChen",
"name": "bambooskySean",
"avatar_url": "https://avatars.githubusercontent.com/u/78134555?v=4",
"profile": "https://github.com/SeanXLChen",
"contributions": [
"code"
]
},
{
"login": "VikVM",
"name": "VikVM",
"avatar_url": "https://avatars.githubusercontent.com/u/60881781?v=4",
"profile": "https://github.com/VikVM",
"contributions": [
"content"
]
},
{
"login": "checkomkar",
"name": "Omkar Kamale",
"avatar_url": "https://avatars.githubusercontent.com/u/8987373?v=4",
"profile": "https://github.com/checkomkar",
"contributions": [
"code"
]
},
{
"login": "mingoing",
"name": "Mingo",
"avatar_url": "https://avatars.githubusercontent.com/u/344175?v=4",
"profile": "https://github.com/mingoing",
"contributions": [
"doc"
]
},
{
"login": "zkVlad",
"name": "zkVlad",
"avatar_url": "https://avatars.githubusercontent.com/u/125317045?v=4",
"profile": "https://github.com/zkVlad",
"contributions": [
"doc"
]
},
{
"login": "yunseonna",
"name": "yunseon na",
"avatar_url": "https://avatars.githubusercontent.com/u/148749864?v=4",
"profile": "https://github.com/yunseonna",
"contributions": [
"doc"
]
},
{
"login": "alex1092",
"name": "Alex",
"avatar_url": "https://avatars.githubusercontent.com/u/59183749?v=4",
"profile": "https://github.com/alex1092",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
20 changes: 8 additions & 12 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
"needs review 👀":
- src/**/*
- public/*

"documentation 📖":
- README.md
- docs/**/*

"tooling 🔧":
- .github/**/*
- src/scripts/*
- src/lib/*
- src/hooks/*
- src/scripts/**/*
- src/lib/**/*
- src/hooks/**/*
- .storybook/**/*

"dependencies 📦":
- package.json
- yarn.lock

"internal 🏠":
- .all-contributorsrc
"config ⚙️":
- i18n.config.json
- next.config.js
- next-i18next.config,js
Expand All @@ -30,12 +27,11 @@
- netlify.toml

"translation 🌍":
- src/content/translations/**/*
- public/content/translations/**/*
- src/intl/**/*
- src/lib/utils/translations.ts

"content 🖋️":
- src/pages/*
- src/intl/en/**
- public/content/**/*

"event 📅":
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,26 @@ jobs:
- uses: actions/labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Refine labels
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
const { owner, repo, number: pull_number } = context.issue;
const { data: files } = await github.pulls.listFiles({ owner, repo, pull_number });
const allInEn = files.every(file => file.filename.startsWith('src/intl/en/'));
const allInTranslations = files.every(file => file.filename.startsWith('public/content/translations/'));
if (allInEn) {
await github.issues.removeLabel({ owner, repo, issue_number: pull_number, name: 'translation 🌍' });
}
if (allInTranslations) {
await github.issues.removeLabel({ owner, repo, issue_number: pull_number, name: 'content 🖋️' });
}
} catch (error) {
console.warn("Problem occurred refining labels")
}
44 changes: 23 additions & 21 deletions .github/workflows/non-english-warning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,34 @@ on:
paths:
- "public/content/translations/**/*.md"
- "src/intl/**/*.json"
- "!src/intl/en/**
- "!src/intl/en/**"

jobs:
check_branch_name:
check_and_label:
runs-on: ubuntu-latest
steps:
- name: Exit early if branch name contains 'crowdin'
- name: Exit early if branch name contains 'crowdin' or is 'dev', 'staging', or 'master'
id: check_branch
run: |
if [[ "${{ github.head_ref }}" == *crowdin* ]]; then
echo "Branch name contains 'crowdin', stopping workflow"
exit 1
if [[ "${{ github.head_ref }}" == *crowdin* ]] ||
[[ "${{ github.ref }}" == 'refs/heads/dev' ]] ||
[[ "${{ github.ref }}" == 'refs/heads/staging' ]] ||
[[ "${{ github.ref }}" == 'refs/heads/master' ]]
then
echo "Branch name contains 'crowdin' or is 'dev', 'staging', or 'master', stopping workflow"
echo "::set-output name=skip::true"
exit 0
else
echo "::set-output name=skip::false"
fi
check_changes:
needs: check_branch_name
runs-on: ubuntu-latest
outputs:
all_changes_include_href: ${{ steps.check.outputs.all_changes_include_href }}
steps:
- name: Checkout code
if: steps.check_branch.outputs.skip == 'false'
uses: actions/checkout@v2

- name: Check changes
id: check
if: steps.check_branch.outputs.skip == 'false'
id: check_changes
run: |
git fetch origin ${{ github.base_ref }}
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=')
Expand All @@ -38,27 +43,24 @@ jobs:
fi
echo "::set-output name=all_changes_include_href::$ALL_CHANGES_INCLUDE_HREF"
add_label_and_comment:
needs: check_changes
runs-on: ubuntu-latest
steps:
- name: Add label and comment
if: steps.check_branch.outputs.skip == 'false'
uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const prNumber = context.issue.number;
const repo = context.repo;
const prAuthor = context.payload.pull_request.user.login;
const allChangesIncludeHref = '${{ needs.check_changes.outputs.all_changes_include_href }}' === 'true';
const status = allChangesIncludeHref ? 'question ❓' : 'blocked 🛑';
const allChangesIncludeHref = '${{ steps.check_changes.outputs.all_changes_include_href }}' === 'true';
const status = allChangesIncludeHref ? 'question ❓' : 'Status: Blocked 🛑';
await github.rest.issues.addLabels({
...repo,
issue_number: prNumber,
labels: [status, 'non-crowdin translation updates']
});
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.`
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.
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.`
await github.rest.issues.createComment({
...repo,
issue_number: prNumber,
Expand All @@ -71,4 +73,4 @@ jobs:
Please post here or join [our Discord](https://ethereum.org/discord) if you have questions!
`
});
});
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ robots.txt
# .crowdin folder used as temp forlder for crowdin-import script
.crowdin

# vscode workplace configuration
# workplace configuration
.vscode
.idea

# Crowdin report output
src/data/crowdin/bucketsAwaitingReviewReport.csv
src/data/crowdin/bucketsAwaitingReviewReport.csv
3 changes: 3 additions & 0 deletions .storybook/i18next.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const baseLocales = {
const ns = [
"common",
"glossary",
"learn-quizzes",
"page-about",
"page-index",
"page-learn",
Expand Down Expand Up @@ -49,6 +50,7 @@ const resources: Resource = ns.reduce((acc, n) => {

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

i18n.use(initReactI18next).init({
debug: true,
Expand All @@ -57,6 +59,7 @@ i18n.use(initReactI18next).init({
react: { useSuspense: false },
supportedLngs,
resources,
defaultNS: "common",
})

export default i18n
2 changes: 1 addition & 1 deletion .storybook/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ addons.setConfig({
// In order to override the default favicon, and inject a data hash link to the png
const link = document.createElement("link")
link.setAttribute("rel", "shortcut icon")
link.setAttribute("href", favicon)
link.setAttribute("href", favicon.src)
document.head.appendChild(link)
7 changes: 7 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import type { Preview } from "@storybook/react"
import isChromatic from "chromatic/isChromatic"

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

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

import "../src/styles/global.css"
import { MotionGlobalConfig } from "framer-motion"

MotionGlobalConfig.skipAnimations = isChromatic()

export const chakraBreakpointArray = Object.entries(theme.breakpoints) as [
string,
Expand Down Expand Up @@ -43,6 +47,9 @@ const preview: Preview = {
backgrounds: {
disable: true,
},
chromatic: {
prefersReducedMotion: "reduce",
},
options: {
storySort: {
order: ["Atoms", "Molecules", "Organisms", "Templates", "Pages"],
Expand Down
5 changes: 1 addition & 4 deletions .storybook/theme.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { create } from "@storybook/theming"

// @ts-ignore
import brandImage from "./preview-logo.svg"

export default create({
base: "dark",

Expand All @@ -11,7 +8,7 @@ export default create({
appBorderRadius: 4,

brandTitle: "Ethereum.org",
brandImage,
brandImage: "./preview-logo.svg",
brandUrl: "https://www.ethereum.org",

barSelectedColor: "#ff7324",
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1844,6 +1844,16 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<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>
<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>
<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>
<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>
<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>
<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>
<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>
</tr>
<tr>
<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>
<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>
<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>
<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>
</tr>
</tbody>
</table>
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ethereum-org-website",
"version": "8.5.2",
"version": "8.6.0",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down Expand Up @@ -67,7 +67,7 @@
"@storybook/addon-links": "7.6.6",
"@storybook/nextjs": "7.6.6",
"@storybook/react": "7.6.6",
"@storybook/testing-library": "0.2.2",
"@storybook/test": "8.0.0",
"@svgr/webpack": "^8.1.0",
"@types/decompress": "^4.2.7",
"@types/hast": "^3.0.0",
Expand Down Expand Up @@ -98,4 +98,4 @@
"resolutions": {
"jackspeak": "2.1.1"
}
}
}
2 changes: 1 addition & 1 deletion public/content/contributing/translation-program/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Read more about the ethereum.org Translation Program [mission and vision](/contr

### Our progress so far {#our-progress}

- [**5,600 +** translators](/contributing/translation-program/contributors/)
- [**6,000 +** translators](/contributing/translation-program/contributors/)
- **62** languages live on site
- [**3 million** words translated in 2023](/contributing/translation-program/acknowledgements/)

Expand Down
6 changes: 6 additions & 0 deletions public/content/developers/docs/apis/backend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ These libraries abstract away much of the complexity of interacting directly wit
- [Documentation](https://docs.alchemy.com/)
- [GitHub](https://github.com/alchemyplatform)
- [Discord](https://discord.com/invite/alchemyplatform)

**All That Node -** **_Node-as-a-Service._**

- [All That Node.com](https://www.allthatnode.com/)
- [Documentation](https://docs.allthatnode.com)
- [Discord](https://discord.gg/GmcdVEUbJM)

**Blast by Bware Labs -** **_Decentralized APIs for Ethereum Mainnet and Testnets._**

Expand Down
Loading

0 comments on commit 3429349

Please sign in to comment.