gruhn / vue-qrcode-reader

A set of Vue.js components for detecting and decoding QR codes.
https://gruhn.github.io/vue-qrcode-reader
MIT License
2.03k stars 330 forks source link

feat: migrate to vue 3 #343

Closed dargmuesli closed 12 months ago

dargmuesli commented 1 year ago

Resolves #203.

Uses Typescript, Vite and Vitepress. Uses ~@undecaf/barcode-detector-polyfill~ @sec-ant/barcode-detector

gruhn commented 1 year ago

Really cool thanks. Is the demo page deployed somewhere, so I can test it?

dargmuesli commented 1 year ago

Now it is: https://dargmuesli.github.io/vue-qrcode-reader/ :partying_face:

gruhn commented 1 year ago

But all in all, really cool so far. Vitepress really looks much nicer. And also dark mode for free 👍

I also noticed that the "visual tracking" works slightly different on the new demo page. Essentially "outline" works like "bounding box" now:

Screenshot 2023-06-01 at 13 39 50 Screenshot 2023-06-01 at 13 40 29
dargmuesli commented 1 year ago

Thank you for the feedback! You got all the little things I was not sure about :wink: I will dive deeper later :)

dargmuesli commented 1 year ago

Not sure why the outline now behaves like a bounding box now :joy: haven't looked into this implementation yet, but will do so later, as promised :)

Edit: Ahh, I think I have a general idea where this could stem from.

dargmuesli commented 1 year ago

Now that barcode-detector is used again, the outline is shown correctly again. I kept @undecaf/barcode-detector-polyfill only as devdependency to provide types for typescript.

gruhn commented 1 year ago

Another difference I noticed is the "Scan Same QR Code More Than Once" demo. On detection, it's supposed to pause the stream and show a transparent-white overlay with a green checkmark in the center:

https://gruhn.github.io/vue-qrcode-reader/demos/ScanSameQrcodeMoreThanOnce.html

But here container just seems to collapse to zero height:

https://dargmuesli.github.io/vue-qrcode-reader/demos/ScanSameQrcodeMoreThanOnce.html

dargmuesli commented 1 year ago

ScanSameQrcodeMoreThanOnce.html fixed! :raised_hands:

dargmuesli commented 1 year ago

@gruhn what do you think about my changes? :)

gruhn commented 1 year ago

Haven’t had time to further look into it deeply yet, sorry

gruhn commented 12 months ago

Alright, I'm gonna merge this bad boy. Thanks for all the work!