Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Sync with reactjs.org @ 07dbd86c #199

Open
wants to merge 732 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
732 commits
Select commit Hold shift + click to select a range
695efe3
here we go again
gaearon Nov 6, 2021
196edb3
Bump action version
gaearon Nov 6, 2021
c29bcd7
edit sandpack style overrides to also cover 'dirty' case (#4070)
hi-matthew Nov 7, 2021
7f99539
Fix alternative solution to add and remove a CSS class (#4027) (#4072)
beetcb Nov 7, 2021
8ed148b
fix(sandpack): upgrade dependencies (#4075)
danilowoz Nov 8, 2021
85e1c32
Update to latest conferences (#4076)
patcito Nov 8, 2021
967bf1f
Update doc (#4077)
Nov 9, 2021
b761b81
Fix typo
gaearon Nov 9, 2021
23c09e0
polish dark mode illustrations
lebo Nov 9, 2021
29fbe65
fix safari bug
lebo Nov 9, 2021
8333b6d
Fixes wrong breadcrumb for 404 page (#4074)
Nov 10, 2021
0b7fd7b
Add git hook to generate headings ids (#4043)
lex111 Nov 10, 2021
e206d8c
Set page layout dynamically (#4084)
lex111 Nov 11, 2021
f31c9fd
Remove unwanted dependency (#4083)
Nov 11, 2021
5c1f513
Add support for Unicode chars when detect headings IDs (#4086)
lex111 Nov 11, 2021
719aa3c
Allow page zooming/scaling (#4082)
lex111 Nov 11, 2021
eb84de7
Enable dark mode in browser UI (#4089)
lex111 Nov 11, 2021
64e236c
Typo fixes (#4091)
Nov 12, 2021
d9901c4
Update algolia.css (#4092)
Nov 12, 2021
7254849
Stop zooming for search input (#4094)
Nov 12, 2021
4022f97
Use custom ID format that works better with MDX 2 (#4105)
wooorm Nov 15, 2021
ea086bd
Fixing Eslint configuration (#4087)
Nov 15, 2021
49a552c
Fix prettier CI and add it to pre commit (#4100)
Nov 15, 2021
34325ff
Update React 18 post for beta (#4109)
acdlite Nov 16, 2021
17ad2cb
Fixes unwanted scrolls in mobile (#4114)
Nov 18, 2021
bd727cf
Update README.md
gaearon Nov 23, 2021
40c8cd2
Add check-all script for beta site (#4120)
Nov 24, 2021
c6353b9
chore: fix typo (#4104)
Nov 25, 2021
d8800be
chore: fix typos (#4121)
stuymedova Nov 25, 2021
0057efa
Fix description to match code in referencing-values-with-refs.md (#4097)
MarekBodinger Nov 25, 2021
ea6e34f
Move React India 2021 to past conferences (#4129)
apherio Nov 29, 2021
3f3e109
Fix markdown comment breakage in community page (#4127)
Nov 29, 2021
01afd01
[Beta]Move all possible style to tailwind classes (#4054)
Nov 29, 2021
4cd92f8
chore: remove unused dep to fix lint warning (#4115)
import-brain Dec 1, 2021
a655e41
Fix a typo (#4138)
smikitky Dec 1, 2021
f625b86
Comment the script (#4139)
Dec 1, 2021
86eb509
[fix]: add-listner is deprecated, switched those to add-event-listner…
CatsAndDogs123 Dec 3, 2021
aa70dce
fix: correct the link to navigate to the team page (#4146)
yyyanghj Dec 4, 2021
29627ae
Generated missing ids (#4150)
Dec 7, 2021
7d9c9e8
fix slice() link (#4156)
bigfang Dec 8, 2021
c8a3ccd
Add Framer Motion to animation FAQ (#4149)
mattgperry Dec 11, 2021
014f489
docs: fix a typo (#4166)
stuymedova Dec 12, 2021
ee304b6
Fix typo in Removing from an array part (#4171)
ahmetfarukyilmaz Dec 14, 2021
e8cca8b
React Conf 2021 Recap Blog Post (#4172)
jtannady Dec 15, 2021
c005fa4
Revert "React Conf 2021 Recap Blog Post (#4172)" (#4173)
jtannady Dec 15, 2021
12582bc
React Conf Recap Blog Post (#4174)
jtannady Dec 17, 2021
5393601
Add Dave to talk reviewers
rickhanlonii Dec 17, 2021
fcb13af
Fix typos in React Conf 2021 Recap post
lex111 Dec 17, 2021
51bd2bc
Add missing talk
gaearon Dec 17, 2021
098b0ae
Delete multi-platform-vision.png (#4181)
Dec 18, 2021
0cddca1
Update conferences.md (#4187)
joshunger Dec 18, 2021
e3ba7fe
Update copyright on website (#4193)
zpao Dec 21, 2021
d216582
Fix workflow file name (#4192)
smikitky Dec 21, 2021
b41b1dc
Docs - phrasing sentence in conditional rendering article (#4196)
lukbar48 Dec 23, 2021
7a6a628
Add Link to React Conf 2021 Playlist (#4207)
sbaljeet13 Jan 6, 2022
569949e
Fix jsx example for string attributes (#4204)
Jan 7, 2022
b9c33a0
Add React Miami to conferences.md (#4191)
joshunger Jan 10, 2022
d321ff4
React Live 2022 Amsterdam (#4222)
lxmarinkovic Jan 18, 2022
af768b4
FIXED: broken 'translated' link (#4223)
mr-vaibh Jan 18, 2022
5a3576a
Update outdated link to avoid redirect (#4218)
miltosdoul Jan 18, 2022
0b21acb
Added hook to validate if headings are present or not (#4143)
Jan 18, 2022
e0aed3f
Update react-router examples to use v6 version (#4199)
jonatasoc Jan 18, 2022
cd1b0df
Changed the version generation script to update vercel.json instead o…
Jan 18, 2022
45aba8b
Delete _redirects (#3951)
gaearon Jan 18, 2022
9ed29b0
fix: "…" spread syntax is not an "operator" but document saying that …
Juyeong-Byeon Jan 18, 2022
3143db5
Updates deployment in readme from netlify to vercel (#4225)
Jan 21, 2022
b1f91c9
Analytics for Beta (#4224)
rachelnabors Jan 21, 2022
d84b740
Bump next (#4228)
Jan 22, 2022
5110597
Removed google analytics for dev (#4233)
Jan 23, 2022
69bd27a
Add Reactathon 2022 to conferences.md (#4234)
dunphyben Jan 23, 2022
d80ef56
Sandpack: upgrade dependencies and adds ReactDevtools (#4161)
danilowoz Jan 24, 2022
f062ee2
[docs]: Updated CodePen links (#4232)
Aniruddha-Shriwant Jan 27, 2022
ec65cc0
Add "click to copy" to TerminalBlock (#4025)
markflorkowski Jan 27, 2022
53d279e
fix: challenges navigation (#4123)
ScytheDraven47 Jan 27, 2022
4451e5b
Make line highlight full width (#4246)
gaearon Jan 28, 2022
2b2ac5c
Fix download label
gaearon Jan 28, 2022
b22c3d6
[Beta] Rewrite Quick Start (#4245)
gaearon Jan 28, 2022
1c355ab
[Beta] Change "You will learn" for chapters (#4239)
gaearon Jan 28, 2022
3564e69
Introduce lint staged (#4240)
Jan 28, 2022
43dae71
Adds linting for main branch too (#4252)
Jan 28, 2022
e347b73
Removed circle CI (#4236)
Jan 28, 2022
e1dcbff
bump next to latest (#4251)
Jan 28, 2022
4e20db7
Revert "Removed circle CI (#4236)" (#4253)
gaearon Jan 28, 2022
9ff30d6
Revert "Revert "Removed circle CI (#4236)" (#4253)" (#4254)
gaearon Jan 28, 2022
5f0549c
chore: fix typo (#4255)
brennon Jan 30, 2022
3805790
[Beta] Reorder useState page (#4265)
gaearon Jan 31, 2022
17e91d8
[Beta] Address Quick Start review nits (#4264)
gaearon Feb 1, 2022
58d6f3f
Prevent nav context re-renders (#4266)
gaearon Feb 1, 2022
abca1f4
Use MDXContext directly (#4267)
gaearon Feb 1, 2022
7d1e054
Remove unused patch
gaearon Feb 1, 2022
c8ad67d
Fix deps
gaearon Feb 1, 2022
626f957
fix(sandpack): improve memory usage (#4126)
danilowoz Feb 2, 2022
42576e0
Bump workflow versions (#4270)
gaearon Feb 2, 2022
75db8f2
[Beta] Rename TaskBoard -> TaskApp in examples (#4271)
gaearon Feb 2, 2022
84742f0
Fix typo
gaearon Feb 2, 2022
e6b843b
[Beta] Change useState structure, add examples (#4276)
gaearon Feb 3, 2022
5479670
fix: typo (#4279)
jersonzc Feb 3, 2022
eb0ae24
Update courses.md (#4282)
johnlinatoc Feb 3, 2022
001b1f0
[Beta] useState API: Best of the both words? Haha just kidding... Unl…
gaearon Feb 4, 2022
52393da
fix(useMediaQuery): adds fallback to matchMedia (#4289)
danilowoz Feb 4, 2022
4d005ad
fix(sandpack): disable init-mode (#4278)
danilowoz Feb 4, 2022
fd58500
React-Global-2022 (#4291)
lxmarinkovic Feb 4, 2022
caffe3d
React-Meetup-Stockholm (#4292)
lxmarinkovic Feb 4, 2022
73d7d13
[Beta] Move /reference -> /apis (#4294)
gaearon Feb 4, 2022
1e79ed6
Removes readme and contributing.md from generate heading lint (#4295)
Feb 4, 2022
881e0a0
[Beta] Document derived state (#4297)
gaearon Feb 4, 2022
b174aec
Tweak
gaearon Feb 4, 2022
12ca0d4
Mention loops
gaearon Feb 4, 2022
b06f632
Clarify
gaearon Feb 4, 2022
77af71e
tweak
gaearon Feb 4, 2022
6ebae12
Rm unused
gaearon Feb 4, 2022
5d2a4e3
[beta] Push people away more from setting state in render (#4299)
sophiebits Feb 4, 2022
b86f35d
docs: fix typo in useState Adjusting derived state section (#4300)
HumbertoL Feb 5, 2022
a4796b7
[beta] Don't call it "derived state" (#4301)
sophiebits Feb 5, 2022
ea824c6
More tweaks
gaearon Feb 5, 2022
55b4754
Updated code-splitting.md (#4303)
abrahym-sharfeldden Feb 6, 2022
20f0fe2
Update React India 2022 Conference Dates 🌴 (#4305)
apherio Feb 6, 2022
cd1717b
Sandpack error icon overlapping issue fix (#4302)
Feb 7, 2022
e2b2ebf
Improve font display (#4308)
shamwela Feb 7, 2022
71b743a
Generate Ids when there are none in local development (#4304)
Feb 7, 2022
7d615ad
[Beta] useState Troubleshooting (#4309)
gaearon Feb 7, 2022
c089fbc
docs: phrasing a sentence (#4185)
stuymedova Feb 7, 2022
cb6e1d0
docs: phrasing a sentence (#4182)
stuymedova Feb 7, 2022
466809e
docs: fix a grammatical error (#4183)
stuymedova Feb 7, 2022
4be33b8
Change "return statement" to "return keyword" (#4137)
smikitky Feb 7, 2022
cfa3670
small fixes to stopwatch codesandbox (#4110)
aayush-k Feb 7, 2022
edac143
[beta] Tweak usestate.md (#4310)
sophiebits Feb 8, 2022
d7dfc5d
Fix typo (#4311)
Feb 8, 2022
03f2323
[Beta] Use "Parameters" as titles? (#4314)
Huxpro Feb 9, 2022
c7d5aac
Fix broken MDN E4X links (#4316)
kidonng Feb 9, 2022
b8b26e5
Simplify wording
gaearon Feb 10, 2022
f20da4c
removed old "early time for hooks" note (#4321)
uulaal Feb 11, 2022
fc644cd
Revert "Sandpack error icon overlapping issue fix (#4302)" (#4325)
gaearon Feb 12, 2022
3ccb538
[Beta] Fix layout shift from previews (#4322)
gaearon Feb 12, 2022
4f764b2
[Beta] Change render() API page format (#4319)
gaearon Feb 12, 2022
2695799
[Beta] Mention batching in useState (#4318)
gaearon Feb 12, 2022
85e3fcf
More separators
gaearon Feb 12, 2022
0a76bf4
Fix typo (#4326)
Feb 12, 2022
a06d860
Fix broken link in render-and-commit.md (#4327)
mayank99 Feb 12, 2022
71cc6be
[beta] Reword "action = what happened" advice for useReducer (#4331)
sophiebits Feb 13, 2022
fa15160
Fix - Sandpack error icon overlapping issue (#4332)
imanpalsingh Feb 14, 2022
b677012
Add App.js Conf 2022 to the conferences page (#4336)
tsapeta Feb 15, 2022
b10ae60
sandpack: bring back init mode (#4337)
danilowoz Feb 15, 2022
b4de700
[Beta] Add ARIA labels (#4335)
shamwela Feb 15, 2022
0209e1b
[Beta] Reorder API sections (#4328)
gaearon Feb 16, 2022
2979d0c
Splitting sandpack from main bundle (#4256)
Feb 16, 2022
a2138f2
Nitpicks for code splitting (#4346)
gaearon Feb 16, 2022
4ed4fb7
[Beta] Change highlight styles (#4348)
gaearon Feb 17, 2022
93fdfb2
[Beta] useRef API (#4345)
gaearon Feb 17, 2022
3d6eba7
[beta] fix typo in useref.md (#4352)
mayank99 Feb 17, 2022
aa4bb41
Cache a font file (#4350)
shamwela Feb 17, 2022
3d6081f
[Beta] Add aria-label and title to permalinks (#4344)
shamwela Feb 18, 2022
a48ba9c
Link to how to set up syntax in Sublime
gaearon Feb 18, 2022
c8ec9d8
[Beta] Replace Hotjar with GA buttons (#4275)
gaearon Feb 18, 2022
45ac43a
Never use local font
gaearon Feb 18, 2022
81f772e
Switch from GA4 to UA to track feedback
gaearon Feb 18, 2022
8ca0215
Fix pageview collection for UA
gaearon Feb 18, 2022
9ac33ff
Fix TS
gaearon Feb 18, 2022
0883863
[Beta] Use a light GA client (#4355)
gaearon Feb 18, 2022
8def749
Try caching the font
gaearon Feb 18, 2022
753c4fc
Delete dead code
gaearon Feb 18, 2022
855c26a
Ignore TSC build file
gaearon Feb 18, 2022
f3f580a
Don't use unload on modern browsers
gaearon Feb 18, 2022
ab648df
Consolidate and preload fonts
gaearon Feb 18, 2022
6c855f7
Remember whether downloads are supported
gaearon Feb 18, 2022
3ae0eb6
Fix white flash when loading
gaearon Feb 18, 2022
7d55f61
Initial Commit (#4357)
Feb 18, 2022
5b8a720
Initial Commit (#4358)
Feb 18, 2022
2310e15
Add ARIA labels on the navigation buttons (#4363)
shamwela Feb 19, 2022
aeb1788
add the current LTS Node version (#4367)
nathansom Feb 21, 2022
9bcbe7b
[beta] bump tailwind to v3 and update config (#4366)
dammy001 Feb 21, 2022
275d03f
Upgrade sandpack to fix code cutting issue in view only editor (#4371)
Feb 22, 2022
508b427
Improve ESLint (#4372)
shamwela Feb 22, 2022
1b05b11
Remove `transform` (#4375)
shamwela Feb 23, 2022
b6a181c
Fix editable code blocks
gaearon Feb 23, 2022
8314493
Fix focus rings
gaearon Feb 23, 2022
ac9a984
Add diagrams to Quick Start (#4377)
rickhanlonii Feb 24, 2022
299dad8
[Beta] useContext API (#4378)
gaearon Feb 24, 2022
31304b8
Oops
gaearon Feb 25, 2022
6bd09fe
Bump url-parse from 1.5.3 to 1.5.10 (#4391)
dependabot[bot] Feb 27, 2022
6c95de9
[Beta] Delete unused variables (#4379)
shamwela Mar 1, 2022
d90fd21
docs: Adding Social Banner in Support of Ukraine (#4397)
dmitryvinn-fb Mar 2, 2022
a08e1fd
Fixes for banner on beta (#4435)
rickhanlonii Mar 6, 2022
8b5ce4d
Fix mobile layout on beta
gaearon Mar 7, 2022
c64b202
Add linebreak
gaearon Mar 7, 2022
05177ff
React 18 RC - Upgrade Guide (#4384)
rickhanlonii Mar 8, 2022
4b7843a
Bump urijs from 1.19.7 to 1.19.10 (#4446)
dependabot[bot] Mar 11, 2022
d3b66f5
Fixes linting issues (#4452)
Mar 11, 2022
3c3d8ac
Add Xuan to team page (#4454)
Huxpro Mar 12, 2022
7994045
Fixes survey (#4451)
Mar 12, 2022
dbbb097
Update invalid-aria-prop.md (#4457)
DeltaZN Mar 14, 2022
9525c06
Updated Render-Atlanta 2022 (#4343)
ThugDebugger Mar 14, 2022
90ae846
Add diagrams for "Putting markup into JavaScript" (#4390)
rickhanlonii Mar 14, 2022
b13640a
fix: use `globalThis` over `global` (#4448)
SimenB Mar 14, 2022
0ff869f
Add diagrams for passing props with context (#4394)
rickhanlonii Mar 14, 2022
2f05f3f
Add diagram to Reacting to Input with State (#4434)
rickhanlonii Mar 14, 2022
f7f92b8
[Beta] useReducer API (#4441)
gaearon Mar 16, 2022
c0b6e0b
Add more exports
gaearon Mar 16, 2022
7cf3cc1
Update tutorial.md (#4461)
jmcscript Mar 16, 2022
972f177
Update conferences.md (#4459)
Mar 16, 2022
69f90d2
[Beta] createContext API (#4467)
gaearon Mar 16, 2022
a55219d
Add React Native EU to upcoming conferences (#4465)
jaworek Mar 17, 2022
67f0bba
Moved older conference to past conference and standardised dates (#4463)
Mar 17, 2022
105fb79
update code sandboxes (#4466)
salazarm Mar 17, 2022
1e3b023
Add diagrams for Preserving and Resetting State (#4439)
rickhanlonii Mar 19, 2022
61a6cd7
Bump prismjs from 1.25.0 to 1.27.0 (#4386)
dependabot[bot] Mar 22, 2022
335417a
fix typo on page (#4490)
DavidKessel Mar 24, 2022
9b5505e
updated egghead url (#4494)
immanu10 Mar 25, 2022
7200653
Update conditional-rendering.md to fix formatting (#4493)
jherdman Mar 26, 2022
5e9d673
Add React Alicante (#4496)
VictoriaQ Mar 26, 2022
b099d55
Update conferences.md. Add a link on a live stream of a conference `<…
ntishkevich Mar 28, 2022
ac68ced
example should import useReducer (#4504)
Mar 28, 2022
74246c1
React 18 (#4499)
rickhanlonii Mar 29, 2022
34b0084
Next -> Next.js (#4508)
sebmarkbage Mar 29, 2022
8ee0706
Fix broken link (#4509)
mottox2 Mar 29, 2022
4725bbc
Clarify note for React Native users (#4512)
cortinico Mar 29, 2022
22b8bf2
Next -> Next.js (#4515)
styfle Mar 29, 2022
1138f7a
Fix link on upgrade to version 18 page (#4516)
igor-co Mar 29, 2022
c336758
Add missing word (#4514)
nickmorri Mar 29, 2022
41c3ca5
Document the new consistent Suspense behavior (#4517)
gaearon Mar 29, 2022
69ca55b
Fix usage of useDeferredValue (#4520)
SukkaW Mar 30, 2022
c623de4
fix useTransition link (#4519)
lilac-ss Mar 30, 2022
b5fd1df
Add a note about Strict Mode to release blog post (#4521)
gaearon Mar 30, 2022
f5c84d4
Update CDN links for React 18 (#4523)
Chalarangelo Mar 30, 2022
56a0dca
Update CDN links for React 18 (#4528)
Chalarangelo Mar 30, 2022
1c5a6c1
Update single-file example
gaearon Mar 30, 2022
0982707
Update StrictMode docs about double logging (#4531)
gaearon Mar 30, 2022
c77e2f2
Fix typo in Automatic Batching example (#4532)
hyupee Mar 31, 2022
e34da98
reword challenge 2 (#4536)
armenic Apr 2, 2022
e826e66
Change redirect from WG post to the blog (#4537)
gaearon Apr 2, 2022
2666c95
Added React Day Bangalore 2022 (#4539)
akiran Apr 3, 2022
ec2dcbc
Update Prerequisites nodejs version (#4538)
Apr 3, 2022
707f22d
Add call to action to 18 blog post (#4542)
gaearon Apr 3, 2022
e27ad32
Fix grammar (#4502)
jeongwoopark0514 Apr 4, 2022
cb11ae4
docs: Add React Finland 2022 (#4544)
bebraw Apr 4, 2022
cb4c9d3
Update conferences.md (#4546)
Apr 4, 2022
6542602
fix babel url version (#4549)
DavidKessel Apr 4, 2022
3fa71f0
Fix params order for hydrateRoot reference (#4552)
tonyghiani Apr 6, 2022
ebf94d3
Override sharp version (#4554)
gaearon Apr 6, 2022
65b0429
Document useId is not for keys (#4557)
gaearon Apr 6, 2022
a78cc99
Edits for ReactDOMServer API (#4558)
gaearon Apr 6, 2022
1015a73
Clarify renderToString etc usage
gaearon Apr 7, 2022
d14cbdc
Add more details on batching (#4559)
gaearon Apr 7, 2022
42100a3
renderToReadableStream: Ensure same var name is used in `onError` (#4…
eps1lon Apr 7, 2022
b2d16e5
Mention TypeScript in the upgrade post (#4567)
gaearon Apr 8, 2022
84ad330
fix typo "sever" on reference-react-dom-server.md (#4570)
antonybudianto Apr 10, 2022
4a71440
fix the code block for AppWithCallbackAfterRender (#4571)
imsingh Apr 11, 2022
6323480
fix the code block for createRoot typescript error (#4576)
folt Apr 13, 2022
07dbd86
add crypto.randomUUID as source of keys (#4165)
o-t-w Apr 14, 2022
ba34275
merging all conflicts
react-translations-bot Apr 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 0 additions & 20 deletions .circleci/config.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
node_modules/*

# Skip beta
beta/*

# Ignore markdown files and examples
content/*

Expand Down
1 change: 1 addition & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[ignore]

<PROJECT_ROOT>/beta/.*
<PROJECT_ROOT>/content/.*
<PROJECT_ROOT>/node_modules/.*
<PROJECT_ROOT>/public/.*
Expand Down
4 changes: 1 addition & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@


<!--
Thank you for the PR! Contributors like you keep React awesome!
Please see the Contribution Guide for guidelines:
https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md
https://github.com/reactjs/reactjs.org/blob/main/CONTRIBUTING.md
If your PR references an existing issue, please add the issue number below
Expand Down
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
beta:
- beta/**/*
96 changes: 96 additions & 0 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Analyze Bundle

on:
pull_request:
push:
branches:
- main # change this if your default branch is named differently
workflow_dispatch:

jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up node
uses: actions/setup-node@v1
with:
node-version: "14.x"

- name: Install dependencies
uses: bahmutov/npm-install@v1.7.10
with:
working-directory: 'beta'

- name: Restore next build
uses: actions/cache@v2
id: restore-build-cache
env:
cache-name: cache-next-build
with:
path: beta/.next/cache
# change this if you prefer a more strict cache
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Build next.js app
# change this if your site requires a custom build command
run: ./node_modules/.bin/next build
working-directory: beta

# Here's the first place where next-bundle-analysis' own script is used
# This step pulls the raw bundle stats for the current bundle
- name: Analyze bundle
run: npx -p nextjs-bundle-analysis report
working-directory: beta

- name: Upload bundle
uses: actions/upload-artifact@v2
with:
path: beta/.next/analyze/__bundle_analysis.json
name: bundle_analysis.json

- name: Download base branch bundle stats
uses: dawidd6/action-download-artifact@v2
if: success() && github.event.number
with:
workflow: analyze.yml
branch: ${{ github.event.pull_request.base.ref }}
name: bundle_analysis.json
path: beta/.next/analyze/base/bundle

# And here's the second place - this runs after we have both the current and
# base branch bundle stats, and will compare them to determine what changed.
# There are two configurable arguments that come from package.json:
#
# - budget: optional, set a budget (bytes) against which size changes are measured
# it's set to 350kb here by default, as informed by the following piece:
# https://infrequently.org/2021/03/the-performance-inequality-gap/
#
# - red-status-percentage: sets the percent size increase where you get a red
# status indicator, defaults to 20%
#
# Either of these arguments can be changed or removed by editing the `nextBundleAnalysis`
# entry in your package.json file.
- name: Compare with base branch bundle
if: success() && github.event.number
run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
working-directory: beta

- name: Upload analysis comment
uses: actions/upload-artifact@v2
with:
name: analysis_comment.txt
path: beta/.next/analyze/__bundle_analysis_comment.txt

- name: Save PR number
run: echo ${{ github.event.number }} > ./pr_number

- name: Upload PR number
uses: actions/upload-artifact@v2
with:
name: pr_number
path: ./pr_number

# The actual commenting happens in the other action, matching the guidance in
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
72 changes: 72 additions & 0 deletions .github/workflows/analyze_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Analyze Bundle (Comment)

on:
workflow_run:
workflows: ["Analyze Bundle"]
types:
- completed

jobs:
comment:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download base branch bundle stats
uses: dawidd6/action-download-artifact@v2
with:
workflow: analyze.yml
run_id: ${{ github.event.workflow_run.id }}
name: analysis_comment.txt
path: analysis_comment.txt

- name: Download PR number
uses: dawidd6/action-download-artifact@v2
with:
workflow: analyze.yml
run_id: ${{ github.event.workflow_run.id }}
name: pr_number
path: pr_number

- name: Get comment body
id: get-comment-body
if: success()
run: |
pr_number=$(cat pr_number/pr_number)
body=$(cat analysis_comment.txt/__bundle_analysis_comment.txt)
body="## Size Changes
<details>

${body}

</details>"
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body
echo ::set-output name=pr-number::$pr_number

- name: Find Comment
uses: peter-evans/find-comment@v1
if: success()
id: fc
with:
issue-number: ${{ steps.get-comment-body.outputs.pr-number }}
body-includes: "<!-- __NEXTJS_BUNDLE -->"

- name: Create Comment
uses: peter-evans/create-or-update-comment@v1.4.4
if: success() && steps.fc.outputs.comment-id == 0
with:
issue-number: ${{ steps.get-comment-body.outputs.pr-number }}
body: ${{ steps.get-comment-body.outputs.body }}

- name: Update Comment
uses: peter-evans/create-or-update-comment@v1.4.4
if: success() && steps.fc.outputs.comment-id != 0
with:
issue-number: ${{ steps.get-comment-body.outputs.pr-number }}
body: ${{ steps.get-comment-body.outputs.body }}
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
30 changes: 30 additions & 0 deletions .github/workflows/beta_site_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Beta Site Lint / Heading ID check

on:
push:
branches:
- main # change this if your default branch is named differently
pull_request:
types: [opened, synchronize, reopened]

jobs:
lint:
runs-on: ubuntu-latest

name: Lint on node 12.x and ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1.7.10
with:
working-directory: 'beta'


- name: Lint codebase
run: cd beta && yarn ci-check
22 changes: 22 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler

name: Labeler
on: [pull_request_target]

jobs:
label:

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
27 changes: 27 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint / Flow check

on:
push:
branches:
- main # change this if your default branch is named differently
pull_request:
types: [opened, synchronize, reopened]

jobs:
lint:
runs-on: ubuntu-latest

name: Lint on node 12.x and ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1.7.10

- name: Lint codebase
run: yarn ci-check
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
.DS_STORE
.idea
node_modules
public
/public
yarn-error.log
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/carbon
12.16.1
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This repo contains the source code and documentation powering [hy.reactjs.org](h
### Prerequisites

1. Git
1. Node: any 8.x version starting with 8.4.0 or greater
1. Node: any 12.x version starting with v12.0.0 or greater
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
1. A fork of the repo (for any contributions)
1. A clone of the [hy.reactjs.org repo](https://github.com/reactjs/hy.reactjs.org) on your local machine
Expand All @@ -26,17 +26,26 @@ This repo contains the source code and documentation powering [hy.reactjs.org](h

### Guidelines

<<<<<<< HEAD
The documentation is divided into several sections with a different tone and purpose. If you plan to write more than a few sentences, you might find it helpful to get familiar with the [contributing guidelines](https://github.com/reactjs/hy.reactjs.org/blob/master/CONTRIBUTING.md#guidelines-for-text) for the appropriate sections.

### Create a branch

1. `git checkout master` from any folder in your local `hy.reactjs.org` repository
1. `git pull origin master` to ensure you have the latest main code
=======
The documentation is divided into several sections with a different tone and purpose. If you plan to write more than a few sentences, you might find it helpful to get familiar with the [contributing guidelines](https://github.com/reactjs/reactjs.org/blob/main/CONTRIBUTING.md#guidelines-for-text) for the appropriate sections.

### Create a branch

1. `git checkout main` from any folder in your local `reactjs.org` repository
1. `git pull origin main` to ensure you have the latest main code
>>>>>>> 07dbd86ca421c262157af673a2584a40fd3b2450
1. `git checkout -b the-name-of-my-branch` (replacing `the-name-of-my-branch` with a suitable name) to create a branch

### Make the change

1. Follow the "Running locally" instructions
1. Follow the ["Running locally"](#running-locally) instructions
1. Save the files and check in the browser
1. Changes to React components in `src` will hot-reload
1. Changes to markdown files in `content` will hot-reload
Expand All @@ -53,11 +62,11 @@ The documentation is divided into several sections with a different tone and pur
1. `git push my-fork-name the-name-of-my-branch`
1. Go to the [hy.reactjs.org repo](https://github.com/reactjs/hy.reactjs.org) and you should see recently pushed branches.
1. Follow GitHub's instructions.
1. If possible, include screenshots of visual changes. A Netlify build will also be automatically created once you make your PR so other people can see your change.
1. If possible, include screenshots of visual changes. A preview build is triggered after your changes are pushed to GitHub.

## Translation

If you are interested in translating `reactjs.org`, please see the current translation efforts at [isreacttranslatedyet.com](https://www.isreacttranslatedyet.com/).
If you are interested in translating `reactjs.org`, please see the current translation efforts at [translations.reactjs.org](https://translations.reactjs.org/).


If your language does not have a translation and you would like to create one, please follow the instructions at [reactjs.org Translations](https://github.com/reactjs/reactjs.org-translation#translating-reactjsorg).
Expand Down
Empty file added beta/.env.development
Empty file.
1 change: 1 addition & 0 deletions beta/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_GA_TRACKING_ID = 'UA-41298772-4'
3 changes: 3 additions & 0 deletions beta/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scripts
plugins
next.config.js
13 changes: 13 additions & 0 deletions beta/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"root": true,
"extends": "next/core-web-vitals",
"rules": {
"no-unused-vars": "warn"
},
"env": {
"node": true,
"commonjs": true,
"browser": true,
"es6": true
}
}
Loading