Skip to content

Commit c4e91fe

Browse files
authored
Merge pull request #15529 from ethereum/dev
Release candidate v10.4.0
2 parents 954fbeb + 3a51b93 commit c4e91fe

File tree

134 files changed

+1369
-591
lines changed

Some content is hidden

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

134 files changed

+1369
-591
lines changed

.all-contributorsrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12725,6 +12725,13 @@
1272512725
"bug"
1272612726
]
1272712727
},
12728+
{
12729+
"login": "hotequil",
12730+
"name": "João Paulo Hotequil",
12731+
"avatar_url": "https://avatars.githubusercontent.com/u/46814712?v=4",
12732+
"profile": "https://github.com/hotequil",
12733+
"contributions": ["code", "translation"]
12734+
},
1272812735
{
1272912736
"login": "microHoffman",
1273012737
"name": "microHoffman",
@@ -12733,6 +12740,15 @@
1273312740
"contributions": [
1273412741
"bug"
1273512742
]
12743+
},
12744+
{
12745+
"login": "smithrashell",
12746+
"name": "Rashell Smith",
12747+
"avatar_url": "https://avatars.githubusercontent.com/u/36465023?v=4",
12748+
"profile": "https://github.com/smithrashell",
12749+
"contributions": [
12750+
"bug"
12751+
]
1273612752
}
1273712753
],
1273812754
"contributorsPerLine": 7,

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
10401040
<td align="center" valign="top" width="14.28%"><a href="https://www.yashkarthik.xyz/"><img src="https://avatars.githubusercontent.com/u/52369876?v=4?s=100" width="100px;" alt="yash"/><br /><sub><b>yash</b></sub></a><br /><a href="#ideas-YashKarthik" title="Ideas, Planning, & Feedback">🤔</a></td>
10411041
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ibeale"><img src="https://avatars.githubusercontent.com/u/46497763?v=4?s=100" width="100px;" alt="Isaac Beale"/><br /><sub><b>Isaac Beale</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=ibeale" title="Documentation">📖</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Aibeale" title="Bug reports">🐛</a></td>
10421042
<td align="center" valign="top" width="14.28%"><a href="https://github.com/chrishna1"><img src="https://avatars.githubusercontent.com/u/26048398?v=4?s=100" width="100px;" alt="Bal Krishna Jha"/><br /><sub><b>Bal Krishna Jha</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=chrishna1" title="Documentation">📖</a></td>
1043-
<td align="center" valign="top" width="14.28%"><a href="http://www.linkedin.com/in/mradziwon"><img src="https://avatars.githubusercontent.com/u/6785984?v=4?s=100" width="100px;" alt="mradziwon"/><br /><sub><b>mradziwon</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=mradziwon" title="Code">💻</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Amradziwon" title="Bug reports">🐛</a></td>
1043+
<td align="center" valign="top" width="14.28%"><a href="http://www.linkedin.com/in/maciejrrr"><img src="https://avatars.githubusercontent.com/u/6785984?v=4?s=100" width="100px;" alt="maciejrrr"/><br /><sub><b>maciejrrr</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=maciejrrr" title="Code">💻</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Amaciejrrr" title="Bug reports">🐛</a></td>
10441044
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mmilenkovic"><img src="https://avatars.githubusercontent.com/u/2448210?v=4?s=100" width="100px;" alt="mmilenkovic"/><br /><sub><b>mmilenkovic</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=mmilenkovic" title="Documentation">📖</a> <a href="#ideas-mmilenkovic" title="Ideas, Planning, & Feedback">🤔</a></td>
10451045
<td align="center" valign="top" width="14.28%"><a href="https://github.com/guevaraf"><img src="https://avatars.githubusercontent.com/u/2633129?v=4?s=100" width="100px;" alt="Fernando Guevara"/><br /><sub><b>Fernando Guevara</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=guevaraf" title="Documentation">📖</a></td>
10461046
<td align="center" valign="top" width="14.28%"><a href="https://github.com/garrivjo"><img src="https://avatars.githubusercontent.com/u/31991694?v=4?s=100" width="100px;" alt="Jose Manuel Garcia Rivas"/><br /><sub><b>Jose Manuel Garcia Rivas</b></sub></a><br /><a href="#ideas-garrivjo" title="Ideas, Planning, & Feedback">🤔</a></td>
@@ -1948,6 +1948,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
19481948
<tr>
19491949
<td align="center" valign="top" width="14.28%"><a href="https://github.com/JJOptimist"><img src="https://avatars.githubusercontent.com/u/86833563?v=4?s=100" width="100px;" alt="JJOptimist"/><br /><sub><b>JJOptimist</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3AJJOptimist" title="Bug reports">🐛</a></td>
19501950
<td align="center" valign="top" width="14.28%"><a href="http://pwn.xyz"><img src="https://avatars.githubusercontent.com/u/61500778?v=4?s=100" width="100px;" alt="microHoffman"/><br /><sub><b>microHoffman</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3AmicroHoffman" title="Bug reports">🐛</a></td>
1951+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/smithrashell"><img src="https://avatars.githubusercontent.com/u/36465023?v=4?s=100" width="100px;" alt="Rashell Smith"/><br /><sub><b>Rashell Smith</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Asmithrashell" title="Bug reports">🐛</a></td>
19511952
</tr>
19521953
</tbody>
19531954
</table>
@@ -1962,3 +1963,5 @@ This project follows the [all-contributors](https://github.com/all-contributors/
19621963
### Join our Discord server
19631964

19641965
We have a space to discuss all things ethereum.org – share your ideas or just say hi over [on Discord](https://discord.gg/ethereum-org).
1966+
1967+
[🔼Back to top!](#Table-of-contents)

app/[locale]/[...slug]/page.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import mdComponents from "@/components/MdComponents"
77

88
import { dataLoader } from "@/lib/utils/data/dataLoader"
99
import { dateToString } from "@/lib/utils/date"
10+
import { getLayoutFromSlug } from "@/lib/utils/layout"
1011
import { getPostSlugs } from "@/lib/utils/md"
1112
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1213

@@ -19,18 +20,6 @@ import { getMdMetadata } from "@/lib/md/metadata"
1920

2021
const loadData = dataLoader([["gfissues", fetchGFIs]])
2122

22-
function getLayoutFromSlug(slug: string) {
23-
if (slug.includes("developers/docs")) {
24-
return "docs"
25-
}
26-
27-
if (slug.includes("developers/tutorials")) {
28-
return "tutorial"
29-
}
30-
31-
return "static"
32-
}
33-
3423
export default async function Page({
3524
params,
3625
}: {
@@ -69,7 +58,8 @@ export default async function Page({
6958
slug,
7059
// TODO: Address component typing error here (flip `FC` types to prop object types)
7160
// @ts-expect-error Incompatible component function signatures
72-
components: { ...mdComponents, ...componentsMapping },
61+
baseComponents: mdComponents,
62+
componentsMapping,
7363
scope: {
7464
gfissues,
7565
},

app/[locale]/_components/home.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,8 @@ const HomePage = ({
651651
e.currentTarget.onerror = null
652652
e.currentTarget.src = EventFallback.src
653653
}}
654+
referrerPolicy="no-referrer"
655+
crossOrigin="anonymous"
654656
/>
655657
</CardBanner>
656658
<CardContent>
@@ -738,6 +740,8 @@ const HomePage = ({
738740
}}
739741
className="max-w-full object-cover object-center"
740742
loading="lazy"
743+
referrerPolicy="no-referrer"
744+
crossOrigin="anonymous"
741745
/>
742746
) : (
743747
<Image src={EventFallback} alt="" />

app/[locale]/bug-bounty/_components/bug-bounty.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { HTMLAttributes } from "react"
44

5-
import type { ChildOnlyProp } from "@/lib/types"
5+
import type { ChildOnlyProp, PageWithContributorsProps } from "@/lib/types"
66

77
/* Uncomment for Bug Bounty Banner: */
88
import BugBountyBanner from "@/components/Banners/BugBountyBanner"
@@ -13,6 +13,7 @@ import CardList from "@/components/CardList"
1313
import Emoji from "@/components/Emoji"
1414
import ExpandableCard from "@/components/ExpandableCard"
1515
import FeedbackCard from "@/components/FeedbackCard"
16+
import FileContributors from "@/components/FileContributors"
1617
import { Image, type ImageProps } from "@/components/Image"
1718
import Leaderboard from "@/components/Leaderboard"
1819
import MainArticle from "@/components/MainArticle"
@@ -224,7 +225,10 @@ const sortBountyHuntersFn = (a: BountyHuntersArg, b: BountyHuntersArg) => {
224225
return b.score - a.score
225226
}
226227

227-
const BugBountiesPage = () => {
228+
const BugBountiesPage = ({
229+
contributors,
230+
lastEditLocaleTimestamp,
231+
}: PageWithContributorsProps) => {
228232
const pathname = usePathname()
229233
const { t } = useTranslation("page-bug-bounty")
230234

@@ -768,6 +772,11 @@ const BugBountiesPage = () => {
768772
</ExpandableCard>
769773
</RightColumn>
770774
</Faq>
775+
<FileContributors
776+
className="my-10 border-t"
777+
contributors={contributors}
778+
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
779+
/>
771780
</Content>
772781
<Divider />
773782
<Contact>

app/[locale]/bug-bounty/page.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import {
55
setRequestLocale,
66
} from "next-intl/server"
77

8-
import { type Params } from "@/lib/types"
8+
import type { CommitHistory, Lang, Params } from "@/lib/types"
99

1010
import I18nProvider from "@/components/I18nProvider"
1111

12+
import { getAppPageContributorInfo } from "@/lib/utils/contributors"
1213
import { getMetadata } from "@/lib/utils/metadata"
1314
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1415

@@ -24,9 +25,20 @@ export default async function Page({ params }: { params: Promise<Params> }) {
2425
const requiredNamespaces = getRequiredNamespacesForPage("/bug-bounty")
2526
const messages = pick(allMessages, requiredNamespaces)
2627

28+
const commitHistoryCache: CommitHistory = {}
29+
const { contributors, lastEditLocaleTimestamp } =
30+
await getAppPageContributorInfo(
31+
"bug-bounty",
32+
locale as Lang,
33+
commitHistoryCache
34+
)
35+
2736
return (
2837
<I18nProvider locale={locale} messages={messages}>
29-
<BugBountiesPage />
38+
<BugBountiesPage
39+
contributors={contributors}
40+
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
41+
/>
3042
</I18nProvider>
3143
)
3244
}

app/[locale]/dapps/_components/dapps.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import React, {
1111
import { useSearchParams } from "next/navigation"
1212
import { useLocale } from "next-intl"
1313

14-
import type { ChildOnlyProp } from "@/lib/types"
14+
import type { ChildOnlyProp, PageWithContributorsProps } from "@/lib/types"
1515

1616
import BoxGrid from "@/components/BoxGrid"
1717
import Callout from "@/components/Callout"
@@ -20,6 +20,7 @@ import Card from "@/components/Card"
2020
import DocLink from "@/components/DocLink"
2121
import Emoji from "@/components/Emoji"
2222
import FeedbackCard from "@/components/FeedbackCard"
23+
import FileContributors from "@/components/FileContributors"
2324
import GhostCard from "@/components/GhostCard"
2425
import { Image } from "@/components/Image"
2526
import InfoBanner from "@/components/InfoBanner"
@@ -270,7 +271,10 @@ interface Categories {
270271
[key: string]: Category
271272
}
272273

273-
const DappsPage = () => {
274+
const DappsPage = ({
275+
contributors,
276+
lastEditLocaleTimestamp,
277+
}: PageWithContributorsProps) => {
274278
const { t } = useTranslation(["page-dapps", "common"])
275279
const searchParams = useSearchParams()
276280
const locale = useLocale()
@@ -538,7 +542,7 @@ const DappsPage = () => {
538542
{
539543
title: "Curve",
540544
description: t("page-dapps-dapp-description-curve"),
541-
link: "https://curve.fi/",
545+
link: "https://www.curve.finance/",
542546
image: curve,
543547
alt: t("page-dapps-curve-logo-alt"),
544548
},
@@ -1107,7 +1111,7 @@ const DappsPage = () => {
11071111
<H2 id="explore">{t("page-dapps-explore-dapps-title")}</H2>
11081112
<CenterText>{t("page-dapps-explore-dapps-description")}</CenterText>
11091113
<H3>{t("page-dapps-choose-category")}</H3>
1110-
<div className="mb-8 grid w-full grid-cols-1 justify-center gap-4 px-8 sm:grid-cols-2 lg:w-auto lg:grid-cols-3 2xl:grid-cols-6">
1114+
<div className="mb-8 grid w-full grid-cols-1 justify-center gap-4 px-8 sm:grid-cols-2 lg:w-auto lg:grid-cols-[repeat(4,auto)]">
11111115
{categoryKeys.map((key, idx) => {
11121116
const categoryType = key as CategoryType
11131117
const category = categories[categoryType]
@@ -1530,6 +1534,11 @@ const DappsPage = () => {
15301534
</Row>
15311535
</Content>
15321536
<Content>
1537+
<FileContributors
1538+
className="my-10 border-t"
1539+
contributors={contributors}
1540+
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
1541+
/>
15331542
<FeedbackCard />
15341543
</Content>
15351544
</Page>

app/[locale]/dapps/page.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import {
55
setRequestLocale,
66
} from "next-intl/server"
77

8-
import { Params } from "@/lib/types"
8+
import type { CommitHistory, Lang, Params } from "@/lib/types"
99

1010
import I18nProvider from "@/components/I18nProvider"
1111

12+
import { getAppPageContributorInfo } from "@/lib/utils/contributors"
1213
import { getMetadata } from "@/lib/utils/metadata"
1314
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
1415

@@ -22,9 +23,16 @@ export default async function Page({ params }: { params: Promise<Params> }) {
2223
const requiredNamespaces = getRequiredNamespacesForPage("/dapps")
2324
const pickedMessages = pick(allMessages, requiredNamespaces)
2425

26+
const commitHistoryCache: CommitHistory = {}
27+
const { contributors, lastEditLocaleTimestamp } =
28+
await getAppPageContributorInfo("dapps", locale as Lang, commitHistoryCache)
29+
2530
return (
2631
<I18nProvider locale={locale} messages={pickedMessages}>
27-
<DappsPage />
32+
<DappsPage
33+
contributors={contributors}
34+
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
35+
/>
2836
</I18nProvider>
2937
)
3038
}

app/[locale]/developers/page.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,16 @@ export async function generateMetadata({
3838
}) {
3939
const { locale } = await params
4040

41-
const t = await getTranslations({ locale, namespace: "page-developers" })
41+
const t = await getTranslations({
42+
locale,
43+
namespace: "page-developers-index",
44+
})
4245

4346
return await getMetadata({
4447
locale,
4548
slug: ["developers"],
46-
title: t("page-developers-index:page-developer-meta-title"),
47-
description: t("page-developers-index:page-developers-meta-desc"),
49+
title: t("page-developer-meta-title"),
50+
description: t("page-developers-meta-desc"),
4851
})
4952
}
5053

app/[locale]/developers/tutorials/_components/tutorials.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ import {
3434

3535
import externalTutorials from "@/data/externalTutorials.json"
3636

37+
import { DEFAULT_LOCALE } from "@/lib/constants"
38+
3739
import { useBreakpointValue } from "@/hooks/useBreakpointValue"
3840

3941
type LinkFlexProps = FlexProps & {
@@ -93,14 +95,15 @@ const TutorialPage = ({
9395
contentNotTranslated,
9496
}: TutorialPageProps) => {
9597
const locale = useLocale()
98+
const effectiveLocale = internalTutorials.length > 0 ? locale : DEFAULT_LOCALE
9699
const filteredTutorialsByLang = useMemo(
97100
() =>
98101
filterTutorialsByLang(
99102
internalTutorials,
100103
externalTutorials,
101-
locale as Lang
104+
effectiveLocale as Lang
102105
),
103-
[internalTutorials, locale]
106+
[internalTutorials, effectiveLocale]
104107
)
105108

106109
const allTags = useMemo(

0 commit comments

Comments
 (0)