From e66c2a701050f967cd5b3724ace6907546796d48 Mon Sep 17 00:00:00 2001 From: Marco Russo Date: Sun, 6 Sep 2026 00:18:24 +0200 Subject: [PATCH] Default a new setup to an editable 16:9 deck in reading order A setup that has never opened the Export dialog now starts from PowerPoint, one slide per area, reading order, widescreen, and Editable slides. Format, slides, and size were already those; order moves from drawing to reading, because it is predictable from the board alone, and content from Picture to Editable, because a deck is exported to be reworked more often than to be shown as is. Settings already saved are untouched. Co-Authored-By: Claude Fable 5.1 --- CHANGELOG.md | 4 ++-- docs/decisions.md | 7 +++++-- docs/export-decisions.md | 4 +++- docs/export.md | 12 +++++++----- src/SQLBI.Whiteboard.Core/Settings/ExportSettings.cs | 8 ++++---- tests/SQLBI.Whiteboard.Core.SmokeTests/Program.cs | 12 ++++++++++-- 6 files changed, 31 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aae73c6..50b4674 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,8 +38,8 @@ to be read by zooming, for a board that is one drawing. ### A deck you can rework **Slide content → Editable** puts images and text containers on the slide as PowerPoint objects, keeps the DAX and SQL colors as text runs, and lays all the ink over them as one -transparent picture. Picture, the default, stays exact; Editable is for a deck that will be -edited after the session. +transparent picture. It is the default; Picture, one choice away, is the exact rendering +for a deck that will be shown as is. ### PDF pages that stay sharp **Page content → Vector** draws the ink as paths and the text as text, so a page stays diff --git a/docs/decisions.md b/docs/decisions.md index 1677948..65fd95d 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -606,8 +606,11 @@ containers go in the speaker notes so DAX and SQL can still be copied. **Editabl other slide content: images as pictures, text containers as text boxes carrying the syntax colors the screen shows, and all the ink as one transparent picture on top, placed through the same camera the picture would have used. It is best effort where the picture -is exact, which is why the picture stays the default. Ink as freeform shapes was left -out: it would be a second stroke renderer to keep in step with the first. +is exact, and it is nonetheless the default for a new setup, because a deck is exported to +be reworked more often than to be shown as is; the picture is one choice away. Slides are +in reading order by default, for the same reason it is the order a reader would guess. +Ink as freeform shapes was left out: it would be a second stroke renderer to keep in step +with the first. `DocumentFormat.OpenXml` writes the deck and `PdfSharp` the PDF: Microsoft's own SDK and a long-lived MIT library, both managed-only, so they pass the tests decision 21 set for a diff --git a/docs/export-decisions.md b/docs/export-decisions.md index 448f6b2..a9d6888 100644 --- a/docs/export-decisions.md +++ b/docs/export-decisions.md @@ -73,7 +73,9 @@ which phase made it and why. ## E3 — Editable deck - **Slide content is a choice on the dialog, Picture or Editable**, shown for PowerPoint - only. Picture stays the default: it is exact, and Editable is best effort by design. + only. Editable is the default for a new setup, by the maintainers' call after trying + both: a deck is exported to be reworked more often than to be shown as is. Picture stays + one choice away for the exact rendering. - **Elements are placed in the picture's own pixel space.** The rasterizer exposes the camera it would have used, and every image, text box, and the ink overlay is mapped through it, so switching between the two modes moves nothing. diff --git a/docs/export.md b/docs/export.md index 70f132b..9d1ca6d 100644 --- a/docs/export.md +++ b/docs/export.md @@ -102,11 +102,13 @@ PowerPoint can zoom. Two orders are offered: -- **Drawing order** (default): areas sorted by the smallest z-index they contain. Since - z-index is creation order, this is the order in which the author started each area — the - order of the lecture. Bring to front and Send to back disturb it only for the container - they touched, which is rare and visible in the preview. -- **Reading order**: the cut-tree order, top-left to bottom-right. +- **Drawing order**: areas sorted by the smallest z-index they contain. Since z-index is + creation order, this is the order in which the author started each area — the order of + the lecture. Bring to front and Send to back disturb it only for the container they + touched, which is rare and visible in the preview. +- **Reading order** (default): the cut-tree order, top-left to bottom-right. The plan + proposed drawing order as the default; the maintainers chose reading order after using + both, because it is predictable from the board alone. ### Alternatives considered diff --git a/src/SQLBI.Whiteboard.Core/Settings/ExportSettings.cs b/src/SQLBI.Whiteboard.Core/Settings/ExportSettings.cs index 475021c..b2f63ab 100644 --- a/src/SQLBI.Whiteboard.Core/Settings/ExportSettings.cs +++ b/src/SQLBI.Whiteboard.Core/Settings/ExportSettings.cs @@ -73,7 +73,7 @@ public sealed class ExportSettings public ExportPageModel PageModel { get; set; } = ExportPageModel.OnePerArea; - public AreaOrder Order { get; set; } = AreaOrder.Drawing; + public AreaOrder Order { get; set; } = AreaOrder.Reading; public double GapThreshold { get; set; } = ExportLayoutOptions.DefaultGapThreshold; @@ -85,7 +85,7 @@ public sealed class ExportSettings public ExportSlideAspect SlideAspect { get; set; } = ExportSlideAspect.Wide; - public ExportSlideContent SlideContent { get; set; } = ExportSlideContent.Picture; + public ExportSlideContent SlideContent { get; set; } = ExportSlideContent.Editable; public ExportPageSize PageSize { get; set; } = ExportPageSize.A4; @@ -116,7 +116,7 @@ public static ExportSettings Normalize(ExportSettings? settings) if (!Enum.IsDefined(result.Order)) { - result.Order = AreaOrder.Drawing; + result.Order = AreaOrder.Reading; } if (!Enum.IsDefined(result.SlideAspect)) @@ -131,7 +131,7 @@ public static ExportSettings Normalize(ExportSettings? settings) if (!Enum.IsDefined(result.SlideContent)) { - result.SlideContent = ExportSlideContent.Picture; + result.SlideContent = ExportSlideContent.Editable; } if (!Enum.IsDefined(result.PageContent)) diff --git a/tests/SQLBI.Whiteboard.Core.SmokeTests/Program.cs b/tests/SQLBI.Whiteboard.Core.SmokeTests/Program.cs index e6cfc13..f5caec9 100644 --- a/tests/SQLBI.Whiteboard.Core.SmokeTests/Program.cs +++ b/tests/SQLBI.Whiteboard.Core.SmokeTests/Program.cs @@ -1306,12 +1306,20 @@ string SqlText(SqlServerClassifiedSpan span) => "Hit testing reaches a frame only by its edge."); exportBoard.RemoveObject(frame.Id); - var exportSettings = AppSettingsSerializer.Parse("""{ "export": { "gapThreshold": 9999, "smallestTextPoints": 11, "order": "Reading" } }"""); + var exportSettings = AppSettingsSerializer.Parse("""{ "export": { "gapThreshold": 9999, "smallestTextPoints": 11, "order": "Drawing" } }"""); Assert( exportSettings.Export.GapThreshold == ExportLayoutOptions.MaximumGapThreshold && exportSettings.Export.SmallestTextPoints == ExportLayoutOptions.DefaultSmallestTextPoints && - exportSettings.Export.Order == AreaOrder.Reading, + exportSettings.Export.Order == AreaOrder.Drawing, "Export settings are clamped to what the dialog offers."); + var freshExport = new AppSettings().Export; + Assert( + freshExport.Format == ExportFormat.PowerPoint && + freshExport.PageModel == ExportPageModel.OnePerArea && + freshExport.Order == AreaOrder.Reading && + freshExport.SlideAspect == ExportSlideAspect.Wide && + freshExport.SlideContent == ExportSlideContent.Editable, + "A new setup exports an editable 16:9 deck, one slide per area, in reading order."); } // PowerPoint deck: one slide per page, a notes slide only where there are notes,