ContentPicker: invalid html
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript
- 領域
- frontend
調査の方向性
components/content-picker/PickedItem.tsx から始め、特にレポートで関連付けられている TreeGridRow と PickedItemContainer の構造を確認します。ContentPicker の search-items マークアップと WordPress TreeGrid のガイダンスを調べ、必要な table および ul の子構造を特定します。項目を追加したときに validateDOMNesting の警告なしで有効な HTML が生成されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
There will be Warning: validateDOMNesting(...): <div> cannot appear as a child of <tr>. in console, when adding items to ul.block-editor-link-control__search-items
This happens because the component uses <TreeGridRow><PickedItemContainer> -structure where <PickedItemContainer> is just div. See https://github.com/10up/block-components/blob/develop/components/content-picker/PickedItem.tsx#L27
TreeGrid and related components should be used in <TreeGrid><TreeGridRow><TreeGridCell> -structure, which will render valid html structure for <table>. See https://developer.wordpress.org/block-editor/reference-guides/components/tree-grid/
Also there is invalid html structure in the ul.block-editor-link-control__search-items element, which has div-element as children. This is not allowed according to the specs https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ul#technical_summary
Steps to Reproduce
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress information
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要言語
- TypeScript
- スター
- 330
- フォーク
- 54
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
10up/block-components のほかの issue
-
Repeater with allowReordering logs React key and isDragging warnings対応中かも @s3rgiosan が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
10up/block-components#419 · コメント 1 件 ·
-
ContentPicker SortableList logs a useSelect unstable value warning対応中かも @s3rgiosan が 5 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
10up/block-components#421 · コメント 1 件 ·
-
Subpath bundles duplicate PostContext, and the root import can't be tree-shaken対応中かも @fabiankaegy が 19 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
10up/block-components#417 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
10up/block-components#413 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
10up/block-components#412 ·
10up/block-components の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 87/100
メンテナーはふだん 1 日以内に返信
-
🛠️ dette technique
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
betagouv/mon-entreprise#4752 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
franciscoBSalgueiro/en-croissant#1111 ·
メンテナーはふだん 2 日以内に返信
-
area/providers type/feature version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
anomalyco/opencode#64845 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信