Skip to content

Add a Polar Grid canvas-click dialog - #1192

Merged
bflatastic merged 2 commits into
storytold:mainfrom
FredApps:fix/polar-grid-click-dialog-20261011
Oct 12, 2026
Merged

bflatastic merged 2 commits into
storytold:mainfrom
FredApps:fix/polar-grid-click-dialog-20261011

Conversation

@FredApps

@FredApps FredApps commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What and why

A canvas click with the Polar Grid tool now opens the shared shape dialog, following the same path as Rectangular Grid. Width and Height default to 100 pt; Concentric Dividers and Radial Dividers use saved counts. Dimensions use the standard length widgets, and confirmation uses the existing shape.polarGrid shape and perspective route. Divider counts are saved through the shared grid handling.

This follows the maintainer's requested simplification: shared dialog registration, field ordering and capitalized labels, two focused behavioral tests, and catalog rows for the two new labels. The final diff is 16 files, +113/-4, with no progress-document edits.

Contributor credit @FredApps. Implementation and testing were AI-assisted with OpenAI.

How it was tested

Validated head: e9e59a2af0dd2df4cc55fc7ee52cb34b39061df9; base: 2ac3ba2b866ad9d34b2252dd8024f73e34f4b2b8; tree: 360c24c6ae4c9e4b1233f3728976e716418240f2.

  • Both focused behavioral tests failed on the baseline and passed on the candidate.
  • Focused suites passed: dialogs 22, Rectangular Grid 7, perspective 8, i18n 38, family 3, and engine drawing 35.
  • All seven local cargo xtask ci gates passed: 5,368 tests passed, zero failed, four ignored; 21 WASM packages passed.
  • Native acceptance passed for unit edits committed through the real widgets with Tab, undo/redo, cancel, repeated creation, perspective placement, and persistence after restart. Eleven principal captures were inspected using Xvfb and Vulkan software-rendered frames. Some harness attempts encountered mouse-focus reversion; those attempts are not claimed as passes. No hardware GPU coverage is claimed.

Hosted CI is separate from these local results. At the metadata update, the hosted affinity3 check was in progress; no hosted CI pass is claimed.

Checklist

  • cargo xtask ci passes (fmt, clippy, tests, assets, brands, layers, wasm), locally on the validated head above.
  • No new panics in shipped code: no new unwrap(), expect(), panic!, unreachable!, todo! or unimplemented! outside tests, and no new unchecked indexing on data from files, parameters or messages. Errors are returned as Result and shown to the user (why and how).
  • Clean-room: nothing copied from Adobe products or GPL/AGPL code (AGENTS.md).
  • Every new asset has a row in ASSETS.md (no new assets).

@FredApps
FredApps marked this pull request as ready for review October 11, 2026 14:56
@bflatastic

Copy link
Copy Markdown
Member

Thanks @FredApps. I'm holding this one until it's slimmed down the same way #1169 was.

#1169 (Rectangular Grid) is landing tonight on the shared shape-dialog path. With that in place, Polar Grid needs only a few lines on the same path, not a separate polar_grid.rs module plus 750 lines of tests:

  1. In dialogs/tools.rs, open polarGrid with width/height "100 pt" and the saved concentric/radial counts, as rectangularGrid does.
  2. In dialogs/form.rs, add polarGrid to lengths (width, height) and order, and label concentric/radial "Concentric Dividers:" and "Radial Dividers:" (capitalized like the other dialogs).
  3. In dialogs/shapes.rs, add polarGrid to the registry list, a title, and a confirm arm for shape.polarGrid. Save the counts the way the rectangularGrid arm does (one shared line for both grids is fine).
  4. Add one or two focused tests, plus catalog rows for the two new labels only.

Please also leave out the progress-doc edits (they conflict with main, and we update the docs in batches). Maintainer edits are off on this branch, so I can't rebase it or push the change myself. I'd be glad to merge the slim version.

@FredApps

FredApps commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor Author

@bflatastic Thanks for the input, it's all slimmed down now!

Reworked in e9e59a2 to use the existing shared shape dialog. The bespoke module and large test file are gone; the PR now has two focused tests, two translated labels and no progress-doc changes. Rectangular Grid behavior is preserved.

All seven local CI gates passed (5,368 tests, zero failures, four ignored), and native checks covered dimensions/units, saved counts, cancellation, repeated creation, undo/redo and perspective. Independent review cleared this exact head. The PR description has the exact validation details and limitations.

FredApps and others added 2 commits October 12, 2026 15:30
A click with the Polar Grid tool opens the shared shape dialog (width, height, concentric and
radial dividers), as the Rectangular Grid tool does, and keeps the divider counts as the tool's
options.
@bflatastic
bflatastic force-pushed the fix/polar-grid-click-dialog-20261011 branch from e9e59a2 to 62bf8c8 Compare October 12, 2026 08:39
@bflatastic
bflatastic merged commit a48ed5e into storytold:main Oct 12, 2026
1 check passed
@bflatastic

Copy link
Copy Markdown
Member

Thanks @FredApps, merged! The slimmed-down version on the shared shape dialog is exactly right.

What I did: squashed the branch into one commit of yours on current main (the catalog conflicts were only appended rows), and added Hungarian and Korean rows for the two labels in a commit on top, since both catalogs became complete in the meantime.

Checked: cargo xtask ci (all 7 steps), and in the running app: a click with the Polar Grid tool opens the dialog with the saved divider counts, OK draws the grid at the click, and the tool keeps only its two counts as options.

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