Skip to content

Add signal colors and axis drop overlays - #80

Merged
haoruizhou merged 2 commits into
mainfrom
data-downloader-multi-axis
Aug 29, 2026
Merged

Add signal colors and axis drop overlays#80
haoruizhou merged 2 commits into
mainfrom
data-downloader-multi-axis

Conversation

@haoruizhou

Copy link
Copy Markdown
Contributor

Introduces per-signal plot color overrides in analysis plots, including legend swatch color picking/reset and persistence through saved configs/local storage. Adds left/right axis drop overlay zones so dragged signals can be assigned directly to a target axis, and updates layout serialization to v2 while keeping backward compatibility with legacy v1 layouts.

Introduces per-signal plot color overrides in analysis plots, including legend swatch color picking/reset and persistence through saved configs/local storage. Adds left/right axis drop overlay zones so dragged signals can be assigned directly to a target axis, and updates layout serialization to v2 while keeping backward compatibility with legacy v1 layouts.
@haoruizhou
haoruizhou requested a balanced review from Copilot August 29, 2026 17:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

// Drag enter to reveal zones
fireEvent.dragEnter(card, { dataTransfer: dt });

const leftZone = screen.getByText(/left axis/i);

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5beb9dc2d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +213 to +214
const next = assignSignals(prev, signals, target);
if (axis === "right") {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clear right-axis membership on left-zone drops

When a signal that already has rightAxis membership is dropped on the left overlay, this path only calls assignSignals; that helper explicitly preserves moved signals' right-axis membership, so the signal still renders on the right axis even though the left zone was selected. Handle axis === "left" by removing the dropped signals from the target group's rightAxis.

Useful? React with 👍 / 👎.

start: new Date(viewRange[0]).toISOString(),
end: new Date(viewRange[1]).toISOString(),
plots: layoutToPlots(plots),
colors: Object.keys(colorOverrides).length > 0 ? colorOverrides : undefined,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Persist saved-view color overrides server-side

When saving a view with custom colors, this adds colors to the POST payload, but the backend does not currently accept or store that field: AnalysisConfigCreate only declares plots in backend/app.py:72-79, and AnalysisConfigsRepository.create_config writes no colors entry in backend/storage.py:240-249. With the pinned Pydantic v2 default of ignoring extra fields, the save still succeeds but listed/loaded configs omit the overrides, so reloading a saved view loses all color choices.

Useful? React with 👍 / 👎.

Adds optional `colors` support when creating analysis configs so color overrides are stored and returned by the backend. Also fixes plot-axis behavior in the workspace by clearing moved signals from `rightAxis` when they are reassigned to the left axis, preventing stale right-axis assignments after drag-and-drop. Includes endpoint/repo and frontend layout/component test updates for both behaviors.
@haoruizhou
haoruizhou merged commit db46c11 into main Aug 29, 2026
10 checks passed
@haoruizhou
haoruizhou deleted the data-downloader-multi-axis branch August 29, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants