Skip to content

New nodes: 'Gradient Type' and 'Spread Method', and add Gradient tool support for controlling these nodes#4084

Merged
Keavon merged 5 commits intomasterfrom
gradient-control-nodes
Apr 30, 2026
Merged

New nodes: 'Gradient Type' and 'Spread Method', and add Gradient tool support for controlling these nodes#4084
Keavon merged 5 commits intomasterfrom
gradient-control-nodes

Conversation

@Keavon
Copy link
Copy Markdown
Member

@Keavon Keavon commented Apr 30, 2026

This follows up #3989 by fixing document serialization, using separate nodes to set "gradient_type" and "spread_method" attributes, and making the Gradient tool control those attributes plus "transform". This way, gradient tables are no longer relied upon for serialization, as we don't serialize attributes. This PR also clean up the control bar for the Gradient tool and adds a gradient widget there.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 13 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the gradient system by decomposing the monolithic gradient table update into granular operations for stops, line endpoints, type, and spread method. It introduces new graph nodes (gradient_type and spread_method), updates the Gradient tool and Properties panel for better synchronization, and improves rendering stability for infinite backgrounds in SVG and Vello. Feedback suggests extracting a closure to reduce code duplication when calculating composed transforms in the utility types.

Comment thread editor/src/messages/portfolio/document/graph_operation/utility_types.rs Outdated
@Keavon Keavon merged commit 4b24302 into master Apr 30, 2026
11 checks passed
@Keavon Keavon deleted the gradient-control-nodes branch April 30, 2026 02:27
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.

1 participant