web-widgets icon indicating copy to clipboard operation
web-widgets copied to clipboard

[WC-2405]: Add barcode format controls to prevent incorrect scanning

Open HedwigAR opened this issue 1 year ago • 1 comments

Pull request type

Bug fix (non-breaking change which fixes an issue)


Description

We found a case where a Code-39 code was recognized as a RSS-14 code instead. Since we support both of them and they do look very similar, we've added an option to be able to specify what formats should be recognized. Now the user can select if they want to be able to recognize all formats (this is the option that's enabled by default). If the user does not want this, they'll be able to specify only the codes they're expecting. This PR also includes a fix for scanning with the mask enabled, where it wasn't scanning the full resolution.

What should be covered while testing?

Testing should check whether it's still possible to recognize all barcode types when useAllFormats is set to Yes. Test should also check whether selecting specific formats is effective, and if this does exclude other codes from being recognized (aka, when only code-39 is selected it should no longer trigger on QR codes)

HedwigAR avatar Apr 08 '24 12:04 HedwigAR

Great PR and description BTW 👍

iobuhov avatar Apr 08 '24 12:04 iobuhov