reactjs / reactjs/react-docgen

Nested type descriptions

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

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

lib new feature
主要言語
TypeScript
スター
3.8k
フォーク
316
平均マージ
5時間 7分
マージ済み PR(30日)
4

説明

Sorry if this has been reported before in some form before, but is there currently support for nested type descriptions? For example, given the following structure (using Flow and react-docgen@5.3.1):

type Panel = {
	/** Panel title */
	title: string,
	/** Panel content */
	content: string,
	/** Sublevels of more Panels */
	panels: Array<Panel>
};

type Props = {
	/** One or more toggleable Panels */
	panels: Array<Panel>
}

/** Hello World! */
const Component = (props: Props) => { ... }

^ Does not generate any description for the Panel -props. Is this intentional? The output for a Panel is:

{
	"name": "signature",
	"type": "object",
	"raw": "{ ... }",
	"signature": {
		"properties": [
			{
				"key": "title",
				"value": {
					"name": "string",
					"required": true
				}
			},
			{
				"key": "content",
				"value": {
					"name": "string",
					"required": true
				}
			},
			{
				"key": "panels",
				"value": {
					"name": "Array",
					"elements": [{ "name": "Panel" }],
					"raw": "Array<Panel>",
					"required": true
				}
			}
		]
	}
}

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

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

はじめの一歩

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

調査の方向性

まず、react-docgen@5.3.1 で issue の Flow 例を再現し、Panel の生成されたシグネチャを調べます。レポートにはソースファイルやテストが指定されていません。完了の条件は、生成された出力でネストされた Panel プロパティの説明が保持され、示された構造に対するカバレッジがあることです。

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

評価

技術スタック
react, typescript
領域
documentation, frontend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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