Replace metrics-graphics with Observable Plot
Maintainer antworten meist innerhalb von 8 Tagen
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- d3, javascript
- Bereich
- data-visualization, frontend
Rechercherichtung
Read docs/execplans/2026-11-05-observable-plot-charts.md first; it contains the plan and decision log for replacing metrics-graphics with @observablehq/plot. Then inspect Chart.test.jsx and the chart entry point to understand existing rendering and tests. Done means the charts retain the listed appearance and behavior, the three deliberate visitor-facing changes work, and the end-to-end tests still pass.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Line charts on data.firefox.com are drawn by metrics-graphics 2.15.6, which is abandoned. Its last stable release is from 2019.
Replace it with Observable Plot (@observablehq/plot), a maintained charting library from the d3 authors, built on d3 7.
Alternatives considered:
- Plain d3 modules. No new dependency, but we'd own all the hover, legend, and marker code ourselves.
- Chart.js. It draws to canvas, so every Playwright assertion on chart SVG would need rewriting.
- The metrics-graphics 3.0 beta. Unmaintained, and it breaks the 2.x API anyway.
Plot draws SVG like metrics-graphics does, so the end-to-end tests keep working on lines and strokes. It also renders in jsdom, so Chart.test.jsx can assert on the drawn chart instead of on an options object.
What changes for visitors
The charts should look the same: lines, colors and order (including generated colors past 11 populations), the legend, annotation markers, y-axis bounds and units, the shaded area on single-line charts, axis lines, and the hover readout. Three changes are deliberate:
- Charts no longer animate when they redraw.
- Clicking a chart pins the hover readout until the next click. This is built into Plot.
- A metric with no plottable data shows "No data to show for this metric." instead of "Load error".
What a prototype showed
- Resizing the hardware dashboard (#409) through five widths went from about 55 s to 0.56 s in Chromium, and from 67 s to 0.72 s in Firefox. That's most of #409's complaint, though the unthrottled resize listener is still there.
- The lazy chart chunk shrank from 492 kB to 265 kB (154 kB to 90 kB gzipped).
- d3 v4 and its nested
d3-transitionare gone, and thed3-coloradvisory with them.
The plan and its decision log are in docs/execplans/2026-11-05-observable-plot-charts.md on the branch for this work.
Related
- #409: hardware dashboard is slow to resize. Largely addressed by this change.
- #339: lines connect points across gaps in the data. Still happens after this change, but Plot makes it straightforward to fix (see the comment there).
- Vorherrschende Sprache
- JavaScript
- Sterne
- 21
- Forks
- 7
- Ø Merge
- 7 T. 3 Std.
- Gemergte PRs (30 T.)
- 4
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus mozilla/ensemble
-
Fira Sans is still usedOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 8 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
Maintainer antworten meist innerhalb von 8 Tagen
-
Add analytics.Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
Maintainer antworten meist innerhalb von 8 Tagen
-
Make a deploy pipelineOffen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 10/100
Maintainer antworten meist innerhalb von 8 Tagen
-
Update the Firefox logo in the faviconEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 8 Tagen
Alle Issues in mozilla/ensemble
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
postcss/postcss.org#302 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
ImranR98/apps.obtainium.imranr.dev#2000 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
microsoft/monaco-editor#5577 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Ebony-Vinyl/dsh-our-free-model#785 ·
Maintainer antworten meist innerhalb von 1 Tag