[BUG]: Sankey warning breaks in @plotly/d3-sankey v0.12.3
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- d3, javascript
調査の方向性
src/traces/sankey/render.js の 76-78 行付近にある警告から始め、アップグレードされた @plotly/d3-sankey v0.12.3 の padding API と、レイアウト後のノード位置を比較します。実効 padding をどのように検出すべきか、または警告を削除すべきかを解決し、診断動作がクランプされたレイアウトと一致することを検証します。
索引モデルが issue の本文から書いたものです。
説明
Description
The upgrade to @plotly/d3-sankey v0.12.3 (in #7830) will break the warning here:
if (sankey.nodePadding() < nodePad) {
Lib.warn('node.pad was reduced to ', sankey.nodePadding(), ' to fit within the figure.');
}
In @plotly/d3-sankey@0.7.x, calling sankey.nodePadding() after running the layout returned the effective (post-clamp) padding value. In 0.12.3 the getter returns the user-configured value instead, because upstream split the internal state into separate dy (configured) and py (effective) variables.
After the upgrade, sankey.nodePadding() always equals nodePad, so the comparison is never true and the warning never fires. The layout itself still clamps correctly - only the diagnostic is affected.
Notes
Options to address the issue:
- Remove the warning entirely
- Derive the effective padding from the laid-out node positions (e.g. measure the gap between consecutive nodes in the densest column)
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 28
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plotly/plotly.js のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
chore P1 plotly-internal size: 1 task
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
-
chore P3 plotly-internal size: 1 task
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug infrastructure P2
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
plotly/plotly.js の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Seeed-Studio/wiki-documents#5655 · コメント 2 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
capricorn86/happy-dom#2435 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
Edit: CW+ オープンchannels:edit check:passed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
01 type: bug 30 needs: triage 99 tag: UX Accessibility
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100