Skip to content

Commit 002d62c

Browse files
authored
Merge pull request #537 from reactjs/sync-556063bd
Sync with react.dev @ 556063b
2 parents e97f6c2 + d708887 commit 002d62c

27 files changed

+132
-45
lines changed

colors.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
tertiary: '#5E687E', // gray-50
1212
'tertiary-dark': '#99A1B3', // gray-30
1313
link: '#087EA4', // blue-50
14-
'link-dark': '#149ECA', // blue-40
14+
'link-dark': '#58C4DC', // blue-40
1515
syntax: '#EBECF0', // gray-10
1616
wash: '#FFFFFF',
1717
'wash-dark': '#23272F', // gray-90
@@ -23,6 +23,8 @@ module.exports = {
2323
'border-dark': '#343A46', // gray-80
2424
'secondary-button': '#EBECF0', // gray-10
2525
'secondary-button-dark': '#404756', // gray-70
26+
brand: '#087EA4', // blue-40
27+
'brand-dark': '#58C4DC', // blue-40
2628

2729
// Gray
2830
'gray-95': '#16181D',

public/android-chrome-192x192.png

5.86 KB
Loading

public/android-chrome-384x384.png

28.3 KB
Loading

public/android-chrome-512x512.png

69.6 KB
Loading

public/apple-touch-icon.png

5.54 KB
Loading

public/browserconfig.xml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<browserconfig>
3+
<msapplication>
4+
<tile>
5+
<square150x150logo src="/mstile-150x150.png"/>
6+
<TileColor>#2b5797</TileColor>
7+
</tile>
8+
</msapplication>
9+
</browserconfig>

public/favicon-16x16.png

872 Bytes
Loading

public/favicon-32x32.png

1.63 KB
Loading

public/favicon.ico

10.5 KB
Binary file not shown.

public/favicon_old.ico

15 KB
Binary file not shown.

public/images/uwu.png

2.43 KB
Loading

public/mstile-150x150.png

6.01 KB
Loading

public/safari-pinned-tab.svg

+60
Loading

public/site.webmanifest

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "React",
3+
"short_name": "React",
4+
"icons": [
5+
{
6+
"src": "/android-chrome-192x192.png",
7+
"sizes": "192x192",
8+
"type": "image/png"
9+
},
10+
{
11+
"src": "/android-chrome-384x384.png",
12+
"sizes": "384x384",
13+
"type": "image/png"
14+
}
15+
],
16+
"theme_color": "#23272f",
17+
"background_color": "#23272f",
18+
"display": "standalone"
19+
}

src/components/ButtonLink.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ function ButtonLink({
2626
className,
2727
'active:scale-[.98] transition-transform inline-flex font-bold items-center outline-none focus:outline-none focus-visible:outline focus-visible:outline-link focus:outline-offset-2 focus-visible:dark:focus:outline-link-dark leading-snug',
2828
{
29-
'bg-link text-white hover:bg-opacity-80': type === 'primary',
29+
'bg-link text-white dark:bg-brand-dark dark:text-secondary hover:bg-opacity-80':
30+
type === 'primary',
3031
'text-primary dark:text-primary-dark shadow-secondary-button-stroke dark:shadow-secondary-button-stroke-dark hover:bg-gray-40/5 active:bg-gray-40/10 hover:dark:bg-gray-60/5 active:dark:bg-gray-60/10':
3132
type === 'secondary',
3233
'text-lg py-3 rounded-full px-4 sm:px-6': size === 'lg',

src/components/Layout/HomeContent.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export function HomeContent() {
129129
</div>
130130
<Logo
131131
className={cn(
132-
'uwu-hidden mt-4 mb-3 text-link dark:text-link-dark w-24 lg:w-28 self-center text-sm me-0 flex origin-center transition-all ease-in-out'
132+
'uwu-hidden mt-4 mb-3 text-brand dark:text-brand-dark w-24 lg:w-28 self-center text-sm me-0 flex origin-center transition-all ease-in-out'
133133
)}
134134
/>
135135
<h1 className="uwu-hidden text-5xl font-display lg:text-6xl self-center flex font-semibold leading-snug text-primary dark:text-primary-dark">
@@ -509,7 +509,7 @@ export function HomeContent() {
509509
src="/images/uwu.png"
510510
/>
511511
</div>
512-
<Logo className="uwu-hidden text-link dark:text-link-dark w-24 lg:w-28 mb-10 lg:mb-8 mt-12 h-auto mx-auto self-start" />
512+
<Logo className="uwu-hidden text-brand dark:text-brand-dark w-24 lg:w-28 mb-10 lg:mb-8 mt-12 h-auto mx-auto self-start" />
513513
<Header>
514514
Welcome to the <br className="hidden lg:inline" />
515515
React community
@@ -1640,7 +1640,7 @@ function Thumbnail({video}) {
16401640
</div>
16411641
<div className="mt-1">
16421642
<span className="inline-flex text-xs font-normal items-center text-primary-dark py-1 whitespace-nowrap outline-link px-1.5 rounded-lg">
1643-
<Logo className="text-xs me-1 w-4 h-4 text-link-dark" />
1643+
<Logo className="text-xs me-1 w-4 h-4 text-brand text-brand-dark" />
16441644
React Conf
16451645
</span>
16461646
</div>

src/components/Layout/Page.tsx

+1-31
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import {Toc} from './Toc';
1111
import SocialBanner from '../SocialBanner';
1212
import {DocsPageFooter} from 'components/DocsFooter';
1313
import {Seo} from 'components/Seo';
14-
import ButtonLink from 'components/ButtonLink';
15-
import {IconNavArrow} from 'components/Icon/IconNavArrow';
1614
import PageHeading from 'components/PageHeading';
1715
import {getRouteMeta} from './getRouteMeta';
1816
import {TocContext} from '../MDX/TocContext';
@@ -105,12 +103,10 @@ export function Page({
105103
let hasColumns = true;
106104
let showSidebar = true;
107105
let showToc = true;
108-
let showSurvey = true;
109106
if (isHomePage || isBlogIndex) {
110107
hasColumns = false;
111108
showSidebar = false;
112109
showToc = false;
113-
showSurvey = false;
114110
} else if (section === 'blog') {
115111
showToc = false;
116112
hasColumns = false;
@@ -178,33 +174,7 @@ export function Page({
178174
)}>
179175
{!isHomePage && (
180176
<div className="w-full px-5 pt-10 mx-auto sm:px-12 md:px-12 md:pt-12 lg:pt-10">
181-
{
182-
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
183-
}
184-
{showSurvey && (
185-
<>
186-
<div className="flex flex-col items-center p-4 m-4">
187-
<p className="mb-4 text-lg font-bold text-primary dark:text-primary-dark">
188-
How do you like these docs?
189-
</p>
190-
<div>
191-
<ButtonLink
192-
href="https://www.surveymonkey.co.uk/r/PYRPF3X"
193-
className="mt-1"
194-
type="primary"
195-
size="md"
196-
target="_blank">
197-
Take our survey!
198-
<IconNavArrow
199-
displayDirection="end"
200-
className="inline ms-1"
201-
/>
202-
</ButtonLink>
203-
</div>
204-
</div>
205-
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
206-
</>
207-
)}
177+
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
208178
</div>
209179
)}
210180
<div

src/components/Layout/TopNav/TopNav.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ export default function TopNav({
282282
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`}>
283283
<Logo
284284
className={cn(
285-
'text-sm me-0 w-10 h-10 text-link dark:text-link-dark flex origin-center transition-all ease-in-out'
285+
'text-sm me-0 w-10 h-10 text-brand dark:text-brand-dark flex origin-center transition-all ease-in-out'
286286
)}
287287
/>
288288
<span className="sr-only 3xl:not-sr-only">React</span>

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
@@ -77,6 +77,6 @@ We are working on a new version for the Interaction Tracing API (tentatively cal
7777

7878
Last year, we announced the beta version of the new React documentation website ([later shipped as react.dev](/blog/2023/03/16/introducing-react-dev)) of the new React documentation website. The new learning materials teach Hooks first and has new diagrams, illustrations, as well as many interactive examples and challenges. We took a break from that work to focus on the React 18 release, but now that React 18 is out, we’re actively working to finish and ship the new documentation.
7979

80-
We are currently writing a detailed section about effects, as we’ve heard that is one of the more challenging topics for both new and experienced React users. [Synchronizing with Effects](/learn/synchronizing-with-effects) is the first published page in the series, and there are more to come in the following weeks. When we first started writing a detailed section about effects, we’ve realized that many common effect patterns can be simplified by adding a new primitive to React. We’ve shared some initial thoughts on that in the [useEvent RFC](https://github.com/reactjs/rfcs/pull/220). It is currently in early research, and we are still iterating on the idea. We appreciate the community’s comments on the RFC so far, as well as the [feedback](https://github.com/reactjs/reactjs.org/issues/3308) and contributions to the ongoing documentation rewrite. We’d specifically like to thank [Harish Kumar](https://github.com/harish-sethuraman) for submitting and reviewing many improvements to the new website implementation.
80+
We are currently writing a detailed section about effects, as we’ve heard that is one of the more challenging topics for both new and experienced React users. [Synchronizing with Effects](/learn/synchronizing-with-effects) is the first published page in the series, and there are more to come in the following weeks. When we first started writing a detailed section about effects, we’ve realized that many common effect patterns can be simplified by adding a new primitive to React. We’ve shared some initial thoughts on that in the [useEvent RFC](https://github.com/reactjs/rfcs/pull/220). It is currently in early research, and we are still iterating on the idea. We appreciate the community’s comments on the RFC so far, as well as the [feedback](https://github.com/reactjs/react.dev/issues/3308) and contributions to the ongoing documentation rewrite. We’d specifically like to thank [Harish Kumar](https://github.com/harish-sethuraman) for submitting and reviewing many improvements to the new website implementation.
8181

8282
*Thanks to [Sophie Alpert](https://twitter.com/sophiebits) for reviewing this blog post!*

src/content/blog/2023/03/16/introducing-react-dev.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ We hope that this approach will make the API reference useful not only as a way
613613

614614
## What's next? {/*whats-next*/}
615615

616-
That's a wrap for our little tour! Have a look around the new website, see what you like or don't like, and keep the feedback coming in the [anonymous survey](https://www.surveymonkey.co.uk/r/PYRPF3X) or in our [issue tracker](https://github.com/reactjs/reactjs.org/issues).
616+
That's a wrap for our little tour! Have a look around the new website, see what you like or don't like, and keep the feedback coming in our [issue tracker](https://github.com/reactjs/react.dev/issues).
617617

618618
We acknowledge this project has taken a long time to ship. We wanted to maintain a high quality bar that the React community deserves. While writing these docs and creating all of the examples, we found mistakes in some of our own explanations, bugs in React, and even gaps in the React design that we are now working to address. We hope that the new documentation will help us hold React itself to a higher bar in the future.
619619

src/content/blog/2024/04/25/react-19-upgrade-guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ To fix this warning, you can import `act` from `react`:
338338

339339
All other `test-utils` functions have been removed. These utilities were uncommon, and made it too easy to depend on low level implementation details of your components and React. In React 19, these functions will error when called and their exports will be removed in a future version.
340340

341-
See the [warning page](https://react.dev/warnings/react-dom-test-utils) to for alternatives.
341+
See the [warning page](https://react.dev/warnings/react-dom-test-utils) for alternatives.
342342

343343
#### Removed: `ReactDOM.render` {/*removed-reactdom-render*/}
344344

src/content/community/docs-contributors.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Docs Contributors
44

55
<Intro>
66

7-
React documentation is written and maintained by the [React team](/community/team) and [external contributors.](https://github.com/reactjs/reactjs.org/graphs/contributors) On this page, we'd like to thank a few people who've made significant contributions to this site.
7+
React documentation is written and maintained by the [React team](/community/team) and [external contributors.](https://github.com/reactjs/react.dev/graphs/contributors) On this page, we'd like to thank a few people who've made significant contributions to this site.
88

99
</Intro>
1010

src/content/reference/rsc/server-components.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ For more info, see the docs for [Directives](/reference/rsc/directives).
198198
In the following example, the `Notes` Server Component imports an `Expandable` Client Component that uses state to toggle its `expanded` state:
199199
```js
200200
// Server Component
201-
import Exapandable from './Expandable';
201+
import Expandable from './Expandable';
202202

203203
async function Notes() {
204204
const notes = await db.notes.getAll();

src/pages/_document.tsx

+21
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,27 @@ const MyDocument = () => {
99
return (
1010
<Html lang={siteConfig.languageCode} dir={siteConfig.isRTL ? 'rtl' : 'ltr'}>
1111
<Head />
12+
<link
13+
rel="apple-touch-icon"
14+
sizes="180x180"
15+
href="/apple-touch-icon.png"
16+
/>
17+
<link
18+
rel="icon"
19+
type="image/png"
20+
sizes="32x32"
21+
href="/favicon-32x32.png"
22+
/>
23+
<link
24+
rel="icon"
25+
type="image/png"
26+
sizes="16x16"
27+
href="/favicon-16x16.png"
28+
/>
29+
<link rel="manifest" href="/site.webmanifest" />
30+
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#404756" />
31+
<meta name="msapplication-TileColor" content="#2b5797" />
32+
<meta name="theme-color" content="#23272f" />
1233
<script
1334
async
1435
src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GA_TRACKING_ID}`}

src/styles/index.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@
450450
}
451451

452452
html.dark a > code {
453-
color: #149eca !important; /* blue-40 */
453+
color: #58c4dc !important; /* blue-40 */
454454
}
455455

456456
.text-code {

src/styles/sandpack.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ html .sandpack {
5858

5959
/* Dark theme */
6060
html.dark .sp-wrapper {
61-
--sp-colors-accent: #149eca;
61+
--sp-colors-accent: #58c4dc;
6262
--sp-colors-clickable: #999;
6363
--sp-colors-disabled: #fff;
6464
--sp-colors-error: #811e18;
@@ -593,7 +593,7 @@ html.dark .sp-devtools > div {
593593
-webkit-text-size-adjust: none;
594594
}
595595

596-
/**
596+
/**
597597
* For iOS: prevent browser zoom when clicking on sandbox.
598598
* Does NOT apply to code blocks.
599599
*/

vercel.json

+5
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@
173173
"source": "/reference/react/use-server",
174174
"destination": "/reference/rsc/use-server",
175175
"permanent": true
176+
},
177+
{
178+
"source": "/feed.xml",
179+
"destination": "/rss.xml",
180+
"permanent": true
176181
}
177182
],
178183
"headers": [

0 commit comments

Comments
 (0)