woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
300 stars 109 forks source link

[Just in Time Messages] Add support for background images and badges specified in a JITM #9570

Closed joshheald closed 1 year ago

joshheald commented 1 year ago

Description

In order to make JITMs stand out more and avoid them becoming visual background noise, we want to be able to customise their appearance, not just their text content.

Anatomy of a JITM pointing out the `New` badge with `badge_image_url`, and the Background image with `background_image_url`

We should take account of various sizes using the @1x/@2x/@3x convention, and a -light -dark suffix, for full support of bitmap images. Ideally we'll be able to use SVGs instead which avoids all this, but the file sizes are punitive with the mixed vector/raster mode of our current designs.

Images should be cached, to avoid long loading times. When no image is specified, fall back to the existing background and don't show a badge.

joshheald commented 1 year ago

N.B. We decided to default to large scale (@3x) images, and scale down as required. We can add smaller-scale image support in future as required.

p1682670107969949-slack-C025A8VV728