RedMadRobot / figma-export

Command line utility to export colors, typography, icons and images from Figma to Xcode / Android Studio project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for iPad idiom when exporting images / icons

lichin-lin opened this issue Β· comments

πŸš€ Feature request

Sometime, Designer might want to have a different kind of image show up for iPad platform compare to iPhone platform
for example: different size / different color or shape...etc

will it be possible to support this feature for iOS, so the developer can see something like this (idiom shows either iphone or ipad instead of universal):

ζˆͺεœ– 2020-10-20 上午11 05 04

πŸ’‘ Possible solution

To achieve the feature, we can use some kind of naming convention, I suggest that we can make designer control the idioms by using the ~ tilde symbol:

ζˆͺεœ– 2020-10-20 上午11 08 36

as the image shows, we can combine them into same imageset when parsing, and note different idiom in content.json.

with this tilde naming convention, I think there will be more flexibility for image / icons to show up for different platform.

Hi @subdan, would like to know if there will be any update relative to this feature request, or is there anything I can help with πŸ™‚

Hi. I’m busy right now. I plan to make this feature in November.
Do you know Swift?

we've look into how the process worked in (AssetsProcessor.swift), it is quite hard to add grouping feature (img/some-img, img/some-img~ipad,...) in with current architecture.

We might need to modify the struct in Image.swift, (for example, add basename and idiom Property) which seems will make too much changes πŸ˜“