Skip to content

Show spinner when starting document capture before Acuant script loaded#4113

Merged
aduth merged 4 commits intomasterfrom
aduth-acuant-capture-spinner
Aug 24, 2020
Merged

Show spinner when starting document capture before Acuant script loaded#4113
aduth merged 4 commits intomasterfrom
aduth-acuant-capture-spinner

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Aug 24, 2020

Why: Without feedback, the user may misinterpret the blank white fullscreen canvas as being broken, when in fact it is simply delayed by load of the Acuant SDK.

This would appear if the Acuant SDK is still loading by the time the user progresses to the document capture screen and starts capturing.

Implementation Notes:

To better support pixel-density variation of image assets, the existing Image component was removed and replaced with an equivalent useAsset().getAssetPath hook utility.

Screenshot:

Screen Shot 2020-08-24 at 1 53 01 PM

aduth added 2 commits August 24, 2020 13:45
**Why**: Asset mapping may be needed for additional image attributes like `srcset`, `sizes`, etc
**Why**: Without feedback, the user may misinterpret the blank white fullscreen canvas as being broken, when in fact it is simply delayed by load of the Acuant SDK
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

aduth added 2 commits August 24, 2020 15:26
**Why**: More sensible to return empty value rather than (almost certainly broken) original path
@aduth aduth merged commit b122bde into master Aug 24, 2020
@aduth aduth deleted the aduth-acuant-capture-spinner branch August 24, 2020 21:01
aduth added a commit that referenced this pull request Aug 24, 2020
**Why**: Image component was removed in #4113, should be updated to equivalent getAssetPath
aduth added a commit that referenced this pull request Aug 24, 2020
* Inline asset global assignment at document capture tag

**Why**: Outside development environment, precompilation of assets will compile JavaScript prior to images, at which time the digest for said images haven't yet been assigned, and the JavaScript assignment of asset paths is non-fingerprinted.

As temporary resolution, inline asset key assignment to document capture view, prior to the single occurrence of the script tag from which these assets are referenced.

* Update asset checker to check for getAssetPath

**Why**: Image component was removed in #4113, should be updated to equivalent getAssetPath

* Remove assets.js.erb

**Why**: Not currently used.

Updates tests accordingly to reference equivalent view where asset assignment occurs as inline script tag.

* Image to img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants