Extra Printing Options — Alternatives
A-01: Protobuf allow_alias for display-name support
Section titled “A-01: Protobuf allow_alias for display-name support”Considered: Using protobuf’s option allow_alias = true to add alternative enum constants (e.g., CARD_QUARTER_INDEX = 5 alongside CARD_SIZE_EXTRA_SMALL = 5) so the existing parser would accept them without code changes.
Rejected: Display names like “3 x 5 - Large QR Code” contain spaces and special characters that cannot be protobuf identifiers. Only underscore-based names could be aliased this way, which doesn’t solve the requirement.
A-02: Modify parseScalar directly without configuration
Section titled “A-02: Modify parseScalar directly without configuration”Considered: Hardcoding alias maps inside the parseScalar ENUM branch or the Parser class.
Rejected: This couples alias definitions to the parsing infrastructure. The configuration-driven approach (valueAliases in csv-import.json) follows the established pattern for header aliases and allows non-code changes for future alias additions.
A-03: LARGE_QR as a dedicated enum value
Section titled “A-03: LARGE_QR as a dedicated enum value”Considered: Adding LARGE_QR as its own enum value for the “3 x 5 - Large QR Code” card template.
Rejected: The SPECIAL_01–SPECIAL_10 slot approach provides 10 extensible positions per category for future custom templates without requiring enum changes. LARGE+QR maps to SPECIAL_01 for cards, preserving the flexibility.
A-04: Separate activeTemplates configuration file
Section titled “A-04: Separate activeTemplates configuration file”Considered: Storing the active flag in a separate JSON file rather than adding it to PrintingTemplateConfiguration.
Rejected: Keeping active alongside template, columns, and description in pdf-templates.json keeps the configuration self-contained. The active field defaults to true for backwards compatibility.
Copyright: (c) Arda Systems 2025-2026, All rights reserved
Copyright: © Arda Systems 2025-2026, All rights reserved