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 @ bb3a0f5c #553

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7a15e96
Fix async-await syntax (#6554)
jamiebuilds Jan 18, 2024
9c316b2
Upgrade tailwind version (#6550)
prajwalkulkarni Jan 18, 2024
82723c1
Remove url origin to match all translation forks (#6516)
AhmedBaset Jan 18, 2024
a3cf37d
Update conferences.md - React Miami (#6557)
michellebakels Jan 19, 2024
b9f4f97
Add threads links to team page (#6561)
rickhanlonii Jan 19, 2024
3563d95
Fix typo in Tic-Tac-Toe tutorial (#6565)
t-hamano Jan 21, 2024
4886261
Fix regex lookback crashing older browsers (#6571)
rickhanlonii Jan 22, 2024
98d0f56
add Noah Lemen to team page (#6576)
noahlemen Jan 23, 2024
85653a3
Update alumni (#6577)
rickhanlonii Jan 23, 2024
e33ec30
add upcoming conferences (#6573)
lero62 Jan 24, 2024
5bc1d26
Add useFormState permalink arg (#6402)
sophiebits Jan 26, 2024
5964bfa
conferences: Add Epic Web Conf (#6584)
kentcdodds Jan 26, 2024
1ab7108
Add guiding note (#6501)
smith558 Jan 27, 2024
30f23d7
fix(footer-social-icon): Vertical alignment of social icon (#6579) (#…
muhammadhafijur Jan 28, 2024
5d2f710
Remove unused variables (#6574)
smith558 Jan 28, 2024
adb958a
[Conferences] Add React Conf, order upcoming conferences by date (#6596)
mattcarrollcode Feb 1, 2024
ca98764
[Tutorial] Fix Sandbox download instructions to match current interfa…
victorferreira Feb 1, 2024
f96c528
Add form templates (#6592)
josephsavona Feb 1, 2024
b07fe2e
Tweak getting started guide (#6597)
rickhanlonii Feb 1, 2024
be8668c
removed Unnecessary Horizontal Scrollbar in Learn Section - Reacting …
saranyasri-s Feb 1, 2024
6ca0381
Update conferences.md (#6598)
dhairyadwivedi Feb 1, 2024
8ba8772
Initial Float docs for hoistable/semantic elements (#6486)
davidmccabe Feb 2, 2024
2372ecf
Initial docs for DOM static resource loading functions (#6459)
davidmccabe Feb 2, 2024
47c818c
feat (conferences) add react connection Paris (#6609)
Feb 5, 2024
c118938
Fix SandpackWithHTMLOutput to use src dir (#6613)
mattcarrollcode Feb 6, 2024
9a843b6
Add React Conf banner (#6595)
mattcarrollcode Feb 8, 2024
6d43bff
Fix scrollbar of SidebarNav to make it tappable (#6586)
tamonmon0417 Feb 10, 2024
6ae9922
Update index.md (#6622)
drex44 Feb 11, 2024
4ff80a5
Fix broken link (#6619)
lakshmi930 Feb 11, 2024
d46c360
Fix CSS discrepancy in issue #6508 (#6509)
hidaviddong Feb 11, 2024
bb3a0f5
Fix some typos (#6478)
romain-trotard Feb 11, 2024
007eef3
merging all conflicts
react-translations-bot Feb 12, 2024
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
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/0-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "🐛 Report a bug"
description: "Report a problem on the website."
title: "[Bug]: "
labels: ["bug: unconfirmed"]
body:
- type: textarea
attributes:
label: Summary
description: |
A clear and concise summary of what the bug is.
placeholder: |
Example bug report:
When I click the "Submit" button on "Feedback", nothing happens.
validations:
required: true
- type: input
attributes:
label: Page
description: |
What page(s) did you encounter this bug on?
placeholder: |
https://react.dev/
validations:
required: true
- type: textarea
attributes:
label: Details
description: |
Please provide any additional details about the bug.
placeholder: |
Example details:
The "Submit" button is unresponsive. I've tried refreshing the page and using a different browser, but the issue persists.
validations:
required: false
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/1-typo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "🤦 Typo or mistake"
description: "Report a typo or mistake in the docs."
title: "[Typo]: "
labels: ["type: typos"]
body:
- type: textarea
attributes:
label: Summary
description: |
A clear and concise summary of what the mistake is.
placeholder: |
Example:
The code example on the "useReducer" page includes an unused variable `nextId`.
validations:
required: true
- type: input
attributes:
label: Page
description: |
What page is the typo on?
placeholder: |
https://react.dev/
validations:
required: true
- type: textarea
attributes:
label: Details
description: |
Please provide a explanation for why this is a mistake.
placeholder: |
Example mistake:
In the "useReducer" section of the "API Reference" page, the code example under "Writing a reducer function" includes an unused variable `nextId` that should be removed.
validations:
required: false
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/2-suggestion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "💡 Suggestions"
description: "Suggest a new page, section, or edit for an existing page."
title: "[Suggestion]: "
labels: ["type: documentation"]
body:
- type: textarea
attributes:
label: Summary
description: |
A clear and concise summary of what we should add.
placeholder: |
Example:
Add a new page for how to use React with TypeScript.
validations:
required: true
- type: input
attributes:
label: Page
description: |
What page is this about?
placeholder: |
https://react.dev/
validations:
required: false
- type: textarea
attributes:
label: Details
description: |
Please provide a explanation for what you're suggesting.
placeholder: |
Example:
I think it would be helpful to have a page that explains how to use React with TypeScript. This could include a basic example of a component written in TypeScript, and a link to the TypeScript documentation.
validations:
required: true
116 changes: 116 additions & 0 deletions .github/ISSUE_TEMPLATE/3-framework.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: "📄 Suggest new framework"
description: "I am a framework author applying to be included as a recommended framework."
title: "[Framework]: "
labels: ["type: framework"]
body:
- type: markdown
attributes:
value: |
## Apply to be included as a recommended React framework
_This form is for framework authors to apply to be included as a recommended [React framework](https://react.dev/learn/start-a-new-react-project). If you are not a framework author, please contact the authors before submitting._
Our goal when recommending a framework is to start developers with a React project that solves common problems like code splitting, data fetching, routing, and HTML generation without any extra work later. We believe this will allow users to get started quickly with React, and scale their app to production.
While we understand that many frameworks may want to be featured, this page is not a place to advertise every possible React framework or all frameworks that you can add React to. There are many great frameworks that offer support for React that are not listed in our guides. The frameworks we recommend have invested significantly in the React ecosystem, and collaborated with the React team to be compatible with our [full-stack React architecture vision](https://react.dev/learn/start-a-new-react-project#which-features-make-up-the-react-teams-full-stack-architecture-vision).
To be included, frameworks must meet the following criteria:
- **Free & open-source**: must be open source and free to use.
- **Well maintained**. must be actively maintained, providing bug fixes and improvements.
- **Active community**: must have a sufficiently large and active community to support users.
- **Clear onboarding**: must have clear install steps to install the React version of the framework.
- **Ecosystem compatibility**: must support using the full range of libraries and tools in the React ecosystem.
- **Self-hosting option**: must support an option to self-host applications without losing access to features.
- **Developer experience**. must allow developers to be productive by supporting features like Fast Refresh.
- **User experience**. must provide built-in support for common problems like routing and data-fetching.
- **Compatible with our future vision for React**. React evolves over time, and frameworks that do not align with React’s direction risk isolating their users from the main React ecosystem over time. To be included on this page we must feel confident that the framework is setting its users up for success with React over time.
Please note, we have reviewed most of the popular frameworks available today, so it is unlikely we have not considered your framework already. But if you think we missed something, please complete the application below.
- type: input
attributes:
label: Name
description: |
What is the name of your framework?
validations:
required: true
- type: input
attributes:
label: Homepage
description: |
What is the URL of your homepage?
validations:
required: true
- type: input
attributes:
label: Install instructions
description: |
What is the URL of your getting started guide?
validations:
required: true
- type: dropdown
attributes:
label: Is your framework open source?
description: |
We only recommend free and open source frameworks.
options:
- 'No'
- 'Yes'
validations:
required: true
- type: textarea
attributes:
label: Well maintained
description: |
Please describe how your framework is actively maintained. Include recent releases, bug fixes, and improvements as examples.
validations:
required: true
- type: textarea
attributes:
label: Active community
description: |
Please describe your community. Include the size of your community, and links to community resources.
validations:
required: true
- type: textarea
attributes:
label: Clear onboarding
description: |
Please describe how a user can install your framework with React. Include links to any relevant documentation.
validations:
required: true
- type: textarea
attributes:
label: Ecosystem compatibility
description: |
Please describe any limitations your framework has with the React ecosystem. Include any libraries or tools that are not compatible with your framework.
validations:
required: true
- type: textarea
attributes:
label: Self-hosting option
description: |
Please describe how your framework supports self-hosting. Include any limitations to features when self-hosting. Also include whether you require a server to deploy your framework.
validations:
required: true
- type: textarea
attributes:
label: Developer Experience
description: |
Please describe how your framework provides a great developer experience. Include any limitations to React features like React DevTools, Chrome DevTools, and Fast Refresh.
validations:
required: true
- type: textarea
attributes:
label: User Experience
description: |
Please describe how your framework helps developers create high quality user experiences by solving common use-cases. Include specifics for how your framework offers built-in support for code-splitting, routing, HTML generation, and data-fetching in a way that avoids client/server waterfalls by default. Include details on how you offer features such as SSG and SSR.
validations:
required: true
- type: textarea
attributes:
label: Compatible with our future vision for React
description: |
Please describe how your framework aligns with our future vision for React. Include how your framework will evolve with React over time, and your plans to support future React features like React Server Components.
validations:
required: true
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
contact_links:
- name: 📃 Bugs in React
url: https://github.com/facebook/react/issues/new/choose
about: This issue tracker is not for bugs in React. Please file React issues here.
- name: 🤔 Questions and Help
url: https://reactjs.org/community/support.html
about: This issue tracker is not for support questions. Please refer to the React community's help and discussion forums.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"retext": "^7.0.1",
"retext-smartypants": "^4.0.0",
"rss": "^1.2.2",
"tailwindcss": "^3.3.2",
"tailwindcss": "^3.4.1",
"typescript": "^4.0.2",
"unist-util-visit": "^2.0.3",
"webpack-bundle-analyzer": "^4.5.0"
Expand Down
Binary file added public/images/team/noahlemen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/Icon/IconGitHub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const IconGitHub = memo<JSX.IntrinsicElements['svg']>(
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1.33em"
height="1.33em"
width="1.5em"
height="1.5em"
viewBox="0 -2 24 24"
fill="currentColor"
{...props}>
Expand Down
24 changes: 24 additions & 0 deletions src/components/Icon/IconThreads.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/

import {memo} from 'react';

export const IconThreads = memo<JSX.IntrinsicElements['svg']>(
function IconThreads(props) {
return (
<svg
aria-label="Threads"
viewBox="0 0 192 192"
height="1.40em"
width="1.40em"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
{...props}>
<path
className="x19hqcy"
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>
</svg>
);
}
);
8 changes: 4 additions & 4 deletions src/components/Layout/Feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ function SendFeedback({onSubmit}: {onSubmit: () => void}) {
return (
<div
className={cn(
'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',
'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',
{exit: isSubmitted}
)}>
<p className="w-full font-bold text-primary dark:text-primary-dark text-lg me-4">
<p className="w-full text-lg font-bold text-primary dark:text-primary-dark 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 me-2"
className="px-3 rounded-lg bg-secondary-button dark:bg-secondary-button-dark text-primary dark:text-primary-dark me-2"
onClick={() => {
setIsSubmitted(true);
onSubmit();
Expand All @@ -84,7 +84,7 @@ function SendFeedback({onSubmit}: {onSubmit: () => void}) {
{!isSubmitted && (
<button
aria-label="No"
className="bg-secondary-button dark:bg-secondary-button-dark rounded-lg text-primary dark:text-primary-dark px-3"
className="px-3 rounded-lg bg-secondary-button dark:bg-secondary-button-dark text-primary dark:text-primary-dark"
onClick={() => {
setIsSubmitted(true);
onSubmit();
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export function Footer() {
<FooterLink href="https://opensource.fb.com/legal/terms/">
Terms
</FooterLink>
<div className="flex flex-row mt-8 gap-x-2">
<div className="flex flex-row items-center mt-8 gap-x-2">
<ExternalLink
aria-label="React on Facebook"
href="https://www.facebook.com/react"
Expand Down
18 changes: 9 additions & 9 deletions src/components/Layout/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
'grid grid-cols-only-content lg:grid-cols-sidebar-content 2xl:grid-cols-sidebar-content-toc'
)}>
{showSidebar && (
<div className="lg:-mt-16">
<div className="lg:pt-16 fixed lg:sticky top-0 start-0 end-0 py-0 shadow lg:shadow-none">
<div className="lg:-mt-16 z-10">
<div className="fixed top-0 py-0 shadow lg:pt-16 lg:sticky start-0 end-0 lg:shadow-none">
<SidebarNav
key={section}
routeTree={routeTree}
Expand All @@ -143,7 +143,7 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
<Suspense fallback={null}>
<main className="min-w-0 isolate">
<article
className="break-words font-normal text-primary dark:text-primary-dark"
className="font-normal break-words text-primary dark:text-primary-dark"
key={asPath}>
{content}
</article>
Expand All @@ -153,14 +153,14 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
isHomePage && 'bg-wash dark:bg-gray-95 mt-[-1px]'
)}>
{!isHomePage && (
<div className="mx-auto w-full px-5 sm:px-12 md:px-12 pt-10 md:pt-12 lg:pt-10">
<div className="w-full px-5 pt-10 mx-auto sm:px-12 md:px-12 md:pt-12 lg:pt-10">
{
<hr className="max-w-7xl mx-auto border-border dark:border-border-dark" />
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
}
{showSurvey && (
<>
<div className="flex flex-col items-center m-4 p-4">
<p className="font-bold text-primary dark:text-primary-dark text-lg mb-4">
<div className="flex flex-col items-center p-4 m-4">
<p className="mb-4 text-lg font-bold text-primary dark:text-primary-dark">
How do you like these docs?
</p>
<div>
Expand All @@ -178,7 +178,7 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
</ButtonLink>
</div>
</div>
<hr className="max-w-7xl mx-auto border-border dark:border-border-dark" />
<hr className="mx-auto max-w-7xl border-border dark:border-border-dark" />
</>
)}
</div>
Expand All @@ -193,7 +193,7 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
</div>
</main>
</Suspense>
<div className="-mt-16 hidden lg:max-w-xs 2xl:block">
<div className="hidden -mt-16 lg:max-w-custom-xs 2xl:block">
{showToc && toc.length > 0 && <Toc headings={toc} key={asPath} />}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Layout/SidebarNav/SidebarNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ export default function SidebarNav({
}}>
<aside
className={cn(
`lg:grow flex-col w-full pb-8 lg:pb-0 lg:max-w-xs z-10 hidden lg:block`
`lg:grow flex-col w-full pb-8 lg:pb-0 lg:max-w-custom-xs z-10 hidden lg:block`
)}>
<nav
role="navigation"
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)
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">
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">
{/* No fallback UI so need to be careful not to suspend directly inside. */}
<Suspense fallback={null}>
<SidebarRouteTree
Expand Down
Loading
Loading