Skip to content

Use animated ID card for doc auth loading interstitial#4003

Merged
aduth merged 4 commits intomasterfrom
aduth-id-card
Aug 3, 2020
Merged

Use animated ID card for doc auth loading interstitial#4003
aduth merged 4 commits intomasterfrom
aduth-id-card

Conversation

@aduth
Copy link
Copy Markdown
Contributor

@aduth aduth commented Aug 3, 2020

Why: The Clock icon was used as a temporary asset, and is not intended for use in the final design for this screen. An animation effect was added to the card to give the user the impression there is activity happening in the background, so that they aren't confused into thinking the process has stalled.

Screenshot:

loading screen

Live Demo:

loading card

cc @anniehirshman-gsa

@aduth
Copy link
Copy Markdown
Contributor Author

aduth commented Aug 3, 2020

From build failures:

Failures:

  1) SVG files /app/assets/images/id-card.svg does not contain inline style tags (that render poorly in IE due to CSP)
     Failure/Error: expect(doc.css('style')).to be_empty
       expected `[#<Nokogiri::XML::Element:0x2b226ba8e180 name="style" namespace=#<Nokogiri::XML::Namespace:0x2b226ba8...30deg) translate(0, 0) }\n    to { transform: rotate(30deg) translate(260px, -100px) }\n  }\n  ">]>].empty?` to return true, got false
     # ./spec/svg_spec.rb:13:in `block (4 levels) in <top (required)>'

I encountered this in browser testing, where the animation doesn't occur in Internet Explorer. But the card otherwise appears fine:

internet explorer card

I was inclined to put this under the category of "progressive enhancement", since the animation is only decorative. The sole purpose of the style tag is to initiate the animation, so it should gracefully degrade.

@aduth
Copy link
Copy Markdown
Contributor Author

aduth commented Aug 3, 2020

In f57a865, I add a mechanism to skip style validation for SVG with the explicit addition of a /* test-ignore */ comment.

Why: If there can be a justified reason that the style tag validation should be bypassed, a developer should be able to opt out via explicit override.

I also considered if the pattern should be something along the lines of /* test-ignore reason: ... */, to force the developer to justify their reasoning. I was a bit wary of this, since these files are artifacts that are shipped to users verbatim, and such comments are adding to download size for what should only be relevant for development purposes.

Copy link
Copy Markdown
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 and others added 4 commits August 3, 2020 11:55
**Why**: The Clock icon was used as a temporary asset, and is not intended for use in the final design for this screen. An animation effect was added to the card to give the user the impression there is activity happening in the background, so that they aren't confused into thinking the process has stalled.
**Why**: If there can be a justified reason that the style tag validation should be bypassed, a developer should be able to opt out via explicit override.
**Why**: More accurate as describing static analysis of our code quality checks

Co-Authored-By: Zach Margolis <zbmargolis@gmail.com>
**Why**: To avoid escaping forward slashes

Co-Authored-By: Zach Margolis <zbmargolis@gmail.com>
@aduth aduth merged commit 78a3119 into master Aug 3, 2020
@aduth aduth deleted the aduth-id-card branch August 3, 2020 16:23
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.

3 participants