Our Assets are stored under GCS Bucket. Please follow the folder structure based on asset type.
Bucket Name:
ENV | Name |
---|---|
Dev | |
Stage | - |
Icons
https://www.figma.com/file/D4aezb42Jd62fImjDbR9uo/SaFi---UI---Library?node-id=11%3A61
Icons must be stored as SVG. And it must be stored like this gcs_bucket/icons/icon_name.svg
. We use script to generate the icon name and its enum name and path. Make sure you’re using the same name as FIGMA, but snakecase.
Scripts:
rename_script.sh
How To:
Download all icons in Figma
Extract the archive, and put rename_script inside and execute it.
It will create ui_kit folder contains all renamed icons. And upload these icons to
/icons
to GCS bucket.The script would have output like this:
Copy the output and reorder it ascending, and paste it to SafiIconName enum.
Images
Images can be stored as SVG or PNG. If we use PNG, make sure we upload the 1x, 2x and 3x resolution. And it should be stored like this:
Make sure you’re using the same name as FIGMA, but snakecase.
SVG: images/image_name.png
PNG:
1x: images/image_name.png
2x: images/2.0x/image_name.png
3x: images/3.0x/image_name.png
Avatars 32
Follow same rule as Images and bellow rules:
Make sure you’re using the same name as FIGMA, but snakecase.
SVG: images/avatars32/image_name.png
PNG:
1x: images/avatars32/image_name.png
2x: images/avatars32/2.0x/image_name.png
3x: images/avatars32/3.0x/image_name.png
Avatars 48
Follow same rule as Images and bellow rules:
Make sure you’re using the same name as FIGMA, but snakecase.
SVG: images/avatars48/image_name.png
PNG:
1x: images/avatars48/image_name.png
2x: images/avatars48/2.0x/image_name.png
3x: images/avatars48/3.0x/image_name.png
Avatars 64
Follow same rule as Images and bellow rules:
Make sure you’re using the same name as FIGMA, but snakecase.
SVG: images/avatars64/image_name.png
PNG:
1x: images/avatars64/image_name.png
2x: images/avatars64/2.0x/image_name.png
3x: images/avatars64/3.0x/image_name.png
Merchants
Follow same rule as Images and bellow rules:
Make sure you’re using the same name as FIGMA, but snakecase.
SVG: images/merchants/image_name.png
PNG:
1x: images/merchants/image_name.png
2x: images/merchants/2.0x/image_name.png
3x: images/merchants/3.0x/image_name.png
Attachments:
image-20220825-031855.png (image/png)
rename_script.sh (text/x-sh)
download-icons.gif (image/gif)
image-20220825-052422.png (image/png)
image-20220825-060223.png (image/png)
image-20220825-060509.png (image/png)
Screen Shot 2022-08-25 at 13.02.52.png (image/png)
image-20220825-060717.png (image/png)