Skip to content

Commit 115890d

Browse files
Merge remote-tracking branch 'origin/dev' into refactor/update-hero-ds
2 parents 03c6333 + c3afcfb commit 115890d

File tree

710 files changed

+13155
-8744
lines changed

Some content is hidden

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

710 files changed

+13155
-8744
lines changed

.all-contributorsrc

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11490,7 +11490,8 @@
1149011490
"avatar_url": "https://avatars.githubusercontent.com/u/72754835?v=4",
1149111491
"profile": "https://github.com/0xemrekaya",
1149211492
"contributions": [
11493-
"tutorial"
11493+
"tutorial",
11494+
"doc"
1149411495
]
1149511496
},
1149611497
{
@@ -11736,7 +11737,8 @@
1173611737
"avatar_url": "https://avatars.githubusercontent.com/u/61613931?v=4",
1173711738
"profile": "https://dharmik79.github.io/portfolio.github.io/",
1173811739
"contributions": [
11739-
"bug"
11740+
"bug",
11741+
"code"
1174011742
]
1174111743
},
1174211744
{
@@ -11829,7 +11831,8 @@
1182911831
"avatar_url": "https://avatars.githubusercontent.com/u/8257719?v=4",
1183011832
"profile": "http://rashidma.com",
1183111833
"contributions": [
11832-
"bug"
11834+
"bug",
11835+
"doc"
1183311836
]
1183411837
},
1183511838
{
@@ -11958,6 +11961,51 @@
1195811961
"contributions": [
1195911962
"maintenance"
1196011963
]
11964+
},
11965+
{
11966+
"login": "liuye20240304",
11967+
"name": "liuye20240304",
11968+
"avatar_url": "https://avatars.githubusercontent.com/u/162123251?v=4",
11969+
"profile": "https://github.com/liuye20240304",
11970+
"contributions": [
11971+
"doc"
11972+
]
11973+
},
11974+
{
11975+
"login": "zk-Lumi",
11976+
"name": "Daniel Lumi",
11977+
"avatar_url": "https://avatars.githubusercontent.com/u/149794418?v=4",
11978+
"profile": "https://zksync.io",
11979+
"contributions": [
11980+
"maintenance"
11981+
]
11982+
},
11983+
{
11984+
"login": "ZakGriffith",
11985+
"name": "Zak G",
11986+
"avatar_url": "https://avatars.githubusercontent.com/u/12072395?v=4",
11987+
"profile": "https://github.com/ZakGriffith",
11988+
"contributions": [
11989+
"tutorial"
11990+
]
11991+
},
11992+
{
11993+
"login": "barskhianfannie",
11994+
"name": "Fannie Barskhian",
11995+
"avatar_url": "https://avatars.githubusercontent.com/u/42990794?v=4",
11996+
"profile": "http://fanniebarskhian.com",
11997+
"contributions": [
11998+
"maintenance"
11999+
]
12000+
},
12001+
{
12002+
"login": "ksdumont",
12003+
"name": "Keith Dumont",
12004+
"avatar_url": "https://avatars.githubusercontent.com/u/51958351?v=4",
12005+
"profile": "https://github.com/ksdumont",
12006+
"contributions": [
12007+
"content"
12008+
]
1196112009
}
1196212010
],
1196312011
"contributorsPerLine": 7,

.github/workflows/build-crowdin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
create_pr:
9+
trigger_crowdin_project_build:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
create_pr:
9+
get_data_and_create_pr:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code

.github/workflows/get-leaderboard-reports.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
create_pr:
9+
get_data_and_create_pr:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
create_pr:
9+
get_data_and_create_pr:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code

.github/workflows/get-translations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
create_pr:
9+
import_crowdin_and_create_prs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code

.github/workflows/import-community-events.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
create_pr:
9+
get_data_and_create_pr:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code

.github/workflows/lighthouse-ci.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Lighthouse CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- staging
8+
- performance/**
9+
10+
jobs:
11+
lighthouse:
12+
runs-on: ubuntu-latest
13+
14+
permissions:
15+
pull-requests: write
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Sleep for 60 minutes
20+
run: sleep 3600
21+
- name: Wait for Netlify Deploy
22+
id: netlify_deploy
23+
uses: probablyup/[email protected]
24+
with:
25+
site_id: "e8f2e766-888b-4954-8500-1b647d84db99"
26+
max_timeout: 900
27+
env:
28+
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
29+
- name: Audit URLs using Lighthouse
30+
id: lighthouse_audit
31+
uses: treosh/lighthouse-ci-action@v11
32+
with:
33+
urls: |
34+
${{ steps.netlify_deploy.outputs.url }}/en/
35+
${{ steps.netlify_deploy.outputs.url }}/en/wallets/find-wallet/
36+
${{ steps.netlify_deploy.outputs.url }}/en/staking/
37+
${{ steps.netlify_deploy.outputs.url }}/en/whitepaper/
38+
${{ steps.netlify_deploy.outputs.url }}/en/nft/
39+
${{ steps.netlify_deploy.outputs.url }}/en/developers/docs/intro-to-ethereum/
40+
${{ steps.netlify_deploy.outputs.url }}/en/developers/tutorials/creating-a-wagmi-ui-for-your-contract/
41+
runs: 3 # run three times
42+
uploadArtifacts: true # save results as an action artifacts
43+
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
44+
- name: Format lighthouse score
45+
id: format_lighthouse_score
46+
uses: actions/github-script@v3
47+
with:
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
script: |
50+
const manifests = ${{ steps.lighthouse_audit.outputs.manifest }};
51+
const links = ${{ steps.lighthouse_audit.outputs.links }};
52+
const formatResult = (res) => Math.round((res * 100));
53+
54+
console.log('Total manifests:', manifests.length);
55+
console.log('Manifests:', JSON.stringify(manifests, null, 2));
56+
console.log('Links:', JSON.stringify(links, null, 2));
57+
58+
let comment = [
59+
'| Page | Performance | Accessibility | Best practices | SEO | PWA |',
60+
'| --- | --- | --- | --- | --- | --- |',
61+
];
62+
63+
Object.entries(links).forEach(([pageUrl, reportUrl]) => {
64+
const relevantManifests = manifests.filter(manifest => manifest.url === pageUrl);
65+
const results = relevantManifests.map(manifest => manifest.summary);
66+
const averagedResults = {};
67+
68+
if (results.length > 0) {
69+
Object.keys(results[0]).forEach(key => {
70+
averagedResults[key] = formatResult(
71+
results.reduce((acc, cur) => acc + cur[key], 0) / results.length
72+
);
73+
});
74+
75+
const score = res => res >= 90 ? '🟢' : res >= 50 ? '🟠' : '🔴';
76+
const urlForTable = pageUrl.includes('/en/') ? pageUrl.substring(pageUrl.indexOf('/en/')) : pageUrl;
77+
78+
comment.push(
79+
`| [${urlForTable}](${reportUrl}) | ${score(averagedResults.performance)} ${averagedResults.performance} | ${score(averagedResults.accessibility)} ${averagedResults.accessibility} | ${score(averagedResults['best-practices'])} ${averagedResults['best-practices']} | ${score(averagedResults.seo)} ${averagedResults.seo} | ${score(averagedResults.pwa)} ${averagedResults.pwa} |`
80+
);
81+
} else {
82+
console.error('No results found for URL:', pageUrl);
83+
}
84+
});
85+
86+
comment.push(
87+
' ',
88+
'*Lighthouse scores are calculated based on the latest audit results*'
89+
);
90+
91+
comment = comment.join('\n');
92+
core.setOutput("comment", comment);
93+
- name: Find current PR # Find the PR associated with this push, if there is one.
94+
uses: jwalton/[email protected]
95+
id: findPr
96+
with:
97+
state: open
98+
- name: Add Lighthouse stats as comment
99+
id: comment_to_pr
100+
uses: marocchino/[email protected]
101+
with:
102+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
number: ${{ steps.findPr.outputs.number }}
104+
header: lighthouse
105+
message: ${{ steps.format_lighthouse_score.outputs.comment }}

.github/workflows/stale.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Close Stale Issues
33
on:
44
schedule:
55
- cron: "0 8 * * *"
6+
workflow_dispatch:
67

78
jobs:
89
stale:
@@ -13,6 +14,8 @@ jobs:
1314
with:
1415
repo-token: ${{ secrets.GITHUB_TOKEN }}
1516
stale-issue-label: "Status: Stale"
16-
stale-issue-message: "This issue is stale because it has been open 45 days with no activity."
17-
days-before-stale: 45
17+
stale-pr-label: "Status: Stale"
18+
stale-issue-message: "This issue is stale because it has been open 30 days with no activity."
19+
stale-pr-message: "This issue is stale because it has been open 30 days with no activity."
20+
days-before-stale: 30
1821
days-before-close: -1

.storybook/preview.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import "../src/styles/global.css"
99

1010
const extendedTheme = extendBaseTheme(theme)
1111

12-
const chakraBreakpointArray = Object.entries(extendedTheme.breakpoints)
12+
const chakraBreakpointArray = Object.entries(extendedTheme.breakpoints) as [
13+
string,
14+
string
15+
][]
1316

1417
const preview: Preview = {
1518
globals: {
@@ -28,6 +31,11 @@ const preview: Preview = {
2831
backgrounds: {
2932
disable: true,
3033
},
34+
options: {
35+
storySort: {
36+
order: ["Atoms", "Molecules", "Organisms", "Templates", "Pages"],
37+
},
38+
},
3139
chakra: {
3240
theme: extendedTheme,
3341
},
@@ -37,6 +45,9 @@ const preview: Preview = {
3745
viewports: chakraBreakpointArray.reduce((prevVal, currVal) => {
3846
const [token, key] = currVal
3947

48+
// `key` value is in em. Need to convert to px for Chromatic Story mode snapshots
49+
const emToPx = (Number(key.replace("em", "")) * 16).toString() + "px"
50+
4051
// Replace base value
4152
if (token === "base")
4253
return {
@@ -55,7 +66,7 @@ const preview: Preview = {
5566
[token]: {
5667
name: token,
5768
styles: {
58-
width: key,
69+
width: emToPx,
5970
height: "600px",
6071
},
6172
},

0 commit comments

Comments
 (0)