Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with react.dev @ 31895292 #460

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ad4f5c7
Update NextJs link (#6053)
palamarchukser May 30, 2023
4184c0f
Fix a missing word in useLayoutEffect (#6078)
escwxyz May 31, 2023
ca93140
Fix option's mdn link (#6080)
AhmedBaset Jun 2, 2023
8313857
Fix(github-actions): Update gh-actions dependencies to versions that …
AhmedBaset Jun 5, 2023
940e963
Move recent conferences from 'Upcoming' to 'Past' section (#6089)
colemilne54 Jun 8, 2023
9a1e1c6
Fix incorrect inner component reference (#6044)
tdd Jun 9, 2023
f5ffb3f
fix: broken link (#6115)
yuta-ike Jun 26, 2023
292534e
Add basic reference pages for use client and server (#5976)
sophiebits Jun 30, 2023
a30e1f9
update link to fault tolerance blog post (#6142)
aweary Jul 10, 2023
b9eea4d
Fix lint warnings (#6174)
rickhanlonii Jul 21, 2023
d86cfc4
Update useInsertionEffect docs (#6172)
rickhanlonii Jul 24, 2023
cf4ad19
Fix typo: "server-only" to "client-only" (#6164)
smikitky Jul 25, 2023
a132d8f
Remove junk lines in common.md (#6167)
smikitky Jul 25, 2023
6ebe2dd
Fix "onFocus" description (#6168)
smikitky Jul 25, 2023
39b9692
Update conferences timeline (#6159)
afonsojramos Jul 25, 2023
b452e7b
docs: separate dot from hyperlink (#6140)
jjm2317 Jul 25, 2023
505f651
Fix root-unmount returns (#6137)
solar3070 Jul 25, 2023
19c0fe2
fix `componentdidcatch` (#6107)
AhmedBaset Jul 25, 2023
a472775
docs: fix a broken link in react-labs-june-2022 (#6149)
MatanBobi Jul 25, 2023
cd13b52
Fix homepage title (#5838)
daochouwangu Aug 7, 2023
f82f392
Adds a TypeScript overview page (#6120)
orta Aug 9, 2023
c60bcac
Fix TerminalBlock overflow (#6208)
rickhanlonii Aug 10, 2023
03c2e96
Fix recipe titles (#6209)
rickhanlonii Aug 10, 2023
fcc639b
Fix IDs specified in the MDN page URLs (#6176)
natsuokawai Aug 10, 2023
ae06008
Add UI for canary releases (#6173)
rickhanlonii Aug 10, 2023
22d9878
Update correct link common.md (#6125)
NGHdeveloper Aug 10, 2023
02c0067
remove Bad grammar in react.dev tictactoe documentation (#6126)
DIWAKARKASHYAP Aug 11, 2023
a86663d
Fix IntersectionObserver examples (#6212)
rickhanlonii Aug 11, 2023
b1a5b7b
fix(docs): Component reference render parameters (#6098)
brunoeduardodev Aug 11, 2023
2bfa544
removing reference to create-react-app (#6012)
hannanel100 Aug 11, 2023
79560d6
fix: remove Hong Kong from choosing-the-state-structure (#5957)
umairraza96 Aug 11, 2023
819518c
RTL Languages Support (#6138)
AhmedBaset Aug 11, 2023
6b61cd4
Annex to #6138 (#6226)
AhmedBaset Aug 15, 2023
842c24c
Fix broken link for Typescript Discord invite (#6224)
ThomasCharuel Aug 17, 2023
f67811b
Clarify these features are not related to Next (#6229)
lunaleaps Aug 21, 2023
3189529
Add React Native EU 2023 to the conferences page (#6254)
elicwhite Aug 23, 2023
bf58ada
merging all conflicts
react-translations-bot Aug 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"plugins": ["@typescript-eslint"],
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn"
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_" }],
"react-hooks/exhaustive-deps": "error"
},
"env": {
"node": true,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/site_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Use Node.js 20.x
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 20.x

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

- name: Lint codebase
run: yarn ci-check
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"retext": "^7.0.1",
"retext-smartypants": "^4.0.0",
"rss": "^1.2.2",
"tailwindcss": "^3.0.22",
"tailwindcss": "^3.3.2",
"typescript": "^4.0.2",
"unist-util-visit": "^2.0.3",
"webpack-bundle-analyzer": "^4.5.0"
Expand Down
4 changes: 2 additions & 2 deletions src/components/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ function Breadcrumbs({breadcrumbs}: {breadcrumbs: RouteItem[]}) {
<Fragment key={crumb.path}>
<Link
href={crumb.path}
className="text-link dark:text-link-dark text-sm tracking-wide font-bold uppercase mr-1 hover:underline">
className="text-link dark:text-link-dark text-sm tracking-wide font-bold uppercase me-1 hover:underline">
{crumb.title}
</Link>
<span className="inline-block mr-1 text-link dark:text-link-dark text-lg">
<span className="inline-block me-1 text-link dark:text-link-dark text-lg rtl:rotate-180">
<svg
width="20"
height="20"
Expand Down
4 changes: 2 additions & 2 deletions src/components/DocsFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ function FooterLink({
className={cn(
'flex gap-x-4 md:gap-x-6 items-center w-full md:w-80 px-4 md:px-5 py-6 border-2 border-transparent text-base leading-base text-link dark:text-link-dark rounded-lg group focus:text-link dark:focus:text-link-dark focus:bg-highlight focus:border-link dark:focus:bg-highlight-dark dark:focus:border-link-dark focus:border-opacity-100 focus:border-2 focus:ring-1 focus:ring-offset-4 focus:ring-blue-40 active:ring-0 active:ring-offset-0 hover:bg-gray-5 dark:hover:bg-gray-80',
{
'flex-row-reverse justify-self-end text-right': type === 'Next',
'flex-row-reverse justify-self-end text-end': type === 'Next',
}
)}>
<IconNavArrow
className="text-tertiary dark:text-tertiary-dark inline group-focus:text-link dark:group-focus:text-link-dark"
displayDirection={type === 'Previous' ? 'left' : 'right'}
displayDirection={type === 'Previous' ? 'start' : 'end'}
/>
<span>
<span className="block no-underline text-sm tracking-wide text-secondary dark:text-secondary-dark uppercase font-bold group-focus:text-link dark:group-focus:text-link-dark group-focus:text-opacity-100">
Expand Down
8 changes: 7 additions & 1 deletion src/components/Icon/IconArrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import cn from 'classnames';

export const IconArrow = memo<
JSX.IntrinsicElements['svg'] & {
displayDirection: 'left' | 'right' | 'up' | 'down';
/**
* The direction the arrow should point.
* `start` and `end` are relative to the current locale.
* for example, in LTR, `start` is left and `end` is right.
*/
displayDirection: 'start' | 'end' | 'right' | 'left' | 'up' | 'down';
}
>(function IconArrow({displayDirection, className, ...rest}) {
return (
Expand All @@ -20,6 +25,7 @@ export const IconArrow = memo<
{...rest}
className={cn(className, {
'rotate-180': displayDirection === 'right',
'rotate-180 rtl:rotate-0': displayDirection === 'end',
})}>
<path fill="none" d="M0 0h24v24H0z" />
<path d="M7.828 11H20v2H7.828l5.364 5.364-1.414 1.414L4 12l7.778-7.778 1.414 1.414z" />
Expand Down
8 changes: 7 additions & 1 deletion src/components/Icon/IconArrowSmall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ import cn from 'classnames';

export const IconArrowSmall = memo<
JSX.IntrinsicElements['svg'] & {
displayDirection: 'left' | 'right' | 'up' | 'down';
/**
* The direction the arrow should point.
* `start` and `end` are relative to the current locale.
* for example, in LTR, `start` is left and `end` is right.
*/
displayDirection: 'start' | 'end' | 'right' | 'left' | 'up' | 'down';
}
>(function IconArrowSmall({displayDirection, className, ...rest}) {
const classes = cn(className, {
'rotate-180': displayDirection === 'left',
'rotate-180 rtl:rotate-0': displayDirection === 'start',
'rotate-90': displayDirection === 'down',
});
return (
Expand Down
32 changes: 32 additions & 0 deletions src/components/Icon/IconCanary.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/

import {memo} from 'react';

export const IconCanary = memo<JSX.IntrinsicElements['svg'] & {title?: string}>(
function IconCanary({className, title}) {
return (
<svg
className={className}
width="20px"
height="20px"
viewBox="0 0 20 20"
version="1.1"
xmlns="http://www.w3.org/2000/svg">
{title && <title>{title}</title>}
<g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
<g
id="noun-labs-1201738-(2)"
transform="translate(2, 0)"
fill="currentColor"
fillRule="nonzero">
<path
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"
id="Shape"></path>
</g>
</g>
</svg>
);
}
);
9 changes: 8 additions & 1 deletion src/components/Icon/IconChevron.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import cn from 'classnames';

export const IconChevron = memo<
JSX.IntrinsicElements['svg'] & {
displayDirection: 'up' | 'down' | 'left' | 'right';
/**
* The direction the arrow should point.
* `start` and `end` are relative to the current locale.
* for example, in LTR, `start` is left and `end` is right.
*/
displayDirection: 'start' | 'end' | 'right' | 'left' | 'up' | 'down';
}
>(function IconChevron({className, displayDirection}) {
const classes = cn(
Expand All @@ -16,6 +21,8 @@ export const IconChevron = memo<
'rotate-90': displayDirection === 'left',
'rotate-180': displayDirection === 'up',
'-rotate-90': displayDirection === 'right',
'rotate-90 rtl:-rotate-90': displayDirection === 'start',
'-rotate-90 rtl:rotate-90': displayDirection === 'end',
},
className
);
Expand Down
13 changes: 10 additions & 3 deletions src/components/Icon/IconNavArrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ import cn from 'classnames';

export const IconNavArrow = memo<
JSX.IntrinsicElements['svg'] & {
displayDirection: 'right' | 'down' | 'left';
/**
* The direction the arrow should point.
* `start` and `end` are relative to the current locale.
* for example, in LTR, `start` is left and `end` is right.
*/
displayDirection: 'start' | 'end' | 'right' | 'left' | 'down';
}
>(function IconNavArrow({displayDirection = 'right', className}) {
>(function IconNavArrow({displayDirection = 'start', className}) {
const classes = cn(
'duration-100 ease-in transition',
{
'rotate-0': displayDirection === 'down',
'-rotate-90': displayDirection === 'right',
'rotate-90': displayDirection === 'left',
'-rotate-90': displayDirection === 'right',
'rotate-90 rtl:-rotate-90': displayDirection === 'start',
'-rotate-90 rtl:rotate-90': displayDirection === 'end',
},
className
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout/Feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ function SendFeedback({onSubmit}: {onSubmit: () => void}) {
const [isSubmitted, setIsSubmitted] = useState(false);
return (
<div className="max-w-xs w-80 lg:w-auto py-3 shadow-lg rounded-lg m-4 bg-wash dark:bg-gray-95 px-4 flex">
<p className="w-full font-bold text-primary dark:text-primary-dark text-lg mr-4">
<p className="w-full font-bold text-primary dark:text-primary-dark text-lg me-4">
{isSubmitted ? 'Thank you for your feedback!' : 'Is this page useful?'}
</p>
{!isSubmitted && (
<button
aria-label="Yes"
className="bg-secondary-button dark:bg-secondary-button-dark rounded-lg text-primary dark:text-primary-dark px-3 mr-2"
className="bg-secondary-button dark:bg-secondary-button-dark rounded-lg text-primary dark:text-primary-dark px-3 me-2"
onClick={() => {
setIsSubmitted(true);
onSubmit();
Expand Down
6 changes: 4 additions & 2 deletions src/components/Layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function Footer() {
return (
<footer className={cn('text-secondary dark:text-secondary-dark')}>
<div className="grid grid-cols-2 md:grid-cols-3 xl:grid-cols-5 gap-x-12 gap-y-8 max-w-7xl mx-auto">
<div className="col-span-2 md:col-span-1 justify-items-start mt-3.5 text-left">
<div className="col-span-2 md:col-span-1 justify-items-start mt-3.5">
<ExternalLink
href="https://opensource.fb.com/"
aria-label="Meta Open Source">
Expand Down Expand Up @@ -280,7 +280,9 @@ export function Footer() {
</div>
</ExternalLink>

<div className="text-xs text-left mt-2 pr-0.5">
<div
className="text-xs text-left rtl:text-right mt-2 pe-0.5"
dir="ltr">
&copy;{new Date().getFullYear()}
</div>
</div>
Expand Down
Loading
Loading