reactjs / reactjs/react.dev

Explore adding top-level "API" link to header nav

オープン
#171 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

difficulty: medium discussion type: documentation type: website
主要言語
JavaScript
スター
11.8k
フォーク
7.9k
平均マージ
1日 11時間
マージ済み PR(30日)
11

説明

This discussion thread on Twitter provided feedback that the reference section of the docs may not be very discoverable due to the new website's accordion sidebar.

@gaearon proposed we could do something similar to what Jest does and add an "API" link to the header that directly opens the first page of the reference section (eg React Top-Level API).

Unfortunately this is a little more complicated than it would seem at a glance because of:

Unfortunately we can't rely on anything dynamic (like markdown frontmatter tags) to help with the "active" link styling because the header and footer are part of the "static" Gatsby layout. (Technically we could move them into the templates but this doesn't seem ideal.)

We could move reference docs into a new folder (eg "content/api") give them a unique URL prefix (eg "/api") but we'd need to leave backwards-compatible redirects (eg redirect_from like here) in place so that no bookmarked links were broken. This would also require separating "Docs" and "API" sidebar structure.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

src/components/LayoutHeader/Header.js と content/docs 構造から始め、現在アクティブなヘッダーリンクがどのように決定されているかを確認します。提案されている /api の移動、redirect_from などのリダイレクト、独立したサイドバー構造を比較します。API ヘッダーリンクでリファレンスセクションを開け、既存のリンクやアクティブなナビゲーションのスタイルを壊さなければ完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, react
領域
documentation, frontend, web-dev
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。