department-of-veterans-affairs / va-mobile-library

https://department-of-veterans-affairs.github.io/va-mobile-library/
ISC License
0 stars 0 forks source link

[Feature] Add script to extract SVGs from VADS sprite sheet #329

Closed narin closed 1 month ago

narin commented 1 month ago

Description of Change

Adds a script that takes VADS sprite sheet and extracts individual icons from it. Having this script allows us to keep the latest version of component-library as a dev dependency, but extracts only the icons instead of including the entire 3mb package. We will have to run this any time VADS's sprite.svg changes.

Also adds the latest set of extracted icons to the repo.

Tested on all platforms by bringing in the accessibility_new icon that was extract from the sprite sheet.

Testing Packages

0.5.1-alpha.3

Screenshots/Video

iOS

Android

Screenshot 2024-05-21 at 12 59 55 PM

Testing

PR Checklist

Code reviewer validation:

Publish

If changes warrant a new version per the versioning guidelines and the PR is approved and ready to merge:

TimRoe commented 1 month ago

Not certain it's a problem and even if it is not sure we can do anything about it from our side, but the way GitHub is displaying some of the new icons has me concerned about potential invisible whitespace between the SVG viewBox and the size of the actual vector drawn image* which would cause unexpected downsizing when trying to use them in the Icon component. Just wanted to document the concern.

*Based on inconsistent gaps between visible size and the box around it--looking back at an old PR I know the icons are good for the padding appears consistent regardless of icon dimensions while icons like accessibility_new.svg and accessible_forward.svg do not relative to others in the PR.

narin commented 1 month ago

Added component-library to devDependencies. De-duplication and removal of old icons was discussed in stand-up as mentioned and will be handled in #255.