reactjs / reactjs/react.dev

Indicate whether a link is external

未关闭
#1,609 4 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

localization
主要语言
JavaScript
星标
11.8k
派生
7.9k
平均合并
1 天 11 小时
30 天内合并 PR
11

描述

Related: #1605

React docs have lots of links to external articles, videos or even Stack Overflow questions. For example, the "Hello World" page has this:

Note This guide occasionally uses some of the newer JavaScript syntax in the examples. If you haven’t worked with JavaScript in the last few years, these three points should get you most of the way.

While this link is helpful to English speakers, it can easily disappoint readers of translated versions because many of them do not understand English well.

This can be especially unfriendly when they cannot reasonably guess whether the linked material is in English or not from its text or the context ("these points", "here", "said", "ES6 class", "weird bug" etc). Unfortunately, the current docs are full of instances like this.

In the long run, we can reduce the number of such confusing links, for example:

Note This guide occasionally uses some of the newer JavaScript syntax in the examples. If you haven’t worked with JavaScript in the last few years, the following article should get you most of the way.

But for the time being, I suggest indicating external links using an icon (e.g., 🌎) or a different color. It can signal the linked article is likely to be written in English. Maybe links to an MDN article can have a different icon because it usually has a translated version.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先检查 React 文档网站中各处链接的呈现方式,并阅读相关 issue #1605 以了解背景。盘点外部链接,包括 MDN 链接,并将以下情况定义为工作完成:读者无需依赖链接文本即可区分外部材料和内部链接。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, react
领域
accessibility, design, documentation
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。