From 27796851f36f4c72c8f624d289d8c1a4ce596a4e Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Sat, 24 Oct 2026 18:08:46 -0400 Subject: [PATCH] feat(desktop): build releases in a panel beside the Drawing Sets lists The modal release dialog is replaced by ReleasePanel, docked beside the Library and Sets tabs and shared by both. A double-click or Enter adds a set at one kit or a library drawing on its own at the entered quantity; adding one already listed adds to its quantity. Lines are edited in place with a remove button, and the nests it will make preview live. Each group now merges into a matching Draft nest by default: the only one, or the most recently saved of several (chosen in the row); a draft open in a tab blocks Make Nests instead of making a parallel nest. Nest after release is remembered per user. Edit Set and Edit Drawing move to their buttons and right-click menus. The Drawing Sets window is now an unowned top-level window with its own taskbar entry and remembered bounds, closed with the main window; a release not yet made survives closing it, and Make Nests brings the main window forward. ReleaseSetForm remains as a thin dialog host for releasing from Nest > Add from Drawing Library. Co-Authored-By: Claude Opus 5.5 --- .../Forms/SetReleaseFormsTests.cs | 1177 +++++++++-------- OpenNest/Controls/DrawingLibraryView.cs | 84 +- .../Controls/DrawingSetBrowser.Designer.cs | 33 +- OpenNest/Controls/DrawingSetBrowser.cs | 109 +- OpenNest/Controls/GridStyle.cs | 6 +- OpenNest/Controls/ReleasePanel.Designer.cs | 468 +++++++ OpenNest/Controls/ReleasePanel.cs | 1128 ++++++++++++++++ OpenNest/Controls/SetReleasesView.Designer.cs | 2 +- OpenNest/Controls/SetReleasesView.cs | 45 +- OpenNest/Forms/DrawingSetsForm.Designer.cs | 38 +- OpenNest/Forms/DrawingSetsForm.cs | 97 +- OpenNest/Forms/MainForm.File.cs | 36 +- OpenNest/Forms/MainForm.cs | 10 +- OpenNest/Forms/MainWindowSettings.cs | 35 + OpenNest/Forms/ReleaseSetForm.Designer.cs | 582 +------- OpenNest/Forms/ReleaseSetForm.cs | 1122 +--------------- OpenNest/Properties/Settings.Designer.cs | 53 + OpenNest/Properties/Settings.settings | 12 + docs/nest-storage.md | 192 +-- 19 files changed, 2843 insertions(+), 2386 deletions(-) create mode 100644 OpenNest/Controls/ReleasePanel.Designer.cs create mode 100644 OpenNest/Controls/ReleasePanel.cs diff --git a/OpenNest.WinForms.Tests/Forms/SetReleaseFormsTests.cs b/OpenNest.WinForms.Tests/Forms/SetReleaseFormsTests.cs index fdd66aa5..500d87e6 100644 --- a/OpenNest.WinForms.Tests/Forms/SetReleaseFormsTests.cs +++ b/OpenNest.WinForms.Tests/Forms/SetReleaseFormsTests.cs @@ -6,7 +6,7 @@ using OpenNest.Forms; using OpenNest.IO; using OpenNest.Shapes; using OpenNest.Tests.Data; -using DrawingSetBrowser = OpenNest.Controls.DrawingSetBrowser; +using ReleasePanel = OpenNest.Controls.ReleasePanel; namespace OpenNest.WinForms.Tests.Forms; @@ -16,7 +16,7 @@ public class SetReleaseFormsTests private static readonly TimeSpan TestTimeout = TimeSpan.FromSeconds(60); [Fact] - public void Release_CreatesOneDraftNestPerTickedGroup_OpensEach_AndRecordsTheRelease() + public void MakeNests_CreatesOneDraftNestPerTickedGroup_OpensEach_AndRecordsTheRelease() { StaTestThread.Run( () => @@ -30,42 +30,53 @@ public class SetReleaseFormsTests var set = CreateSet(sets, (a, 2), (b, 1), (c, 4), (old, 1)); var nests = new MemoryNests(); var opened = new List<(Nest Nest, NestRecord Record)>(); - var questions = new List(); + var nestsOpened = 0; - using var form = new ReleaseSetForm(sets, library, nests, Server, set, (nest, record) => opened.Add((nest, record))); - form.ShowMessage = (text, _, _) => { questions.Add(text); return DialogResult.OK; }; - var created = 0; - form.CreateNest = (group, _) => Task.FromResult(new Nest($"N26-{++created:D4}") { Units = group.Units }); - form.Show(); - var grid = Field(form, "groupGrid"); - var skipped = Field