Skip to content

Improve Brush Graph Test Canvas#86

Open
maxmmitchell wants to merge 8 commits into
mainfrom
color-picker-confusion
Open

Improve Brush Graph Test Canvas#86
maxmmitchell wants to merge 8 commits into
mainfrom
color-picker-confusion

Conversation

@maxmmitchell

Copy link
Copy Markdown
Contributor

Add a few quality of life fixes to the test canvas in brush graph that have been on my plate for awhile.

  • Fix the color picker so it doesn't look so much like a checkbox. Instead, use the palette icon on top of a circle icon reflecting the current color. Icon is light/dark based on luminescence of the color selected, which is a good heuristic that helps it be more readable.
  • Give the color picker "standard" colors when first opened to pick from, in addition to the custom color selector. This is helpful for precision when trying to see what brushes look like across various changes, with exactly the same color values. It's quicker than typing in a hex and is also just handy for changing colors fast in general.
  • Add the ability to adjust the size of the test canvas by dragging up. Still can collapse it as normal, and it remembers how large it should be when it opens back up.
  • Expose the maskPath parameter on InProgressStrokes composable via DrawingSurface so that we can hide strokes drawn on the non-expanded parts of test canvas. While we're at it, fix a long standing bug that allowed wet/in progress strokes to be visible atop the inspector/notification pane if it was expanded over the test canvas.
  • Fix misc. formatting issues/warnings that I noticed while making these edits.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a resizable and draggable preview pane in the Brush Graph screen, allowing users to dynamically adjust its height. It also implements masking logic to exclude inspector and notification pane bounds from the drawing surface, updates the color picker to a dropdown menu, and cleans up unused parameters and imports. The review feedback highlights several optimization opportunities, including avoiding coroutine churn during drag gestures, preventing static list re-allocations inside the dropdown menu, and bypassing empty mask path creation. Additionally, minor maintainability improvements are suggested, such as removing an unused local variable and simplifying an unused callback.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread app/src/main/java/com/example/cahier/developer/brushgraph/ui/BrushGraphScreen.kt Outdated
Comment thread app/src/main/java/com/example/cahier/developer/brushgraph/ui/BrushGraphScreen.kt Outdated
Comment thread app/src/main/java/com/example/cahier/developer/brushgraph/ui/TestCanvas.kt Outdated
Comment thread app/src/main/java/com/example/cahier/developer/brushgraph/ui/TestCanvas.kt Outdated
@maxmmitchell maxmmitchell marked this pull request as ready for review July 6, 2026 19:48
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