patternfly / patternfly/patternfly-react

Bug - DataViewFilters - childrenHash from JSON.stringify results in cyclic object value

オープン
#12,536 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

主要言語
TypeScript
スター
862
フォーク
392
平均マージ
4日 8時間
マージ済み PR(30日)
9

説明

Describe the problem
When using DataViewFilters with a child DataViewCheckboxFilter where the options have a label with a component (e.g. with an icon), the calculation of childrenHash via JSON.stringify results in a JavaScript cyclic object value error.

How do you reproduce the problem?
Provide steps to reproduce. A codesandbox demonstrating the problem is appreciated.

Expected behavior
I expect to be able to use a React component in the option labels. The goal is to render select list with options having icons and possibly tool tips.

Is this issue blocking you?
Worked around this by creating a copy of DataViewFilters in our project with a stricter set of properties provided to JSON.stringify [1].

Screenshots
Desired component:

image

What is your environment?

  • OS: Fedora 43
  • Browser: Firefox
  • Version: 151

What is your product and what release date are you targeting?
StreamsHub Console [2] (user interface for Kafka clusters), planning to release in a week or so, likely with described work-around.

Any other information?
[1] https://github.com/MikeEdgar/streamshub-console/blob/418cb07cb05290e7d9be03ff67e39012d9b3095a/api/src/main/webui/src/components/common/DataViewFilters.tsx
[2] https://github.com/streamshub/console


Jira Issue: PF-4412

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

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

はじめの一歩

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

調査の方向性

DataViewFilters の実装から始め、リンクされた CodeSandbox を使って循環オブジェクト値を再現します。オプションラベルが React コンポーネントである子の DataViewCheckboxFilter を用意します。リンクされた回避策と動作を比較し、アイコンやツールチップを含むコンポーネントラベルが JSON.stringify エラーなしでレンダリングされることを確認します。

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

評価

技術スタック
react, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
58/100

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

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