react-qr-scanner icon indicating copy to clipboard operation
react-qr-scanner copied to clipboard

ROADMAP v1.0

Open kybarg opened this issue 5 years ago • 12 comments

This modules popularity is growing, and while currently it satisfies need of my use case, I can see that some people struggle to integrate this into their project. So I want to define goals for V1, where everyone could be happy😊 Work can be tracked at next branch

Progress

  • [x] ~~Minimize dependencies, WebRTC-adapter is optional #34~~
  • [x] ~~Turn camera off when unmounting component #34~~
  • [x] ~~Add ability to pass plain constraints to component #34~~
  • [x] ~~Camera scanner as separate component #34~~
  • [ ] Legacy image scanner as separate component
  • [ ] Enable/disable processing swithch (?)
  • [ ] Full mobile devices support (?)
  • [ ] TypeScript typings
  • [ ] Demo and documentation
  • [ ] React 16 support

kybarg avatar Nov 21 '19 01:11 kybarg

Hello

It would be good to add more documentation:

  • why iOS should use legacymode, how to handle it with code
  • CSP (Content Security Policy) header needs to allow Blob WebWorkers (worker-src blob:)
  • FP (Feature Policy) header needs to allow camera (camera 'self')

Thank you.

Indigo744 avatar Nov 21 '19 11:11 Indigo744

May I suggest a few more things?

  1. Add TypeScript typing
  2. Add an enabled boolean option which allow to easily enable/disable image processing

I am willing to help if needed. Let me know.

Indigo744 avatar Nov 21 '19 11:11 Indigo744

@kybarg Has any progress been made on adding an enabled boolean?

jaysella avatar Apr 25 '20 22:04 jaysella

is the project abandoned?

alagiz avatar Sep 19 '20 14:09 alagiz

As this lib is relatively simple and I like it a lot, I'll be contributing on the roadmap to the v1.0

I just ask patience because I'm relatively new on contributing to libs, so I may code the features on a non-orderly manner

pedropalhari avatar Sep 23 '20 14:09 pedropalhari

Just quick ping on @kybarg, is it okay if I use this repo as an issue/feature tracker? If so, could you enable labels to the issues?

pedropalhari avatar Sep 24 '20 18:09 pedropalhari

Hi @pedropalhari I was looking your updates on your new repo, I was wondering, could you update the legacy-mode example with hooks too please? I'm kind of lost with this library.

rdelrioge avatar Dec 09 '20 00:12 rdelrioge

Hi @pedropalhari I was looking your updates on your new repo, I was wondering, could you update the legacy-mode example with hooks too please? I'm kind of lost with this library.

Hi @rdelrioge! I updated the hooks but it wasn't accepted, you can check it out on this commit from this pull request! https://github.com/kybarg/react-qr-scanner/pull/31/commits/8944be9ee2ebd4970043ca69c8355b600635b6c1

I think it's not up to the requirements of the repo owner yet, but I haven't received feedback so feel free to use it as is for now.

pedropalhari avatar Dec 09 '20 02:12 pedropalhari

@pedropalhari @rdelrioge Sorry, don't have much time lately. Started refactoring on next branch . So please check it out. Leagacy mode is still in development. I see it as separate component, and then have component which will include normal and legacy mode. In that case both gonna be standalone components which is good for customization for the needs of your projects.

kybarg avatar Dec 09 '20 16:12 kybarg

@kybarg wonderful! This repo is a service to the community, no need to apologize. If you need something you can ping me up anytime.

pedropalhari avatar Dec 09 '20 17:12 pedropalhari

Hi @pedropalhari @kybarg I think I made it work with hooks with this code

import React, { useState, useRef } from "react"
import QrReader from "react-qr-reader"

function Reader() {

const reader = useRef(null);
const [code, setCode] = useState("");

const handleScan = (data) => {
	setCode(data);
};

const handleError = (err) => {
	console.error(err);
};

const openImageDialog = () => {
	reader.current.openImageDialog();
};

return (
	<div>
		<QrReader
			ref={reader}
			onError={handleError}
			onScan={handleScan}
			legacyMode
		/>
		<button onClick={openImageDialog}>Sumbit a QR Code</button>
		<p>{code}</p>
	</div>
);
}

export default Reader;

rdelrioge avatar Dec 11 '20 04:12 rdelrioge

Do you plan a typescript migration for typing support? Or just a .d.ts file? I could deal with a typescript migration.

FedeBev avatar Apr 21 '21 12:04 FedeBev