Plotly.react leaves duplicate clippaths
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
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)
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der minimalen Reproduktion im Issue, vergleiche das DOM nach Plotly.newPlot und Plotly.react und verfolge, wo die plotclip clippaths erstellt oder beibehalten werden. Als abgeschlossen gilt die Arbeit, wenn der aktualisierte Plot keine doppelten clippath-IDs enthält und die Elemente nach dem Update auf die vorgesehene clippath verweisen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100