From e9fcd1e598e205554096b7a469e35ecc0f8150be Mon Sep 17 00:00:00 2001 From: cproudlock Date: Fri, 21 Aug 2026 11:55:36 -0400 Subject: [PATCH] Stop a caption from eating the barcode, and put the labels beside the settings Reported as the CODE128 not appearing in the preview. It was appearing, in 44 of the 45 preset and layout combinations swept - as a 36 pixel stub. The code box and the caption were both allowed to grow, so a caption of any length took half the label and then kept taking, and on 1.00 x 0.50in stock a few words of caption left a barcode too narrow to scan. Present, useless, and indisinguishable from a failed render. The caption now takes the room it needs and no more, and a CODE128 holds at least 40% of the label, or all of it when stacked: past that there are too few narrow bars left to read, and a caption that wraps or clips is the better trade. So that a real failure can never again look like this one, an empty code box now says so in red in the preview. It is screen-only - the marker must never reach a printed label. The settings were a narrow column with the preview trailing below them, which put the labels being adjusted off the bottom of the screen. Settings on the left, labels on the right in a column that stays in view and scrolls on its own, folding back to one column on a narrow window. That scrolling column is a print hazard worth naming: an ancestor with its own overflow clips a multi-page print to whatever happened to be on screen. Print resets it, and the check is a six-page two-sided run coming out as six pages with the label as the only clipping box in the chain. --- CHANGELOG.md | 16 ++ .../tools/frontend/views/CodeGenerator.vue | 159 ++++++++++++++---- 2 files changed, 141 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36aa13c..354e991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,14 @@ ADR-007 and ADR-002. ### Fixed +- **A caption could eat the barcode.** The code box and the caption both grew, + so any caption took half the label and kept going: "BAY 12 PRESS LINE 1" on + 1.00 x 0.50in stock left a 36px stub, which is a code that is present, + unscannable, and reads as one that failed to render. The caption now takes + only the room it needs and a CODE128 keeps at least 40% of the label, all of + it when stacked. A code that genuinely fails to render says so in the preview + now, in red, rather than leaving white space that looks like a label with no + code on it. - **The generator prints from inside the app shell.** It was a full-screen route with no sidebar and a narrow column of controls on the left. It is now an ordinary page - navigation, full width - and `style.css` hides the shell at @@ -64,6 +72,14 @@ ADR-007 and ADR-002. ### Changed +- **Settings on the left, labels on the right.** The controls were a narrow + column with the preview trailing underneath, so the labels being adjusted were + off the bottom of the screen. The preview is now a column of its own that + stays in view and scrolls by itself, and it folds back to one column on a + narrow window. Note for anyone changing it: that scrolling column is exactly + the kind of ancestor that clips a multi-page print to whatever was on screen, + so print resets its overflow - verified by printing a six-page two-sided run, + not by looking at the preview. - CSV parsing and page building moved out of the generator component into `plugins/tools/frontend/labelPages.js`, where the column contract and the two-sided page order are covered by tests. diff --git a/plugins/tools/frontend/views/CodeGenerator.vue b/plugins/tools/frontend/views/CodeGenerator.vue index 78fb6a6..9782956 100644 --- a/plugins/tools/frontend/views/CodeGenerator.vue +++ b/plugins/tools/frontend/views/CodeGenerator.vue @@ -1,12 +1,13 @@