Open
Conversation
r0b1n
reviewed
Feb 13, 2026
packages/pluggableWidgets/barcode-generator-web/src/config/Barcode.config.ts
Outdated
Show resolved
Hide resolved
21331d1 to
086c244
Compare
r0b1n
reviewed
Feb 18, 2026
packages/pluggableWidgets/barcode-generator-web/src/components/Barcode.tsx
Outdated
Show resolved
Hide resolved
r0b1n
reviewed
Feb 18, 2026
packages/pluggableWidgets/barcode-generator-web/src/components/preview/BarcodePreview.tsx
Outdated
Show resolved
Hide resolved
r0b1n
previously approved these changes
Feb 20, 2026
b4fd0d2 to
cc9350c
Compare
r0b1n
reviewed
Mar 11, 2026
| // Validate barcode value at runtime | ||
| const validationResult = validateBarcodeValue(format, value); | ||
| if (!validationResult.valid) { | ||
| const errorMsg = validationResult.message || "Invalid barcode value"; |
Collaborator
There was a problem hiding this comment.
If it errored out, message should be always present, validateBarcodeValue should responsible for that.
You can make it type safe by doing something like:
export type ValidationResult =
| {
valid: true;
}
| {
valid: false;
message: string;
};
Collaborator
There was a problem hiding this comment.
Also looks like validateBarcodeValue accepts string as format, make it accept a defined set of formats based on xml typings, not just any string.
r0b1n
reviewed
Mar 11, 2026
| import { LogLevelEnum } from "../../typings/BarcodeGeneratorProps"; | ||
|
|
||
| export const useRenderBarcode = (): RefObject<SVGSVGElement | null> => { | ||
| function printError(message: string, logLevel: LogLevelEnum) { |
Collaborator
There was a problem hiding this comment.
This feels out of place, make it live in a separate file
r0b1n
reviewed
Mar 11, 2026
| size: number; | ||
| title: string; | ||
| level: QrLevelEnum; | ||
| image?: { |
Collaborator
There was a problem hiding this comment.
Call it overlay to be consistent with xml properties
r0b1n
reviewed
Mar 11, 2026
| buttonPosition: "top" | "bottom"; | ||
| } | ||
|
|
||
| type codeType = "barcode" | "qrcode"; |
- remove unnecessary context, use props instead - split config, make it more typed - add class and style to the widget - remove unnecessary hooks, use simple utils instead - update icons and tiles
- hide ean128 for qrcode - change code value to expression - add button position and card view config - implement layout, styling and icon
- static value consistency checks - dynamic value warnings and runtime error alert
- enable displayValue for addons - improve conditional visibility for certain configurations - improve descriptions
- added svg assets for barcode preview - add asset resolver for image sources - encapsulate svg logic into hook - cleaner main preview component
- simplified preview DOM - removed redundant css classes - merged remaining preview styles into main stylesheet - renamed qr overlay property and css classes - updated tests error messages to check for new messages
- anchor changed to button - createad DownloadButton component - changed preview max height to 200px - change icon for structure preview - changed dynamic value description to generic - added configurable filename - error state recovery on revalidation
72b56bb to
c8ab7d4
Compare
c8ab7d4 to
296c529
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