WICG / WICG/shape-detection-api
Potentially support platform-specific formats in BarcodeFormat enum
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 316
- Forks
- 39
- Avg merge
- 8d 3h
- Merged PRs (30d)
- 1
Description
Currently, the specification provides "unknown" as a valid BarcodeFormat [1]. However, it doesn't make sense for a user to hint "unknown" in a BarcodeDetectorOptions, and returning "unknown" in getSupportedFormats doesn't (currently) make sense either.
One possibility proposed by @reillyeon is to convert "unknown" to "platform-specific", i.e. encompassing platform-supported formats unknown to the spec.
This could be passed back to the user, in getSupportedFormats or elsewhere, to indicate the platform supports more formats than expressed in the spec, and could be used by the user to include platform-specific formats in the hint in addition to spec-known formats.
[1] https://wicg.github.io/shape-detection-api/#dom-barcodeformat-unknown
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the BarcodeFormat definition in the linked Shape Detection API specification, then read the sections for BarcodeDetectorOptions and getSupportedFormats. Determine whether the proposed platform-specific value should replace unknown and how it behaves in hints and returned formats; the issue is done only after the specification change is agreed and reflected consistently.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100