Skip to content

Commit

Permalink
Merge branch 'dev' into use-dot-eth
Browse files Browse the repository at this point in the history
  • Loading branch information
corwintines authored Apr 5, 2024
2 parents 7a780b3 + c9577e6 commit 0ad2351
Show file tree
Hide file tree
Showing 539 changed files with 17,373 additions and 5,996 deletions.
21 changes: 20 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -10984,7 +10984,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/9151261?v=4",
"profile": "https://github.com/aslikaya",
"contributions": [
"doc"
"doc",
"maintenance"
]
},
{
Expand Down Expand Up @@ -11662,6 +11663,24 @@
"contributions": [
"content"
]
},
{
"login": "WuRuiLei2023",
"name": "WuRuiLei2023",
"avatar_url": "https://avatars.githubusercontent.com/u/149141323?v=4",
"profile": "https://github.com/WuRuiLei2023",
"contributions": [
"bug"
]
},
{
"login": "radeksvarz",
"name": "Radek",
"avatar_url": "https://avatars.githubusercontent.com/u/6020891?v=4",
"profile": "http://www.edukids.cz",
"contributions": [
"eventOrganizing"
]
}
],
"contributorsPerLine": 7,
Expand Down
16 changes: 8 additions & 8 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
"review needed :eyes:":
"needs review 👀":
- src/**/*
- public/*

"documentation :book:":
"documentation 📖":
- README.md

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

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

"internal :house:":
"internal 🏠":
- .all-contributorsrc
- i18n.config.json
- next.config.js
Expand All @@ -29,14 +29,14 @@
- .prettierrc
- netlify.toml

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

"content :fountain_pen:":
"content 🖋️":
- src/pages/*
- public/content/**/*

"event :date:":
"event 📅":
- src/data/community-events.json
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,7 @@ 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/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>
<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>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sminempepe"><img src="https://avatars.githubusercontent.com/u/76882704?v=4?s=100" width="100px;" alt="sminempepe"/><br /><sub><b>sminempepe</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=sminempepe" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/aslikaya"><img src="https://avatars.githubusercontent.com/u/9151261?v=4?s=100" width="100px;" alt="aslikaya"/><br /><sub><b>aslikaya</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=aslikaya" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/aslikaya"><img src="https://avatars.githubusercontent.com/u/9151261?v=4?s=100" width="100px;" alt="aslikaya"/><br /><sub><b>aslikaya</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=aslikaya" title="Documentation">📖</a> <a href="#maintenance-aslikaya" title="Maintenance">🚧</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://lucasamberg.dev"><img src="https://avatars.githubusercontent.com/u/102396588?v=4?s=100" width="100px;" alt="Lucas Amberg"/><br /><sub><b>Lucas Amberg</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=lucas-amberg" title="Documentation">📖</a></td>
Expand Down Expand Up @@ -1791,6 +1791,8 @@ 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/bh2smith"><img src="https://avatars.githubusercontent.com/u/11778116?v=4?s=100" width="100px;" alt="Benjamin Smith"/><br /><sub><b>Benjamin Smith</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Abh2smith" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://hector.im"><img src="https://avatars.githubusercontent.com/u/12469549?v=4?s=100" width="100px;" alt="Héctor Chong"/><br /><sub><b>Héctor Chong</b></sub></a><br /><a href="#content-Hector-Chong" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nakmr"><img src="https://avatars.githubusercontent.com/u/145886319?v=4?s=100" width="100px;" alt="nace.kimura"/><br /><sub><b>nace.kimura</b></sub></a><br /><a href="#content-nakmr" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/WuRuiLei2023"><img src="https://avatars.githubusercontent.com/u/149141323?v=4?s=100" width="100px;" alt="WuRuiLei2023"/><br /><sub><b>WuRuiLei2023</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3AWuRuiLei2023" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://www.edukids.cz"><img src="https://avatars.githubusercontent.com/u/6020891?v=4?s=100" width="100px;" alt="Radek"/><br /><sub><b>Radek</b></sub></a><br /><a href="#eventOrganizing-radeksvarz" title="Event Organizing">📋</a></td>
</tr>
</tbody>
</table>
Expand Down
51 changes: 39 additions & 12 deletions docs/applying-storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It's as easy as running `yarn storybook` to boot up a dedicated localhost to see

## Setting up a component's stories

> 🚨 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
> 🚨 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
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.

Expand Down Expand Up @@ -57,9 +57,11 @@ export const Basic: Story = {

**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)

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.

We will maintain this structure for every story file, regardless of simplicity.

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.
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.

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

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

export const Solid: Story = {
render: (args) => <Button {...args}>A Button</Button>,
args: {
variant: 'solid',
children: 'A Button'
}
}
export const Outline: Story = {
render: (args) => <Button {...args}>A Button</Button>,
args: {
variant: 'outline',
children: 'A Button'
}
}

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

// Assuming `solid` is the default variant in the Chakra theme config
export const Variants = () => (
<VStack>
<Button>A Solid Button</Button>
<Button variant="outline">An Outline Button</Button>
<Button variant="unstyled">An Unstyled Button</Button>
</VStack>
)
export const Variants = {
render: () => (
<VStack>
<Button>A Solid Button</Button>
<Button variant="outline">An Outline Button</Button>
<Button variant="unstyled">An Unstyled Button</Button>
</VStack>
)
}
```

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.
### Story file containing a single story

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.

```tsx
import ButtonComponent from "."

const meta = {
title: "Atoms / Form / Button",
component: ButtonComponent,
} satisfies Meta<typeof ButtonComponent>

export default meta

export const Button: StoryObj<typeof meta> = {
render: () => <ButtonComponent />,
}
```

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.

## Storybook Dashboard

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

![Screenshot of Storybook Dashboard for Ethereum.org](https://github.com/ethereum/ethereum-org-website/assets/65234762/7dea7692-6a6d-4f1c-b7cb-db177bcab44d)

Outlined below are each area going from left to right in the selections.

| Toolbar above the preview | Panel below the preview |
Expand Down
8 changes: 8 additions & 0 deletions i18n.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,14 @@
"langDir": "ltr",
"dateFormat": "MM/DD/YYYY"
},
{
"code": "te",
"crowdinCode": "te",
"name": "Telugu",
"localName": "తెలుగు",
"langDir": "ltr",
"dateFormat": "MM/DD/YYYY"
},
{
"code": "tk",
"crowdinCode": "tk",
Expand Down
6 changes: 3 additions & 3 deletions public/content/contributing/design/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ Our design system makes designing ethereum.org fun and easy. If you are an exper

1. Select an issue to work on from [design system board](https://github.com/ethereum/ethereum-org-website/labels/design%20system) on GitHub or create a new one.
2. Request the selected issue to be assigned to you.
3. Start designing the requested component in figma.
3. Start designing the requested component in Figma.
4. Share it with the design team on GitHub once you need review or guidance.
5. The design team will review.
6. The Design team will incorporate the changes in the main file and publish the file to the community.
6. The design team will incorporate the changes in the main file and publish the file to the community.

### <Emoji text=":six:" size={1} /> &nbsp;Write design-related content on the website {#write-design-articles}

Expand All @@ -64,7 +64,7 @@ The Ethereum developer community is strong, but the design community is falling
2. Go to our GitHub repository and [raise an issue](https://github.com/ethereum/ethereum-org-website/issues/new) proposing a topic (do not write the content yet).
3. Wait for the design team to approve.
4. Once approved, write the content.
5. Submit it in the corresponding GH issue.
5. Submit it in the corresponding GitHub issue.

### <Emoji text=":seven:" size={1} /> &nbsp;Draw new illustrations {#prepare-illustrations}

Expand Down
Loading

0 comments on commit 0ad2351

Please sign in to comment.