RedMadRobot / figma-export

Command line utility to export colors, typography, icons and images from Figma to Xcode / Android Studio project
MIT License
726 stars 114 forks source link

Add support for iPad idiom when exporting images / icons #36

Closed lichin-lin closed 3 years ago

lichin-lin commented 3 years ago

πŸš€ 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.

lichin-lin commented 3 years ago

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 πŸ™‚

subdan commented 3 years ago

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

lichin-lin commented 3 years ago

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 πŸ˜“