Skip to content

Commit 0d400ff

Browse files
authored
Merge pull request #40 from reactjs/sync-3563d95e
2 parents a900180 + 84407b8 commit 0d400ff

18 files changed

+125
-83
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"retext": "^7.0.1",
9292
"retext-smartypants": "^4.0.0",
9393
"rss": "^1.2.2",
94-
"tailwindcss": "^3.3.2",
94+
"tailwindcss": "^3.4.1",
9595
"typescript": "^4.0.2",
9696
"unist-util-visit": "^2.0.3",
9797
"webpack-bundle-analyzer": "^4.5.0"

src/components/Icon/IconGitHub.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export const IconGitHub = memo<JSX.IntrinsicElements['svg']>(
99
return (
1010
<svg
1111
xmlns="http://www.w3.org/2000/svg"
12-
width="1.33em"
13-
height="1.33em"
12+
width="1.5em"
13+
height="1.5em"
1414
viewBox="0 -2 24 24"
1515
fill="currentColor"
1616
{...props}>

src/components/Icon/IconThreads.tsx

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*/
4+
5+
import {memo} from 'react';
6+
7+
export const IconThreads = memo<JSX.IntrinsicElements['svg']>(
8+
function IconThreads(props) {
9+
return (
10+
<svg
11+
aria-label="Threads"
12+
viewBox="0 0 192 192"
13+
height="1.40em"
14+
width="1.40em"
15+
fill="currentColor"
16+
xmlns="http://www.w3.org/2000/svg"
17+
{...props}>
18+
<path
19+
className="x19hqcy"
20+
d="M141.537 88.9883C140.71 88.5919 139.87 88.2104 139.019 87.8451C137.537 60.5382 122.616 44.905 97.5619 44.745C97.4484 44.7443 97.3355 44.7443 97.222 44.7443C82.2364 44.7443 69.7731 51.1409 62.102 62.7807L75.881 72.2328C81.6116 63.5383 90.6052 61.6848 97.2286 61.6848C97.3051 61.6848 97.3819 61.6848 97.4576 61.6855C105.707 61.7381 111.932 64.1366 115.961 68.814C118.893 72.2193 120.854 76.925 121.825 82.8638C114.511 81.6207 106.601 81.2385 98.145 81.7233C74.3247 83.0954 59.0111 96.9879 60.0396 116.292C60.5615 126.084 65.4397 134.508 73.775 140.011C80.8224 144.663 89.899 146.938 99.3323 146.423C111.79 145.74 121.563 140.987 128.381 132.296C133.559 125.696 136.834 117.143 138.28 106.366C144.217 109.949 148.617 114.664 151.047 120.332C155.179 129.967 155.42 145.8 142.501 158.708C131.182 170.016 117.576 174.908 97.0135 175.059C74.2042 174.89 56.9538 167.575 45.7381 153.317C35.2355 139.966 29.8077 120.682 29.6052 96C29.8077 71.3178 35.2355 52.0336 45.7381 38.6827C56.9538 24.4249 74.2039 17.11 97.0132 16.9405C119.988 17.1113 137.539 24.4614 149.184 38.788C154.894 45.8136 159.199 54.6488 162.037 64.9503L178.184 60.6422C174.744 47.9622 169.331 37.0357 161.965 27.974C147.036 9.60668 125.202 0.195148 97.0695 0H96.9569C68.8816 0.19447 47.2921 9.6418 32.7883 28.0793C19.8819 44.4864 13.2244 67.3157 13.0007 95.9325L13 96L13.0007 96.0675C13.2244 124.684 19.8819 147.514 32.7883 163.921C47.2921 182.358 68.8816 191.806 96.9569 192H97.0695C122.03 191.827 139.624 185.292 154.118 170.811C173.081 151.866 172.51 128.119 166.26 113.541C161.776 103.087 153.227 94.5962 141.537 88.9883ZM98.4405 129.507C88.0005 130.095 77.1544 125.409 76.6196 115.372C76.2232 107.93 81.9158 99.626 99.0812 98.6368C101.047 98.5234 102.976 98.468 104.871 98.468C111.106 98.468 116.939 99.0737 122.242 100.233C120.264 124.935 108.662 128.946 98.4405 129.507Z"></path>
21+
</svg>
22+
);
23+
}
24+
);

src/components/Layout/Feedback.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ function SendFeedback({onSubmit}: {onSubmit: () => void}) {
6363
return (
6464
<div
6565
className={cn(
66-
'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',
66+
'max-w-custom-xs w-80 lg:w-auto py-3 shadow-lg rounded-lg m-4 bg-wash dark:bg-gray-95 px-4 flex',
6767
{exit: isSubmitted}
6868
)}>
69-
<p className="w-full font-bold text-primary dark:text-primary-dark text-lg me-4">
69+
<p className="w-full text-lg font-bold text-primary dark:text-primary-dark me-4">
7070
{isSubmitted ? 'Thank you for your feedback!' : 'Is this page useful?'}
7171
</p>
7272
{!isSubmitted && (
7373
<button
7474
aria-label="Yes"
75-
className="bg-secondary-button dark:bg-secondary-button-dark rounded-lg text-primary dark:text-primary-dark px-3 me-2"
75+
className="px-3 rounded-lg bg-secondary-button dark:bg-secondary-button-dark text-primary dark:text-primary-dark me-2"
7676
onClick={() => {
7777
setIsSubmitted(true);
7878
onSubmit();
@@ -84,7 +84,7 @@ function SendFeedback({onSubmit}: {onSubmit: () => void}) {
8484
{!isSubmitted && (
8585
<button
8686
aria-label="No"
87-
className="bg-secondary-button dark:bg-secondary-button-dark rounded-lg text-primary dark:text-primary-dark px-3"
87+
className="px-3 rounded-lg bg-secondary-button dark:bg-secondary-button-dark text-primary dark:text-primary-dark"
8888
onClick={() => {
8989
setIsSubmitted(true);
9090
onSubmit();

src/components/Layout/Page.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
130130
)}>
131131
{showSidebar && (
132132
<div className="lg:-mt-16">
133-
<div className="lg:pt-16 fixed lg:sticky top-0 start-0 end-0 py-0 shadow lg:shadow-none">
133+
<div className="fixed top-0 py-0 shadow lg:pt-16 lg:sticky start-0 end-0 lg:shadow-none">
134134
<SidebarNav
135135
key={section}
136136
routeTree={routeTree}
@@ -143,7 +143,7 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
143143
<Suspense fallback={null}>
144144
<main className="min-w-0 isolate">
145145
<article
146-
className="break-words font-normal text-primary dark:text-primary-dark"
146+
className="font-normal break-words text-primary dark:text-primary-dark"
147147
key={asPath}>
148148
{content}
149149
</article>
@@ -153,14 +153,14 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
153153
isHomePage && 'bg-wash dark:bg-gray-95 mt-[-1px]'
154154
)}>
155155
{!isHomePage && (
156-
<div className="mx-auto w-full px-5 sm:px-12 md:px-12 pt-10 md:pt-12 lg:pt-10">
156+
<div className="w-full px-5 pt-10 mx-auto sm:px-12 md:px-12 md:pt-12 lg:pt-10">
157157
{
158-
<hr className="max-w-7xl mx-auto border-border dark:border-border-dark" />
158+
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
159159
}
160160
{showSurvey && (
161161
<>
162-
<div className="flex flex-col items-center m-4 p-4">
163-
<p className="font-bold text-primary dark:text-primary-dark text-lg mb-4">
162+
<div className="flex flex-col items-center p-4 m-4">
163+
<p className="mb-4 text-lg font-bold text-primary dark:text-primary-dark">
164164
How do you like these docs?
165165
</p>
166166
<div>
@@ -178,7 +178,7 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
178178
</ButtonLink>
179179
</div>
180180
</div>
181-
<hr className="max-w-7xl mx-auto border-border dark:border-border-dark" />
181+
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
182182
</>
183183
)}
184184
</div>
@@ -193,7 +193,7 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
193193
</div>
194194
</main>
195195
</Suspense>
196-
<div className="-mt-16 hidden lg:max-w-xs 2xl:block">
196+
<div className="hidden -mt-16 lg:max-w-custom-xs 2xl:block">
197197
{showToc && toc.length > 0 && <Toc headings={toc} key={asPath} />}
198198
</div>
199199
</div>

src/components/Layout/SidebarNav/SidebarNav.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ export default function SidebarNav({
4040
}}>
4141
<aside
4242
className={cn(
43-
`lg:grow flex-col w-full pb-8 lg:pb-0 lg:max-w-xs z-10 hidden lg:block`
43+
`lg:grow flex-col w-full pb-8 lg:pb-0 lg:max-w-custom-xs z-10 hidden lg:block`
4444
)}>
4545
<nav
4646
role="navigation"
4747
style={{'--bg-opacity': '.2'} as React.CSSProperties} // Need to cast here because CSS vars aren't considered valid in TS types (cuz they could be anything)
48-
className="w-full lg:h-auto grow pe-0 lg:pe-5 pt-6 lg:pb-16 md:pt-4 lg:pt-4 scrolling-touch scrolling-gpu">
48+
className="w-full pt-6 scrolling-touch lg:h-auto grow pe-0 lg:pe-5 lg:pb-16 md:pt-4 lg:pt-4 scrolling-gpu">
4949
{/* No fallback UI so need to be careful not to suspend directly inside. */}
5050
<Suspense fallback={null}>
5151
<SidebarRouteTree

src/components/Layout/TopNav/TopNav.tsx

+15-15
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function Link({
9797
return (
9898
<NextLink
9999
href={`${href}`}
100-
className="inline text-primary dark:text-primary-dark hover:text-link hover:dark:text-link-dark border-b border-link border-opacity-0 hover:border-opacity-100 duration-100 ease-in transition leading-normal"
100+
className="inline leading-normal transition duration-100 ease-in border-b border-opacity-0 text-primary dark:text-primary-dark hover:text-link hover:dark:text-link-dark border-link hover:border-opacity-100"
101101
{...props}>
102102
{children}
103103
</NextLink>
@@ -233,8 +233,8 @@ export default function TopNav({
233233
'duration-300 backdrop-filter backdrop-blur-lg backdrop-saturate-200 transition-shadow bg-opacity-90 items-center w-full flex justify-between bg-wash dark:bg-wash-dark dark:bg-opacity-95 px-1.5 lg:pe-5 lg:ps-4 z-50',
234234
{'dark:shadow-nav-dark shadow-nav': isScrolled || isOpen}
235235
)}>
236-
<div className="h-16 w-full gap-0 sm:gap-3 flex items-center justify-between">
237-
<div className="3xl:flex-1 flex flex-row ">
236+
<div className="flex items-center justify-between w-full h-16 gap-0 sm:gap-3">
237+
<div className="flex flex-row 3xl:flex-1 ">
238238
<button
239239
type="button"
240240
aria-label="Menu"
@@ -247,7 +247,7 @@ export default function TopNav({
247247
)}>
248248
{isOpen ? <IconClose /> : <IconHamburger />}
249249
</button>
250-
<div className="3xl:flex-1 flex align-center">
250+
<div className="flex 3xl:flex-1 align-center">
251251
<NextLink
252252
href="/"
253253
className={`active:scale-95 overflow-hidden transition-transform relative items-center text-primary dark:text-primary-dark p-1 whitespace-nowrap outline-link rounded-full 3xl:rounded-xl inline-flex text-lg font-normal gap-2`}>
@@ -260,16 +260,16 @@ export default function TopNav({
260260
</NextLink>
261261
</div>
262262
</div>
263-
<div className="hidden md:flex flex-1 justify-center items-center w-full 3xl:w-auto 3xl:shrink-0 3xl:justify-center">
263+
<div className="items-center justify-center flex-1 hidden w-full md:flex 3xl:w-auto 3xl:shrink-0 3xl:justify-center">
264264
<button
265265
type="button"
266266
className={cn(
267267
'flex 3xl:w-[56rem] 3xl:mx-0 relative ps-4 pe-1 py-1 h-10 bg-gray-30/20 dark:bg-gray-40/20 outline-none focus:outline-link betterhover:hover:bg-opacity-80 pointer items-center text-start w-full text-gray-30 rounded-full align-middle text-base'
268268
)}
269269
onClick={onOpenSearch}>
270-
<IconSearch className="me-3 align-middle text-gray-30 shrink-0 group-betterhover:hover:text-gray-70" />
270+
<IconSearch className="align-middle me-3 text-gray-30 shrink-0 group-betterhover:hover:text-gray-70" />
271271
Search
272-
<span className="ms-auto hidden sm:flex item-center me-1">
272+
<span className="hidden ms-auto sm:flex item-center me-1">
273273
<Kbd data-platform="mac"></Kbd>
274274
<Kbd data-platform="win" wide>
275275
Ctrl
@@ -301,9 +301,9 @@ export default function TopNav({
301301
<button
302302
aria-label="Search"
303303
type="button"
304-
className="active:scale-95 transition-transform flex md:hidden w-12 h-12 rounded-full items-center justify-center hover:bg-secondary-button hover:dark:bg-secondary-button-dark outline-link"
304+
className="flex items-center justify-center w-12 h-12 transition-transform rounded-full active:scale-95 md:hidden hover:bg-secondary-button hover:dark:bg-secondary-button-dark outline-link"
305305
onClick={onOpenSearch}>
306-
<IconSearch className="align-middle w-5 h-5" />
306+
<IconSearch className="w-5 h-5 align-middle" />
307307
</button>
308308
</div>
309309
<div className="flex dark:hidden">
@@ -313,7 +313,7 @@ export default function TopNav({
313313
onClick={() => {
314314
window.__setPreferredTheme('dark');
315315
}}
316-
className="active:scale-95 transition-transform flex w-12 h-12 rounded-full items-center justify-center hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link">
316+
className="flex items-center justify-center w-12 h-12 transition-transform rounded-full active:scale-95 hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link">
317317
{darkIcon}
318318
</button>
319319
</div>
@@ -324,7 +324,7 @@ export default function TopNav({
324324
onClick={() => {
325325
window.__setPreferredTheme('light');
326326
}}
327-
className="active:scale-95 transition-transform flex w-12 h-12 rounded-full items-center justify-center hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link">
327+
className="flex items-center justify-center w-12 h-12 transition-transform rounded-full active:scale-95 hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link">
328328
{lightIcon}
329329
</button>
330330
</div>
@@ -334,7 +334,7 @@ export default function TopNav({
334334
target="_blank"
335335
rel="noreferrer noopener"
336336
aria-label="Open on GitHub"
337-
className="active:scale-95 transition-transform flex w-12 h-12 rounded-full items-center justify-center hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link">
337+
className="flex items-center justify-center w-12 h-12 transition-transform rounded-full active:scale-95 hover:bg-primary/5 hover:dark:bg-primary-dark/5 outline-link">
338338
{githubIcon}
339339
</Link>
340340
</div>
@@ -349,13 +349,13 @@ export default function TopNav({
349349
className="overflow-y-scroll isolate no-bg-scrollbar lg:w-[342px] grow bg-wash dark:bg-wash-dark">
350350
<aside
351351
className={cn(
352-
`lg:grow lg:flex flex-col w-full pb-8 lg:pb-0 lg:max-w-xs z-50`,
352+
`lg:grow lg:flex flex-col w-full pb-8 lg:pb-0 lg:max-w-custom-xs z-50`,
353353
isOpen ? 'block z-40' : 'hidden lg:block'
354354
)}>
355355
<nav
356356
role="navigation"
357357
style={{'--bg-opacity': '.2'} as React.CSSProperties} // Need to cast here because CSS vars aren't considered valid in TS types (cuz they could be anything)
358-
className="w-full lg:h-auto grow pe-0 lg:pe-5 pt-4 lg:py-6 md:pt-4 lg:pt-4 scrolling-touch scrolling-gpu">
358+
className="w-full pt-4 scrolling-touch lg:h-auto grow pe-0 lg:pe-5 lg:py-6 md:pt-4 lg:pt-4 scrolling-gpu">
359359
{/* No fallback UI so need to be careful not to suspend directly inside. */}
360360
<Suspense fallback={null}>
361361
<div className="ps-3 xs:ps-5 xs:gap-0.5 xs:text-base overflow-x-auto flex flex-row lg:hidden text-base font-bold text-secondary dark:text-secondary-dark">
@@ -378,7 +378,7 @@ export default function TopNav({
378378
</div>
379379
<div
380380
role="separator"
381-
className="ms-5 mt-4 mb-2 border-b border-border dark:border-border-dark"
381+
className="mt-4 mb-2 border-b ms-5 border-border dark:border-border-dark"
382382
/>
383383
<SidebarRouteTree
384384
// Don't share state between the desktop and mobile versions.

src/components/MDX/TeamMember.tsx

+18-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import * as React from 'react';
66
import Image from 'next/image';
77
import {IconTwitter} from '../Icon/IconTwitter';
8+
import {IconThreads} from '../Icon/IconThreads';
89
import {IconGitHub} from '../Icon/IconGitHub';
910
import {ExternalLink} from '../ExternalLink';
1011
import {H3} from './Heading';
@@ -17,6 +18,7 @@ interface TeamMemberProps {
1718
children: React.ReactNode;
1819
photo: string;
1920
twitter?: string;
21+
threads?: string;
2022
github?: string;
2123
personal?: string;
2224
}
@@ -30,6 +32,7 @@ export function TeamMember({
3032
photo,
3133
github,
3234
twitter,
35+
threads,
3336
personal,
3437
}: TeamMemberProps) {
3538
if (name == null || title == null || permalink == null || children == null) {
@@ -59,25 +62,36 @@ export function TeamMember({
5962
</H3>
6063
{title && <div>{title}</div>}
6164
{children}
62-
<div className="sm:flex sm:flex-row">
65+
<div className="sm:flex sm:flex-row flex-wrap">
6366
{twitter && (
6467
<div className="me-4">
6568
<ExternalLink
6669
aria-label="React on Twitter"
6770
href={`https://twitter.com/${twitter}`}
6871
className="hover:text-primary dark:text-primary-dark flex flex-row items-center">
69-
<IconTwitter className="pe-2" />
72+
<IconTwitter className="pe-1" />
7073
{twitter}
7174
</ExternalLink>
7275
</div>
7376
)}
77+
{threads && (
78+
<div className="me-4">
79+
<ExternalLink
80+
aria-label="React on Threads"
81+
href={`https://threads.net/${threads}`}
82+
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
83+
<IconThreads className="pe-1" />
84+
{threads}
85+
</ExternalLink>
86+
</div>
87+
)}
7488
{github && (
7589
<div className="me-4">
7690
<ExternalLink
7791
aria-label="GitHub Profile"
7892
href={`https://github.com/${github}`}
7993
className="hover:text-primary dark:text-primary-dark flex flex-row items-center">
80-
<IconGitHub className="pe-2" /> {github}
94+
<IconGitHub className="pe-1" /> {github}
8195
</ExternalLink>
8296
</div>
8397
)}
@@ -86,7 +100,7 @@ export function TeamMember({
86100
aria-label="Personal Site"
87101
href={`https://${personal}`}
88102
className="hover:text-primary dark:text-primary-dark flex flex-row items-center">
89-
<IconLink className="pe-2" /> {personal}
103+
<IconLink className="pe-1" /> {personal}
90104
</ExternalLink>
91105
)}
92106
</div>

src/content/blog/2022/06/15/react-labs-what-we-have-been-working-on-june-2022.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ June 15, 2022 by [Andrew Clark](https://twitter.com/acdlite), [Dan Abramov](http
88

99
<Intro>
1010

11-
[React 18](https://react.dev/blog/2022/03/29/react-v18) was years in the making, and with it brought valuable lessons for the React team. Its release was the result of many years of research and exploring many paths. Some of those paths were successful; many more were dead-ends that led to new insights. One lesson we’ve learned is that it’s frustrating for the community to wait for new features without having insight into these paths that we’re exploring.
11+
[React 18](/blog/2022/03/29/react-v18) was years in the making, and with it brought valuable lessons for the React team. Its release was the result of many years of research and exploring many paths. Some of those paths were successful; many more were dead-ends that led to new insights. One lesson we’ve learned is that it’s frustrating for the community to wait for new features without having insight into these paths that we’re exploring.
1212

1313
</Intro>
1414

0 commit comments

Comments
 (0)