Repository navigation
feat(printer-settings): add modal with Tab 1 (Media & Feed) - #104
Merged
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new Printer Settings modal allowing users to configure hardware and feed settings, which are emitted as pure ZPL commands (^MN, ^ML, ^MF, ^XB). It includes UI components, state management in the label store, multi-language localization updates, ZPL generator/parser support, and comprehensive unit tests. The review feedback focuses on improving the robustness of the ZPL parser in zplParser.ts by using parsed parameters instead of raw strings for ^MN and ^ML commands, adding optional chaining to prevent potential runtime errors in the ^MF parser, and simplifying the WIP tab check in PrinterSettingsModal.tsx.
First slice of the Printer Settings Modal epic. Ships the modal shell (vertical tab rail, instant-apply semantics, ZPL-command annotation per field) plus Tab 1 content covering four ZPL commands that the editor previously could not author: ^MN media tracking (continuous / web / mark / auto) ^ML max label length (dots) ^MF media feed (action at power up + after head close) ^XB suppress backfeed (toggle) Distinctive design move: every field label carries a small monospace ZPL-command tag docked right. Users see exactly which command each control emits, turning the modal into a discoverable spec reference without crowding the form. Layout: vertical tab rail (scales to N tabs, mirrors the Properties-Panel column-of-sections feel) with an active row indicator (▸ + orange accent + left border). Tabs 2 to 5 render an honest "coming soon" placeholder so the navigation tells the truth about scope. Modal shell uses the existing DialogShell (focus trap, body scroll lock, ARIA labelling, ESC + click-outside close) and renders via portal so the backdrop covers the full viewport. Persistence: all four fields write to the existing labelConfig store (no new printer-config store) so designs round-trip without a migration step and the Properties-Panel slim-down follow-up can simply move the panel's existing printer fields into the modal without re-plumbing storage. Parser + generator: header section in zplGenerator emits the four commands after the existing ^MM/^MT block. The corresponding parser handlers write to labelConfig and trim whitespace around positional params so `^MFF,L\n^XB` resolves both ^MF slots. Locales: new `printerSettings` block in all 32 locales (DE + EN curated by hand, the other 30 translated by a subagent run through the extended `update_locale_value.local.py`). Tests: emit + parser roundtrip coverage for each command, plus edge cases for out-of-range ^MN values and non-positive ^ML.
u8array
force-pushed
the
feat/printer-modal-tab1-media-feed
branch
from
May 29, 2026 14:19
1e70512 to
d6dd048
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.