Replace metrics-graphics with Observable Plot
Maintainer thường phản hồi trong vòng 8 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- d3, javascript
- Lĩnh vực
- data-visualization, frontend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- JavaScript
- Star
- 21
- Fork
- 7
- Merge trung bình
- 7 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mozilla/ensemble
-
Fira Sans is still usedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 8 ngày
-
Do not show all data by defaultĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 8 ngày
-
Add analytics.Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 8 ngày
-
Make a deploy pipelineĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
Maintainer thường phản hồi trong vòng 8 ngày
-
Update the Firefox logo in the faviconCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 8 ngày
Tất cả issue của mozilla/ensemble
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
microsoft/monaco-editor#5575 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stringify escapes leading digits in pseudo-class arguments (:nth-child(1) becomes :nth-child(\31 ))Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
digitalbazaar/forge#1170 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày