FirefoxUX / photon-icons

The design tokens for the Photon icons
Mozilla Public License 2.0
23 stars 13 forks source link

Import figma. #25

Closed bwinton closed 5 years ago

bwinton commented 6 years ago

I'm not sure if we want to use this, but at least now we've got a pull request for it. 😉

aminalhazwani commented 6 years ago

Can you tell me more how I can try this out @bwinton? So excited 🙌

bwinton commented 6 years ago

npm run import should work, and import the one figma file you shared with me. Oh, you’ll also need to get a personal access token from https://www.figma.com/developers/explorer and set your FIGMA_TOKEN environment variable to that…

aminalhazwani commented 6 years ago

Do you know if the API has access to this field?

screen shot 2018-06-29 at 10 11 05 am

If I turn all the icons to symbols there is a new field "Component / Description" that we could use to list tags and categories so we could potentially generate the whole JSON automatically. For example if in Figma we have:

screen shot 2018-06-29 at 10 14 59 am

then the JSON could look like:

    { "name": "pin",
      "tags": ["filled", "new tab"],
      "categories": ["new", "content"],
      "source": {
        "android": {
          "24": "icons/android/pin-24.svg"
        }
      }
    },
bwinton commented 6 years ago

Ooh, interesting idea… I'm not sure, but I'll look into it.

bwinton commented 5 years ago

So, I don't think this is the flow we want to follow, interesting though it was… Closing for now.