Version 2.2.7 (see comment for list of changes) #575
Merged
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.
Version 2.2.7
Add support for custom CSS
Developer / User Story: As a developer I can write custom CSS for
Html5QrcodeScanner
.Feature request: Issue#389
List of CSS class and IDs added.
html5-qrcode-element
. This way developers can customise element by element. For example:Key elements are:
src/ui/scanner/base.ts
. This can be used to customise per elements.TODOs
Change file selection UI from
input
tobutton
Modified the UI a little to hide the file selection as input and replace with
custom button and javascript based solution.
One motivation here is this will allow more uniform style for the widget.
Graduate
useBarCodeDetectorIfSupported
toHtml5QrcodeConfigs
.useBarCodeDetectorIfSupported
was tested as an experimental configuration fora long time and has proven to be very efficient and well supported. It has been
tested in ScanApp for quiet some time.
Considering this experimental API is not well documented, it makes it hard for
folks to discover it. By graduating this configuration to
Html5QrcodeConfigs
Ihope to make it more discoverable.
In this version the
ExperimentalFeaturesConfig#useBarCodeDetectorIfSupported
has been marked deprecated but not removed due to backwards compatibility
reasons. Users can set either of them but
Html5QrcodeConfigs
one will takeprecedence if set.
Once further support is added to browsers, this can be set as true by default.
TODOS
Unit tests added and others fixed
Added unit tests that can run DOM based tests thanks to
jsdom
package.