Skip to content

Commit 0a1dd71

Browse files
Merge remote-tracking branch 'origin/dev' into fix/CallToAction-index-prop
2 parents 0c3ad7b + c9577e6 commit 0a1dd71

File tree

1,322 files changed

+37681
-23491
lines changed

Some content is hidden

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

1,322 files changed

+37681
-23491
lines changed

.all-contributorsrc

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

.github/ISSUE_TEMPLATE/suggest_layer2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ body:
100100
id: layer_2_dapp_ecosystem
101101
attributes:
102102
label: Link to dapp ecosystem (if applicable)
103-
description: "Please provide a link to the dapp ecosystem. (ex: https://portal.arbitrum.one/, https://www.optimism.io/apps/all)"
103+
description: "Please provide a link to the dapp ecosystem. (ex: https://portal.arbitrum.io/, https://www.optimism.io/apps)"
104104
- type: input
105105
id: layer_2_token_contract_list
106106
attributes:

.github/labeler.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
"review needed :eyes:":
1+
"needs review 👀":
22
- src/**/*
33
- public/*
44

5-
"documentation :book:":
5+
"documentation 📖":
66
- README.md
77

8-
"tooling :wrench:":
8+
"tooling 🔧":
99
- .github/**/*
1010
- src/scripts/*
1111
- src/lib/*
1212
- src/hooks/*
1313

14-
"dependencies :package:":
14+
"dependencies 📦":
1515
- package.json
1616
- yarn.lock
1717

18-
"internal :house:":
18+
"internal 🏠":
1919
- .all-contributorsrc
2020
- i18n.config.json
2121
- next.config.js
@@ -29,14 +29,14 @@
2929
- .prettierrc
3030
- netlify.toml
3131

32-
"translation :earth_africa:":
32+
"translation 🌍":
3333
- src/content/translations/**/*
3434
- src/intl/**/*
3535
- src/lib/utils/translations.ts
3636

37-
"content :fountain_pen:":
37+
"content 🖋️":
3838
- src/pages/*
3939
- public/content/**/*
4040

41-
"event :date:":
41+
"event 📅":
4242
- src/data/community-events.json

.github/workflows/get-crowdin-contributors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ jobs:
5959
6060
- name: Create Pull Request
6161
run: |
62-
gh auth login --with-token <<< ${{ secrets.GITHUB_TOKEN }}
62+
gh auth login --with-token ${{ secrets.GITHUB_TOKEN }}
6363
gh pr create --base dev --head "automated-update-${{ env.TIMESTAMP }}" --title "Update translation contributors from Crowdin - ${{ env.READABLE_DATE }}" --body-file pr_body.txt

.github/workflows/get-translation-progress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ jobs:
6060
6161
- name: Create Pull Request
6262
run: |
63-
gh auth login --with-token <<< ${{ secrets.GITHUB_TOKEN }}
63+
gh auth login --with-token ${{ secrets.GITHUB_TOKEN }}
6464
gh pr create --base dev --head "automated-update-${{ env.TIMESTAMP }}" --title "Update translation progress from Crowdin - ${{ env.READABLE_DATE }}" --body-file pr_body.txt
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Import community events
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * SUN" # Runs every Sunday at midnight
6+
workflow_dispatch:
7+
8+
jobs:
9+
create_pr:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out code
13+
uses: actions/checkout@master
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 18
19+
20+
- name: Install dependencies
21+
run: yarn install
22+
23+
- name: Set up git
24+
run: |
25+
git config --global user.email "[email protected]"
26+
git config --global user.name "GitHub Action"
27+
28+
- name: Generate timestamp and readable date
29+
id: date
30+
run: |
31+
echo "TIMESTAMP=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
32+
echo "READABLE_DATE=$(date +'%B %-d')" >> $GITHUB_ENV
33+
34+
- name: Fetch latest dev and create new branch
35+
run: |
36+
git fetch origin dev
37+
git checkout -b "automated-update-${{ env.TIMESTAMP }}" origin/dev
38+
39+
- name: Run script
40+
run: yarn events-import
41+
env:
42+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
43+
44+
- name: Commit and push
45+
run: |
46+
git add -A
47+
git commit -m "Update community events"
48+
git push origin "automated-update-${{ env.TIMESTAMP }}"
49+
50+
- name: Create PR body
51+
run: |
52+
echo "This PR was automatically created to update community events from external community spreadsheet." > pr_body.txt
53+
echo "This workflows runs every Sunday at 00:00 (UTC)." >> pr_body.txt
54+
echo "Source: https://docs.google.com/spreadsheets/d/1NEu_FCc1hnGAuRgPmbXXpf0h2lCrCOlMKbbFEqgkVDQ" >> pr_body.txt
55+
56+
- name: Create Pull Request
57+
run: |
58+
gh auth login --with-token ${{ secrets.GITHUB_TOKEN }}
59+
gh pr create --base dev --head "automated-update-${{ env.TIMESTAMP }}" --title "Update community events from external spreadsheet - ${{ env.READABLE_DATE }}" --body-file pr_body.txt

.github/workflows/issue-triage-label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ jobs:
1717
issue_number: context.issue.number,
1818
owner: context.repo.owner,
1919
repo: context.repo.repo,
20-
labels: ["needs-triage"]
20+
labels: ["needs triage 📥"]
2121
})

README.md

Lines changed: 93 additions & 31 deletions
Large diffs are not rendered by default.

docs/applying-storybook.md

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ It's as easy as running `yarn storybook` to boot up a dedicated localhost to see
1818

1919
## Setting up a component's stories
2020

21-
> 🚨 NOTE: This project uses Storybook v7. The following documentation outlines preferences in setup as it relates to this version. You can refer to the [main docs](https://storybook.js.org/docs/get-started/install) if you need any additional details
21+
> 🚨 NOTE: This project uses Storybook v7, using the Component Story Format v3 and the `satisfies` keyword to define the type of the meta object. The following documentation outlines preferences in setup as it relates to this version. You can refer to the [main docs](https://storybook.js.org/docs/get-started) if you need any additional details
2222
2323
A Storybook "story" is an instance of a component in a certain state or with certain parameters applied to show an alternative version of the component.
2424

@@ -57,9 +57,11 @@ export const Basic: Story = {
5757

5858
**Note**: with the `title` option, we write this based on the groupings set by the Design System. Groupings are declared with forward slashes. (i.e. `Atoms / Form / Input`). See the Storybook docs for details on [Naming conventions](https://storybook.js.org/docs/7.0/react/writing-stories/naming-components-and-hierarchy)
5959

60+
Also, please view the Figma file for the [proposed structure for the Design System](https://www.figma.com/file/Ne3iAassyfAcJ0AlgqioAP/DS-to-storybook-structure?type=design&node-id=42%3A50&mode=design&t=RGkyouvTilzF42y0-1) to provide the correct groupings.
61+
6062
We will maintain this structure for every story file, regardless of simplicity.
6163

62-
Should the component accept props on all or some renders, you can provide an `args` prop for each story and supply the necessary data. And if there is children, use the `render` prop to pass the args and supply children elements.
64+
Should the component accept props on all or some renders, you can provide an `args` prop for each story and supply the necessary data. This can be done in place of the render if only a single instance of the given component is needed with no other components. If the `children` prop is used, it can still be used in the `args` prop.
6365

6466
Let's say for a `Button` component with different style variants...
6567

@@ -77,15 +79,15 @@ export default meta
7779
type Story = StoryObj<typeof meta>;
7880

7981
export const Solid: Story = {
80-
render: (args) => <Button {...args}>A Button</Button>,
8182
args: {
8283
variant: 'solid',
84+
children: 'A Button'
8385
}
8486
}
8587
export const Outline: Story = {
86-
render: (args) => <Button {...args}>A Button</Button>,
8788
args: {
8889
variant: 'outline',
90+
children: 'A Button'
8991
}
9092
}
9193

@@ -94,26 +96,51 @@ export const Outline: Story = {
9496
* they should be shown under one story, so they can be seen side-by-side in the GUI
9597
* for reviewers to easily compare.
9698
* This can also be done for various sizes or other like alterations
99+
*
100+
* 🚨 If prop content is supplied directly to the component and the `args` prop is not used,
101+
* do not use the `StoryObj` type. This is especially important when a story rendering multiple versions
102+
* of the component.
97103
*/
98104

99105
// Assuming `solid` is the default variant in the Chakra theme config
100-
export const Variants = () => (
101-
<VStack>
102-
<Button>A Solid Button</Button>
103-
<Button variant="outline">An Outline Button</Button>
104-
<Button variant="unstyled">An Unstyled Button</Button>
105-
</VStack>
106-
)
106+
export const Variants = {
107+
render: () => (
108+
<VStack>
109+
<Button>A Solid Button</Button>
110+
<Button variant="outline">An Outline Button</Button>
111+
<Button variant="unstyled">An Unstyled Button</Button>
112+
</VStack>
113+
)
114+
}
107115
```
108116

109-
If only one story is provided for a component, the name of the exported object should match the name in the `title` meta option. (If the title is `Atoms / Form / Button` then the object should be named `Button`) This will hoist the display name up to the parent level in the Storybook dashboard's sidebar.
117+
### Story file containing a single story
118+
119+
If only one story is provided for a component, the name of the exported object should match the name in the `title` meta option. (If the title is `Atoms / Form / Button` then the object should be named `Button`) This will hoist the display name up to the parent level in the Storybook dashboard's sidebar. This will also mean you have to rename the import of the component. Call it `ButtonComponent`, say.
120+
121+
```tsx
122+
import ButtonComponent from "."
123+
124+
const meta = {
125+
title: "Atoms / Form / Button",
126+
component: ButtonComponent,
127+
} satisfies Meta<typeof ButtonComponent>
128+
129+
export default meta
130+
131+
export const Button: StoryObj<typeof meta> = {
132+
render: () => <ButtonComponent />,
133+
}
134+
```
110135

111136
As you go and make adjustments to the component itself or it's variant styles, Storybook will hot reload and those changes will appear in the stories that emphasize them.
112137

113138
## Storybook Dashboard
114139

115140
The dashboard where you view each story has a number of different addons available to check the story thoroughly.
116141

142+
![Screenshot of Storybook Dashboard for Ethereum.org](https://github.com/ethereum/ethereum-org-website/assets/65234762/7dea7692-6a6d-4f1c-b7cb-db177bcab44d)
143+
117144
Outlined below are each area going from left to right in the selections.
118145

119146
| Toolbar above the preview | Panel below the preview |

docs/github-issue-triage-process.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ This documentation outlines the current process for how issues are triaged for t
44

55
## Issue creation process
66

7-
Whenever a new issue is opened, it will automatically be labeled with a `needs-triage` label. The `needs-triage` label means that the core team needs to look at the issue, and nobody should work on it yet to avoid unnecessary work. This label will be removed after the issue has been triaged by a core contributor.
7+
Whenever a new issue is opened, it will automatically be labeled with a `needs triage 📥` label. The `needs triage 📥` label means that the core team needs to look at the issue, and nobody should work on it yet to avoid unnecessary work. This label will be removed after the issue has been triaged by a core contributor.
88

99
## Triage process
1010

11-
The core team will review issues with the `needs-triage` label within 5 days. In order for an issue to be considered triaged, one of the following will need to happen:
11+
The core team will review issues with the `needs triage 📥` label within 5 days. In order for an issue to be considered triaged, one of the following will need to happen:
1212

1313
1. The issue will be closed if it is not needed, a duplicate, or spam.
1414
2. If an issue needs more discussion, the `GH grooming` tag will be added, and the issue will be discussed next GitHub grooming. After this call, action items will be recorded and the issue will be considered triaged.
1515
3. The issue is labeled with the appropriate tags for work needed (ex: `design required`, `dev required`, etc.) and open it up for assignment. More on this below.
1616

17-
After an issue has been triaged, the `needs-triage` label will be removed from the issue.
17+
After an issue has been triaged, the `needs triage 📥` label will be removed from the issue.
1818

1919
## Assignment process
2020

0 commit comments

Comments
 (0)