Skip to content

Swap the default placement order of Fill and Stroke nodes in layers#3789

Merged
Keavon merged 1 commit intomasterfrom
fill-after-stroke
Feb 19, 2026
Merged

Swap the default placement order of Fill and Stroke nodes in layers#3789
Keavon merged 1 commit intomasterfrom
fill-after-stroke

Conversation

@Keavon
Copy link
Member

@Keavon Keavon commented Feb 19, 2026

Now the Fill, which is the more commonly needed option and the one that takes up less vertical space due to its simpler set of parameters, appears above Stroke in the Properties panel which helps avoid the confusion of accidentally setting the Stroke color when intending to set the Fill color.

@gemini-code-assist
Copy link

Summary of Changes

Hello @Keavon, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience by modifying the default sequence in which Fill and Stroke properties are applied to newly created layers. By prioritizing Fill, which is generally more frequently used and has a simpler set of parameters, the change aims to reduce potential user confusion and accidental misconfigurations when interacting with the Properties panel.

Highlights

  • Default Node Order: Reordered the default creation and application of Fill and Stroke nodes, ensuring Fill is processed before Stroke in new layers.
  • Tool Behavior Updates: Updated various drawing tools (Freehand, Path, Pen, Shape, Spline) to align with the new Fill-then-Stroke application order for consistency.
  • Text Node Initialization: Adjusted the insert_text function to correctly initialize Fill and Stroke nodes after the text node, maintaining the desired order.
Changelog
  • editor/src/messages/portfolio/document/graph_operation/utility_types.rs
    • Reordered the insertion of Fill and Stroke nodes within insert_transform_layer to place Fill first.
    • Adjusted the order of Fill, Stroke, and Transform node creation and insertion in insert_text.
  • editor/src/messages/tool/tool_messages/freehand_tool.rs
    • Swapped the order of apply_fill and apply_stroke calls during freehand layer creation.
  • editor/src/messages/tool/tool_messages/path_tool.rs
    • Reordered the StrokeSet and FillSet graph operation messages for pasted geometry to apply stroke before fill.
  • editor/src/messages/tool/tool_messages/pen_tool.rs
    • Reversed the application order of apply_fill and apply_stroke for new pen tool layers.
  • editor/src/messages/tool/tool_messages/shape_tool.rs
    • Moved the apply_stroke call to occur earlier in the shape creation process.
    • Removed a duplicate apply_stroke call.
  • editor/src/messages/tool/tool_messages/spline_tool.rs
    • Changed the sequence of apply_fill and apply_stroke calls for new spline layers.
  • node-graph/nodes/math/src/lib.rs
    • Added a #[default(1)] attribute to the max parameter of the clamp function.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/build-linux-bundle.yml
Activity
  • No activity to report on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@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 successfully swaps the default placement order of Fill and Stroke nodes in various tools, ensuring the Fill option appears above Stroke in the UI. This is a good UX improvement. The changes are consistent across freehand_tool, path_tool, pen_tool, and spline_tool.

I've also noticed a bug fix in shape_tool.rs where a duplicate call to apply_stroke was removed, which is a great improvement.

I have one comment about a change in node-graph/nodes/math/src/lib.rs that seems unrelated to the scope of this PR.

@Keavon Keavon merged commit 258748e into master Feb 19, 2026
5 checks passed
@Keavon Keavon deleted the fill-after-stroke branch February 19, 2026 21:15
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

Comments