plotly / plotly/plotly.js

Plotly.react leaves duplicate clippaths

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

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

bug P2
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
28

説明

const container = document.createElement('div');
document.body.appendChild(container);
await Plotly.newPlot(container, [], { title: 'abc' });
await Plotly.react(container, [], { title: 'hello' });

The resulting DOM contains multiple copies of the same clippath:

<clippath class="plotclip" id="clipc001dfxyplot">
  <rect height="270" width="540" />
</clippath>
...
<clippath class="plotclip" id="clipc001dfxyplot">
  <rect height="270" width="540" />
</clippath>

This is causing issues for our accessibility tests, which check that IDs are unique within the document, but in some cases the newer clippath is different (but still shares the same ID), so presumably the items which reference it could pick up an old value and therefore render incorrectly after an update.

(using Plotly 2.24.3)

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

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

はじめの一歩

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

調査の方向性

Issue 内の最小再現から始め、Plotly.newPlot と Plotly.react の後の DOM を比較し、plotclip clippaths がどこで作成または保持されるかを追跡します。更新されたプロットに重複した clippath ID がなく、更新後に要素が意図した clippath を参照していれば完了です。

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

評価

技術スタック
javascript
領域
data-visualization
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

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

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