Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Abolfazl Rezvani Naraqi authored Feb 18, 2024
2 parents e0c5b80 + d5814c0 commit 8e53c6b
Show file tree
Hide file tree
Showing 155 changed files with 3,931 additions and 1,493 deletions.
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.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 dir="rtl">
نسخه فارسی <a href="https://reactjs.dev/">reactjs.dev</a>
نسخه فارسی <a href="https://react.dev/">react.dev</a>
</h1>

<p dir="rtl">
Expand All @@ -9,14 +9,14 @@

<p dir="rtl">
این مخزن کد (repo) با هدف توسعه اسناد ری‌اکت به زبان فارسی، از
<a href="https://github.com/reactjs/reactjs.dev">reactjs/reactjs.dev</a>
<a href="https://github.com/reactjs/react.dev">reactjs/react.dev</a>
انشعاب (fork) گرفته‌است و پیوسته با نسخه اصلی همگام‌سازی می‌شود.
</p>

<p dir="rtl">
نسخه فارسی اسناد ری‌اکت را در
<a href="https://fa.reactjs.org/" target="_blank">
fa.reactjs.org
<a href="https://fa.react.dev/" target="_blank">
fa.react.dev
</a>
ببینید.
</p>
Expand All @@ -26,17 +26,17 @@
<p dir="rtl">پیشنهاد می‌شود به‌ترتیب از لینک‌های زیر شروع کنید:</p>
<ul dir="rtl">
<li>
<a href="https://github.com/reactjs/fa.reactjs.org/blob/master/CONTRIBUTING.md">
<a href="https://github.com/reactjs/fa.react.dev/blob/master/CONTRIBUTING.md">
راهنمای مشارکت‌کنندگان
</a>
</li>
<li>
<a href="https://github.com/reactjs/fa.reactjs.org/blob/master/STYLE-GUIDE.md">
<a href="https://github.com/reactjs/fa.react.dev/blob/master/STYLE-GUIDE.md">
شیوه نگارش
</a>
</li>
<li>
<a href="https://github.com/reactjs/fa.reactjs.org/blob/master/TRANSLATION.md">
<a href="https://github.com/reactjs/fa.react.dev/blob/master/TRANSLATION.md">
واژه‌نامه
</a>
</li>
Expand Down Expand Up @@ -84,7 +84,7 @@ git clone https://github.com/reactjs/fa.react.dev.git
# ۳. به شاخه اصلی پروژه بروید

```bash
cd fa.reactjs.org
cd fa.react.dev
```

# ۴. وابستگی‌های npm پروژه را نصب کنید
Expand All @@ -109,7 +109,7 @@ yarn dev
<h3 dir="rtl">سوالی دارید؟</h3>

‌<p dir="rtl">
اگر سوالی دارید با نگاه‌دارندگان تماس بگیرید یا <a href="https://github.com/reactjs/fa.reactjs.org/issues/new">یک موضوع (issue) جدید</a> ثبت کنید!
اگر سوالی دارید با نگاه‌دارندگان تماس بگیرید یا <a href="https://github.com/reactjs/fa.react.dev/issues/new">یک موضوع (issue) جدید</a> ثبت کنید!

</p>

Expand Down Expand Up @@ -260,15 +260,15 @@ yarn dev
</table>
<p dir="rtl">
اسم شما فراموش شده‌است؟‌
<a href="https://github.com/reactjs/fa.reactjs.org/issues/new">
<a href="https://github.com/reactjs/fa.react.dev/issues/new">
به ما تذکر دهید!
</a>
</p>

<h2 dir="rtl">مجوز</h2>

<p dir="rtl">
محتوایی که در <a href="https://reactjs.org/">reactjs.org</a> قرار می‌گیرد، تخت
محتوایی که در <a href="https://react.dev/">react.dev</a> قرار می‌گیرد، تخت
مجوز CC-BY-4.0 منتشر می‌شود که جزئیات آن د
<a href="https://github.com/open-source-explorer/reactjs.org/blob/master/LICENSE-DOCS.md">
LICENSE-DOCS.md
Expand Down
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
47 changes: 44 additions & 3 deletions plugins/remark-smartypants.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Based on 'silvenon/remark-smartypants'
* https://github.com/silvenon/remark-smartypants/pull/80
*/

const visit = require('unist-util-visit');
const retext = require('retext');
const smartypants = require('retext-smartypants');
Expand All @@ -9,12 +14,48 @@ function check(parent) {
}

module.exports = function (options) {
const processor = retext().use(smartypants, options);
const processor = retext().use(smartypants, {
...options,
// Do not replace ellipses, dashes, backticks because they change string
// length, and we couldn't guarantee right splice of text in second visit of
// tree
ellipses: false,
dashes: false,
backticks: false,
});

const processor2 = retext().use(smartypants, {
...options,
// Do not replace quotes because they are already replaced in the first
// processor
quotes: false,
});

function transformer(tree) {
visit(tree, 'text', (node, index, parent) => {
if (check(parent)) node.value = String(processor.processSync(node.value));
let allText = '';
let startIndex = 0;
const textOrInlineCodeNodes = [];

visit(tree, ['text', 'inlineCode'], (node, _, parent) => {
if (check(parent)) {
if (node.type === 'text') allText += node.value;
// for the case when inlineCode contains just one part of quote: `foo'bar`
else allText += 'A'.repeat(node.value.length);
textOrInlineCodeNodes.push(node);
}
});

// Concat all text into one string, to properly replace quotes around non-"text" nodes
allText = String(processor.processSync(allText));

for (const node of textOrInlineCodeNodes) {
const endIndex = startIndex + node.value.length;
if (node.type === 'text') {
const processedText = allText.slice(startIndex, endIndex);
node.value = String(processor2.processSync(processedText));
}
startIndex = endIndex;
}
}

return transformer;
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.
Loading

0 comments on commit 8e53c6b

Please sign in to comment.