[WC-3448]: Add datamatrix option for Barcode Generation#2319
Draft
samuelreichert wants to merge 8 commits into
Draft
[WC-3448]: Add datamatrix option for Barcode Generation#2319samuelreichert wants to merge 8 commits into
samuelreichert wants to merge 8 commits into
Conversation
Adds the tree-shakeable bwip-js browser entry, the only maintained library with native GS1 Data Matrix support, for upcoming Data Matrix generation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds "Data Matrix" to the top-level barcode format and a new "Advanced Data Matrix Settings" group (GS1 mode toggle, square/rectangle shape, size). Regenerates the widget prop typings to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds DataMatrixTypeConfig to the BarcodeConfig union with a format === "DataMatrix" branch in barcodeConfig(), plus a DataMatrix value check and a loose GS1 Application Identifier syntax validator. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds DataMatrixRenderer as a third render path. Selects the bwip-js encoder by GS1 mode and shape (datamatrix / gs1datamatrix / *rectangular), renders inline SVG, and reuses the existing SVG->PNG download pipeline. Wires the dispatch in BarcodeGenerator and the download filename prefix for the datamatrix type. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Renders a representative Data Matrix glyph in the Studio Pro page editor when the Data Matrix format is selected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds config-mapping and validation unit tests plus render tests asserting encoder selection (plain vs GS1, rectangular) and the malformed-GS1 error path. Mocks bwip-js and adds the new required Data Matrix props to the shared test props builder. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Proposal, design, specs, and task checklist for adding Data Matrix and GS1 Data Matrix generation to the barcode generator widget. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
431b188 to
d9b57b4
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.
Pull request type
New feature (non-breaking change which adds functionality)
Description