Skip to content

Commit 7753e0f

Browse files
merging all conflicts
2 parents b6218d4 + 50d6991 commit 7753e0f

File tree

130 files changed

+20509
-1102
lines changed

Some content is hidden

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

130 files changed

+20509
-1102
lines changed

.github/workflows/analyze.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
- main # change this if your default branch is named differently
88
workflow_dispatch:
99

10+
permissions: {}
11+
1012
jobs:
1113
analyze:
1214
runs-on: ubuntu-latest
@@ -23,7 +25,7 @@ jobs:
2325
- name: Restore cached node_modules
2426
uses: actions/cache@v4
2527
with:
26-
path: "**/node_modules"
28+
path: '**/node_modules'
2729
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
2830

2931
- name: Install deps
@@ -55,7 +57,7 @@ jobs:
5557
name: bundle_analysis.json
5658

5759
- name: Download base branch bundle stats
58-
uses: dawidd6/action-download-artifact@v2
60+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
5961
if: success() && github.event.number
6062
with:
6163
workflow: analyze.yml

.github/workflows/analyze_comment.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: Analyze Bundle (Comment)
22

33
on:
44
workflow_run:
5-
workflows: ["Analyze Bundle"]
5+
workflows: ['Analyze Bundle']
66
types:
77
- completed
88

9+
permissions:
10+
contents: read
11+
issues: write
12+
pull-requests: write
13+
914
jobs:
1015
comment:
1116
runs-on: ubuntu-latest
@@ -14,15 +19,15 @@ jobs:
1419
github.event.workflow_run.conclusion == 'success' }}
1520
steps:
1621
- name: Download base branch bundle stats
17-
uses: dawidd6/action-download-artifact@v2
22+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
1823
with:
1924
workflow: analyze.yml
2025
run_id: ${{ github.event.workflow_run.id }}
2126
name: analysis_comment.txt
2227
path: analysis_comment.txt
2328

2429
- name: Download PR number
25-
uses: dawidd6/action-download-artifact@v2
30+
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
2631
with:
2732
workflow: analyze.yml
2833
run_id: ${{ github.event.workflow_run.id }}
@@ -48,7 +53,7 @@ jobs:
4853
echo "pr-number=$pr_number" >> $GITHUB_OUTPUT
4954
5055
- name: Comment
51-
uses: marocchino/sticky-pull-request-comment@v2
56+
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728
5257
with:
5358
header: next-bundle-analysis
5459
number: ${{ steps.get-comment-body.outputs.pr-number }}

.github/workflows/discord_notify.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,30 @@ name: Discord Notify
22

33
on:
44
pull_request_target:
5+
<<<<<<< HEAD
56
types: [ labeled ]
67

78
jobs:
89
notify:
910
if: ${{ github.event.label.name == 'React Core Team' }}
11+
=======
12+
types: [opened, ready_for_review]
13+
14+
permissions: {}
15+
16+
jobs:
17+
check_maintainer:
18+
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
19+
permissions:
20+
# Used by check_maintainer
21+
contents: read
22+
with:
23+
actor: ${{ github.event.pull_request.user.login }}
24+
25+
notify:
26+
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
27+
needs: check_maintainer
28+
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
1029
runs-on: ubuntu-latest
1130
steps:
1231
- name: Discord Webhook Action
@@ -18,4 +37,8 @@ jobs:
1837
embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
1938
embed-title: '#${{ github.event.number }} (+${{github.event.pull_request.additions}} -${{github.event.pull_request.deletions}}): ${{ github.event.pull_request.title }}'
2039
embed-description: ${{ github.event.pull_request.body }}
21-
embed-url: ${{ github.event.pull_request.html_url }}
40+
<<<<<<< HEAD
41+
embed-url: ${{ github.event.pull_request.html_url }}
42+
=======
43+
embed-url: ${{ github.event.pull_request.html_url }}
44+
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Label Core Team PRs
2+
3+
on:
4+
pull_request_target:
5+
6+
permissions: {}
7+
8+
env:
9+
TZ: /usr/share/zoneinfo/America/Los_Angeles
10+
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
11+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
12+
13+
jobs:
14+
check_maintainer:
15+
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
16+
permissions:
17+
# Used by check_maintainer
18+
contents: read
19+
with:
20+
actor: ${{ github.event.pull_request.user.login }}
21+
22+
label:
23+
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
24+
runs-on: ubuntu-latest
25+
needs: check_maintainer
26+
permissions:
27+
# Used to add labels on issues
28+
issues: write
29+
# Used to add labels on PRs
30+
pull-requests: write
31+
steps:
32+
- name: Label PR as React Core Team
33+
uses: actions/github-script@v7
34+
with:
35+
script: |
36+
github.rest.issues.addLabels({
37+
owner: context.repo.owner,
38+
repo: context.repo.repo,
39+
issue_number: ${{ github.event.number }},
40+
labels: ['React Core Team']
41+
});

.github/workflows/site_lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
types: [opened, synchronize, reopened]
99

10+
permissions: {}
11+
1012
jobs:
1113
lint:
1214
runs-on: ubuntu-latest
@@ -25,7 +27,7 @@ jobs:
2527
- name: Restore cached node_modules
2628
uses: actions/cache@v4
2729
with:
28-
path: "**/node_modules"
30+
path: '**/node_modules'
2931
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
3032

3133
- name: Install deps

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
},
2525
"dependencies": {
2626
"@codesandbox/sandpack-react": "2.13.5",
27-
"@docsearch/css": "^3.6.1",
28-
"@docsearch/react": "^3.6.1",
27+
"@docsearch/css": "^3.8.3",
28+
"@docsearch/react": "^3.8.3",
2929
"@headlessui/react": "^1.7.0",
3030
"@radix-ui/react-context-menu": "^2.1.5",
3131
"body-scroll-lock": "^3.1.3",

postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ module.exports = {
1717
},
1818
},
1919
},
20-
}
20+
};
75.6 KB
Binary file not shown.
64.9 KB
Binary file not shown.
Loading
Binary file not shown.
Loading
Binary file not shown.

public/images/team/andrey-lunyov.jpg

-56.2 KB
Binary file not shown.

public/images/team/hendrik.jpg

306 KB
Loading

public/images/team/jordan.jpg

281 KB
Loading
-129 KB
Binary file not shown.

public/images/team/lauren.jpg

-897 KB
Loading

public/images/team/luna-wei.jpg

-283 KB
Binary file not shown.

public/images/team/mike.jpg

310 KB
Loading

public/images/team/noahlemen.jpg

-330 KB
Binary file not shown.

public/images/team/pieter.jpg

359 KB
Loading

public/images/team/sam.jpg

-99.9 KB
Binary file not shown.

public/images/team/sathya.jpg

-68.8 KB
Binary file not shown.

public/images/team/tianyu.jpg

-51.4 KB
Binary file not shown.

public/js/jsfiddle-integration-babel.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
// Do not delete or move this file.
66
// Many fiddles reference it so we have to keep it here.
7-
(function() {
7+
(function () {
88
var tag = document.querySelector(
99
'script[type="application/javascript;version=1.7"]'
1010
);
1111
if (!tag || tag.textContent.indexOf('window.onload=function(){') !== -1) {
12-
alert('Bad JSFiddle configuration, please fork the original React JSFiddle');
12+
alert(
13+
'Bad JSFiddle configuration, please fork the original React JSFiddle'
14+
);
1315
}
1416
tag.setAttribute('type', 'text/babel');
1517
tag.textContent = tag.textContent.replace(/^\/\/<!\[CDATA\[/, '');

public/js/jsfiddle-integration.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
// Do not delete or move this file.
66
// Many fiddles reference it so we have to keep it here.
7-
(function() {
7+
(function () {
88
var tag = document.querySelector(
99
'script[type="application/javascript;version=1.7"]'
1010
);
1111
if (!tag || tag.textContent.indexOf('window.onload=function(){') !== -1) {
12-
alert('Bad JSFiddle configuration, please fork the original React JSFiddle');
12+
alert(
13+
'Bad JSFiddle configuration, please fork the original React JSFiddle'
14+
);
1315
}
1416
tag.setAttribute('type', 'text/jsx;harmony=true');
1517
tag.textContent = tag.textContent.replace(/^\/\/<!\[CDATA\[/, '');

scripts/headingIDHelpers/walk.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ const fs = require('fs');
22

33
module.exports = function walk(dir) {
44
let results = [];
5-
/**
5+
/**
66
* If the param is a directory we can return the file
77
*/
8-
if(dir.includes('md')){
8+
if (dir.includes('md')) {
99
return [dir];
1010
}
1111
const list = fs.readdirSync(dir);

scripts/headingIdLinter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
const validateHeaderIds = require('./headingIDHelpers/validateHeadingIDs');
22
const generateHeadingIds = require('./headingIDHelpers/generateHeadingIDs');
33

4-
/**
4+
/**
55
* yarn lint-heading-ids --> Checks all files and causes an error if heading ID is missing
66
* yarn lint-heading-ids --fix --> Fixes all markdown file's heading IDs
77
* yarn lint-heading-ids path/to/markdown.md --> Checks that particular file for missing heading ID (path can denote a directory or particular file)
88
* yarn lint-heading-ids --fix path/to/markdown.md --> Fixes that particular file's markdown IDs (path can denote a directory or particular file)
9-
*/
9+
*/
1010

1111
const markdownPaths = process.argv.slice(2);
1212
if (markdownPaths.includes('--fix')) {
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*/
4+
5+
import {memo} from 'react';
6+
7+
export const IconExperimental = memo<
8+
JSX.IntrinsicElements['svg'] & {title?: string; size?: 's' | 'md'}
9+
>(function IconCanary(
10+
{className, title, size} = {
11+
className: undefined,
12+
title: undefined,
13+
size: 'md',
14+
}
15+
) {
16+
return (
17+
<svg
18+
className={className}
19+
width={size === 's' ? '12px' : '20px'}
20+
height={size === 's' ? '12px' : '20px'}
21+
viewBox="0 0 20 20"
22+
version="1.1"
23+
xmlns="http://www.w3.org/2000/svg">
24+
{title && <title>{title}</title>}
25+
<g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
26+
<g
27+
id="noun-labs-1201738-(2)"
28+
transform="translate(2, 0)"
29+
fill="currentColor"
30+
fillRule="nonzero">
31+
<path
32+
d="M10.2865804,5.55665262 L10.2865804,2.22331605 L10.8591544,2.22331605 C11.0103911,2.22244799 11.1551447,2.16342155 11.2617505,2.05914367 C11.3684534,1.95486857 11.4282767,1.81370176 11.4282767,1.66667106 L11.4282767,0.556642208 C11.4282767,0.40907262 11.3678934,0.26747526 11.2605218,0.16308627 C11.1531503,0.0587028348 11.0074938,0 10.8556998,0 L5.14338868,0 C4.9915947,0 4.84594391,0.0587028348 4.73856664,0.16308627 C4.63119507,0.267469704 4.57081178,0.40907262 4.57081178,0.556642208 L4.57081178,1.66667106 C4.57081178,1.81434899 4.63119507,1.95594912 4.73856664,2.06033811 C4.8459382,2.16472155 4.9915947,2.22331605 5.14338868,2.22331605 L5.71596273,2.22331605 L5.71596273,5.55665262 C5.71596273,8.38665538 2.97295619,9.88999017 0.651686904,15.5566623 C-0.0957823782,17.360053 -2.00560068,20 7.99951567,20 C18.004632,20 16.0948137,17.3600252 15.3507732,15.5566623 C13.0124432,9.88999017 10.2865804,8.38665538 10.2865804,5.55665262 Z M9.89570197,10.709991 C10.0921412,10.709991 10.2805515,10.7858383 10.4193876,10.9209301 C10.5583466,11.0559135 10.6363652,11.2390693 10.6363652,11.4300417 C10.6363652,11.6210141 10.5583466,11.8040698 10.4193876,11.9391533 C10.2805401,12.0741367 10.0921412,12.1499813 9.89570197,12.1499813 C9.6992627,12.1499813 9.51096673,12.074134 9.37201631,11.9391533 C9.23316875,11.8040615 9.15515307,11.6210141 9.15515307,11.4300417 C9.15515307,11.2390693 9.2331716,11.0559024 9.37201631,10.9209301 C9.57264221,10.7258996 9.61239426,10.709991 9.89570197,10.709991 Z M8.98919546,9.04212824 C9.09790709,9.14792278 9.15884755,9.29158681 9.1585213,9.44110085 C9.15829001,9.59073155 9.09678989,9.73407335 8.98763252,9.83954568 C8.87847514,9.945018 8.73069852,10.0039347 8.57678157,10.0033977 C8.42286747,10.0027392 8.27565088,9.94273467 8.16727355,9.83639845 C8.05900765,9.73006224 7.99873866,9.58628988 7.99963013,9.43664806 C8.00052304,9.28788403 8.0620221,9.14542556 8.17051087,9.04048101 C8.27911107,8.93555591 8.42599335,8.87663641 8.57913312,8.87663641 C8.73291864,8.87665585 8.88047525,8.93622535 8.98919546,9.04212824 Z M7.99965585,17.9999981 C4.91377349,17.9999981 3.29882839,17.7332867 2.51364277,17.4999976 C2.37780966,17.4476975 2.26954376,17.3439641 2.21396931,17.2125528 C2.15838628,17.0811499 2.16006066,16.9334692 2.21876871,16.8033858 C2.6144474,15.5921346 3.14916224,14.4280501 3.81316983,13.3333824 C5.980145,9.82337899 8.22941036,13.8867718 10.0980836,13.8867718 C11.9666996,13.8867718 11.4695868,12.1534924 12.1827971,13.3333824 C12.8511505,14.4269112 13.3916656,15.5896902 13.794259,16.8000524 C13.8533022,16.9322137 13.8537479,17.0822749 13.7952635,17.2147751 C13.7368889,17.3472613 13.6248314,17.4504531 13.4856467,17.5000531 C12.6833967,17.7332867 11.0855382,17.9999981 7.99965585,17.9999981 Z"
33+
id="Shape"></path>
34+
</g>
35+
</g>
36+
</svg>
37+
);
38+
});

src/components/Layout/HomeContent.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,8 @@ function ExampleLayout({
859859
</div>
860860
<div
861861
ref={contentRef}
862-
className="relative mt-0 lg:-my-20 w-full p-2.5 xs:p-5 lg:p-10 flex grow justify-center">
862+
className="relative mt-0 lg:-my-20 w-full p-2.5 xs:p-5 lg:p-10 flex grow justify-center"
863+
dir="ltr">
863864
{right}
864865
<div
865866
className={cn(
@@ -1171,7 +1172,7 @@ async function Talks({ confId }) {
11711172
</CodeBlock>
11721173
}
11731174
right={
1174-
<NavContext.Provider value={{slug, navigate}}>
1175+
<NavContext value={{slug, navigate}}>
11751176
<BrowserChrome
11761177
domain="example.com"
11771178
path={'confs/' + slug}
@@ -1191,7 +1192,7 @@ async function Talks({ confId }) {
11911192
</Suspense>
11921193
</ExamplePanel>
11931194
</BrowserChrome>
1194-
</NavContext.Provider>
1195+
</NavContext>
11951196
}
11961197
/>
11971198
);

src/components/Layout/Page.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {useRouter} from 'next/router';
88
import {SidebarNav} from './SidebarNav';
99
import {Footer} from './Footer';
1010
import {Toc} from './Toc';
11-
// import SocialBanner from '../SocialBanner';
11+
import SocialBanner from '../SocialBanner';
1212
import {DocsPageFooter} from 'components/DocsFooter';
1313
import {Seo} from 'components/Seo';
1414
import PageHeading from 'components/PageHeading';
@@ -31,7 +31,7 @@ interface PageProps {
3131
meta: {
3232
title?: string;
3333
titleForTitleTag?: string;
34-
canary?: boolean;
34+
version?: 'experimental' | 'canary';
3535
description?: string;
3636
};
3737
section: 'learn' | 'reference' | 'community' | 'blog' | 'home' | 'unknown';
@@ -53,7 +53,7 @@ export function Page({
5353
routeTree
5454
);
5555
const title = meta.title || route?.title || '';
56-
const canary = meta.canary || false;
56+
const version = meta.version;
5757
const description = meta.description || route?.description || '';
5858
const isHomePage = cleanedPath === '/';
5959
const isBlogIndex = cleanedPath === '/blog';
@@ -70,7 +70,7 @@ export function Page({
7070
)}>
7171
<PageHeading
7272
title={title}
73-
canary={canary}
73+
version={version}
7474
description={description}
7575
tags={route?.tags}
7676
breadcrumbs={breadcrumbs}
@@ -82,11 +82,9 @@ export function Page({
8282
'max-w-7xl mx-auto',
8383
section === 'blog' && 'lg:flex lg:flex-col lg:items-center'
8484
)}>
85-
<TocContext.Provider value={toc}>
86-
<LanguagesContext.Provider value={languages}>
87-
{children}
88-
</LanguagesContext.Provider>
89-
</TocContext.Provider>
85+
<TocContext value={toc}>
86+
<LanguagesContext value={languages}>{children}</LanguagesContext>
87+
</TocContext>
9088
</div>
9189
{!isBlogIndex && (
9290
<DocsPageFooter
@@ -137,7 +135,7 @@ export function Page({
137135
/>
138136
</Head>
139137
)}
140-
{/*<SocialBanner />*/}
138+
<SocialBanner />
141139
<TopNav
142140
section={section}
143141
routeTree={routeTree}

0 commit comments

Comments
 (0)