Show spinner when starting document capture before Acuant script loaded#4113
Merged
Show spinner when starting document capture before Acuant script loaded#4113
Conversation
**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
zachmargolis
approved these changes
Aug 24, 2020
app/javascript/packages/document-capture/components/acuant-capture-canvas.jsx
Outdated
Show resolved
Hide resolved
**Why**: More sensible to return empty value rather than (almost certainly broken) original path
**Why**: Readability
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
Imagecomponent was removed and replaced with an equivalentuseAsset().getAssetPathhook utility.Screenshot: