Repository navigation
feat: Add a line interpolation display setting (smooth, linear, step) - #3393
Conversation
🦋 Changeset detectedLatest commit: f8daed3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryAdds smooth, linear, and step line interpolation across chart settings, the external API, and MCP.
Reviews (7) · Last reviewed commit: "review: Address review feedback" · Reviewed by Greptile |
E2E Test Results✅ All tests passed • 437 passed • 1 skipped • 1876s
Tests ran across 4 shards in parallel. |
🔴 Tier 4 — CriticalTouches authentication, tenancy data models, the public API or shipped database config — or substantially changes the query rendering engine, background tasks, the OTel pipeline, image build, or release CI. Why this tier:
Review process: Deep review from a domain expert. Synchronous walkthrough may be required. Stats
|
PR Review
2 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 2 minor 2 posted as inline comment(s) on the changed lines. Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
Deep Review✅ No critical issues found. The change is cleanly additive across common-utils, the external API (Zod + OpenAPI JSDoc + regenerated 🟡 P2 — recommended
🔵 P3 nitpicks (7)
Reviewers (8): correctness, testing, maintainability, api-contract, kieran-typescript, adversarial, previous-comments, project-standards. Testing gaps:
No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
60b4e8e to
54f8b1d
Compare
54f8b1d to
059492b
Compare
059492b to
d88d733
Compare
d88d733 to
d0fdce2
Compare
brandon-pereira
left a comment
There was a problem hiding this comment.
This looks good to me. My only feedback is small UX: maybe the SegmentedControl should be full width to match other element styles, and also, might be helpful to add a tooltip explaining each and why we provide the ability to customize
d0fdce2 to
f8daed3
Compare
|
|
||
| const isTimeChart = isTimeSeriesDisplayType(displayType); | ||
|
|
||
| const showLineInterpolation = |
There was a problem hiding this comment.
🔵 minor — Interpolation control disagrees with the chart when 'Compare to previous period' forces a line
DBTimeChart now always draws a plain Line when compareToPreviousPeriod is on (DBTimeChart.tsx:650), and MemoChart picks its curve with getLineCurveType(DisplayType.Line, …). This drawer still uses the form's saved displayType, and the editor can now save stacked types. The result: a stacked_line tile with compare on shows 'Linear' as the selected default but draws smooth (monotone) lines, and a stacked_bar tile with compare on draws a line but hides the interpolation control. Fix: work out the rendered display type once (Line when compare is on) and use it both for showLineInterpolation/getDefaultLineInterpolation here and in DBTimeChart. Another option is to pass the stored stacked type to getLineCurveType so the default matches.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
| {showLineInterpolation && ( | ||
| <Input.Wrapper | ||
| size="xs" | ||
| label={ |
There was a problem hiding this comment.
🔵 minor — Hand-built label-with-help-tooltip duplicates the existing InputLabelWithTooltip
packages/app/src/components/InputLabelWithTooltip.tsx already renders a label followed by an IconHelpCircle inside a Tooltip. Use label={<InputLabelWithTooltip label="Line interpolation" tooltip="…" />}, or extend it with a size prop, instead of the inline Group+Tooltip+IconHelpCircle (Code Organization → DRY, REQUIRED).
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
Summary
This PR adds a display setting for line chart interpolation mode. Smooth (default), Linear (default for stacked line charts), and step are options. This setting has been added across the UI, External API, and MCP.
This also fixes another small bug where selecting stacked bar or line chart type in the chart editor would not update the persisted tile's display type.
Screenshots or video
How to test on Vercel preview
On chart explorer or a dashboard, create a line or stacked line chart, and change the interpolation setting.
References