Skip to content

Commit

Permalink
Merge pull request #13463 from ethereum/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
corwintines authored Jul 24, 2024
2 parents 9ebe79f + 62238f3 commit 2d102be
Show file tree
Hide file tree
Showing 900 changed files with 7,236 additions and 4,166 deletions.
69 changes: 67 additions & 2 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -11320,7 +11320,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/71248977?v=4",
"profile": "https://github.com/UNOFFICIALbgd",
"contributions": [
"bug"
"bug",
"doc"
]
},
{
Expand Down Expand Up @@ -12249,7 +12250,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/73983677?v=4",
"profile": "https://github.com/omahs",
"contributions": [
"translation"
"translation",
"maintenance"
]
},
{
Expand Down Expand Up @@ -12278,6 +12280,69 @@
"contributions": [
"content"
]
},
{
"login": "sandeepV2",
"name": "Sandeep Belagavi",
"avatar_url": "https://avatars.githubusercontent.com/u/52043035?v=4",
"profile": "https://github.com/sandeepV2",
"contributions": [
"bug"
]
},
{
"login": "codingmickey",
"name": "Kartik Jolapara",
"avatar_url": "https://avatars.githubusercontent.com/u/42518907?v=4",
"profile": "https://github.com/codingmickey",
"contributions": [
"code"
]
},
{
"login": "Ekam-Bitt",
"name": "Ekam Bitt",
"avatar_url": "https://avatars.githubusercontent.com/u/74407205?v=4",
"profile": "https://ekam-bitt.github.io",
"contributions": [
"maintenance"
]
},
{
"login": "iankressin",
"name": "Ian K. Guimarães",
"avatar_url": "https://avatars.githubusercontent.com/u/29215044?v=4",
"profile": "http://iankguimaraes.com",
"contributions": [
"maintenance"
]
},
{
"login": "jncrabb",
"name": "jncrabb",
"avatar_url": "https://avatars.githubusercontent.com/u/27811684?v=4",
"profile": "https://github.com/jncrabb",
"contributions": [
"content"
]
},
{
"login": "bibo7086",
"name": "Saidu Sokoto",
"avatar_url": "https://avatars.githubusercontent.com/u/24389200?v=4",
"profile": "https://github.com/bibo7086",
"contributions": [
"content"
]
},
{
"login": "krishchvn",
"name": "Krishnakumar Chavan",
"avatar_url": "https://avatars.githubusercontent.com/u/58606754?v=4",
"profile": "https://github.com/krishchvn",
"contributions": [
"content"
]
}
],
"contributorsPerLine": 7,
Expand Down
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
# GOOGLE_API_KEY=
# GOOGLE_CALENDAR_ID=

# Dune Analytics API key (required for total eth staked)
# DUNE_API_KEY=

# Matomo environment (URL and site ID required for analytics)
NEXT_PUBLIC_MATOMO_URL=
NEXT_PUBLIC_MATOMO_SITE_ID=
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
- "src/layouts/**/*"
- "src/@chakra-ui/**/*"
- ".storybook/**/*"
- "tailwind.config.ts"
- "src/styles/**/*"

# List of jobs
jobs:
Expand Down
4 changes: 3 additions & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const buildEslintCommand = (filenames) =>
.map((f) => path.relative(process.cwd(), f))
.join(" --file ")}`

const formatCommand = "prettier --write"

module.exports = {
"*.{js,jsx,ts,tsx}": [buildEslintCommand],
"*.{js,jsx,ts,tsx}": [buildEslintCommand, formatCommand],
}
7 changes: 5 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5"
}
"trailingComma": "es5",
"plugins": [
"prettier-plugin-tailwindcss"
]
}
3 changes: 2 additions & 1 deletion .storybook/ChakraDecorator.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useEffect, useMemo, useState } from "react"
import {
ChakraBaseProvider,
extendBaseTheme,
Expand All @@ -6,7 +7,7 @@ import {
import type { Decorator } from "@storybook/react"

import theme from "../src/@chakra-ui/theme"
import { useEffect, useMemo, useState } from "react"

import i18n from "./i18next"

type DecoratorProps = Parameters<Decorator>
Expand Down
12 changes: 9 additions & 3 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ const config: StorybookConfig = {
],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
{
name: "@storybook/addon-essentials",
options: {
backgrounds: false,
},
},
"@storybook/addon-interactions",
"storybook-react-i18next",
"@chromatic-com/storybook"
"@storybook/addon-themes",
"@chromatic-com/storybook",
],
staticDirs: ["../public"],
framework: {
Expand Down Expand Up @@ -73,7 +79,7 @@ const config: StorybookConfig = {
},
},

reactDocgen: "react-docgen-typescript"
reactDocgen: "react-docgen-typescript",
},
}
export default config
4 changes: 2 additions & 2 deletions .storybook/modes.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { baseLocales } from "./i18next"
import { chakraBreakpointArray } from "./preview"
import { breakpointSet } from "./preview"

export const viewportModes = chakraBreakpointArray.reduce<{
export const viewportModes = breakpointSet.reduce<{
[mode: string]: { viewport: string }
}>((arr, [token]) => {
return {
Expand Down
10 changes: 1 addition & 9 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
<style type="text/css">

:root {
--font-inter: 'Inter', sans-serif;
--font-mono: "IBM Plex Mono", Courier, monospace;
}

</style>

<link rel="preload" href="/fonts/inter/latin.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
<link rel="preload" href="/fonts/ibm-plex-mono/IBMPlexMono-Regular.ttf" as="font" type="font/ttf" crossorigin="anonymous" />
<link rel="preload" href="/fonts/ibm-plex-mono/IBMPlexMono-Regular.ttf" as="font" type="font/ttf" crossorigin="anonymous" />
95 changes: 0 additions & 95 deletions .storybook/preview.ts

This file was deleted.

83 changes: 83 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import isChromatic from "chromatic/isChromatic"
import { MotionGlobalConfig } from "framer-motion"
import { withThemeByDataAttribute } from "@storybook/addon-themes"
import type { Preview } from "@storybook/react"

import ThemeProvider from "@/components/ThemeProvider"

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

import "../src/styles/global.css"
import "../src/styles/fonts.css"

MotionGlobalConfig.skipAnimations = isChromatic()

export const breakpointSet: [token: string, value: string][] = [
["base", "375px"],
["sm", "640px"],
["md", "768px"],
["lg", "1024px"],
["xl", "1280px"],
["2xl", "1536px"],
]

const preview: Preview = {
globals: {
locale: "en",
locales: baseLocales,
},
decorators: [
withThemeByDataAttribute({
themes: {
light: "light",
dark: "dark",
},
defaultTheme: "light",
}),
(Story) => (
<ThemeProvider>
<Story />
</ThemeProvider>
),
],
parameters: {
i18n,
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
chromatic: {
prefersReducedMotion: "reduce",
},
options: {
storySort: {
order: ["Atoms", "Molecules", "Organisms", "Templates", "Pages"],
},
},
layout: "centered",
// Modify viewport selection to match Chakra breakpoints (or custom breakpoints)
viewport: {
viewports: breakpointSet.reduce<{
[token: string]: {
name: string
styles: Record<"width" | "height", string>
}
}>((arr, [token, value]) => {
return {
...arr,
[token]: {
name: token,
styles: {
width: value,
height: "800px",
},
},
}
}, {}),
},
},
}

export default preview
Loading

0 comments on commit 2d102be

Please sign in to comment.