{"action":"created","issue":{"url":"https://api.github.com/repos/opentable/design-tokens/issues/106","repository_url":"https://api.github.com/repos/opentable/design-tokens","labels_url":"https://api.github.com/repos/opentable/design-tokens/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/opentable/design-tokens/issues/106/comments","events_url":"https://api.github.com/repos/opentable/design-tokens/issues/106/events","html_url":"https://github.com/opentable/design-tokens/pull/106","id":297148331,"number":106,"title":"[RUSH-1675][WIP] Add OTKit-icons token and icon generation pipeline","user":{"login":"karuto","id":1095291,"avatar_url":"https://avatars1.githubusercontent.com/u/1095291?v=4","gravatar_id":"","url":"https://api.github.com/users/karuto","html_url":"https://github.com/karuto","followers_url":"https://api.github.com/users/karuto/followers","following_url":"https://api.github.com/users/karuto/following{/other_user}","gists_url":"https://api.github.com/users/karuto/gists{/gist_id}","starred_url":"https://api.github.com/users/karuto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karuto/subscriptions","organizations_url":"https://api.github.com/users/karuto/orgs","repos_url":"https://api.github.com/users/karuto/repos","events_url":"https://api.github.com/users/karuto/events{/privacy}","received_events_url":"https://api.github.com/users/karuto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-14T15:57:58Z","updated_at":"2018-02-14T21:22:42Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/opentable/design-tokens/pulls/106","html_url":"https://github.com/opentable/design-tokens/pull/106","diff_url":"https://github.com/opentable/design-tokens/pull/106.diff","patch_url":"https://github.com/opentable/design-tokens/pull/106.patch"},"body":"### Overview\r\nThis PR is a result of the SVG icons [discussion](https://github.com/opentable/design-tokens/issues/93) - let's introduce a designer-friendly solution to standardize our SVG icon usages.\r\n\r\nHere's my proposed process:\r\n 1. Drop any normal SVG files, like `ic_information.svg`, into the `assets/` folder.\r\n 2. Type `npm run build-icons` to trigger the script to build the `OTKit/otkit-icons/token.yml` automatically. **The file name will become the key, and the optimized / standardized SVG content will be the value.**\r\n3. Publish the token as normal. Our standard `theo` pipeline will publish it as a `common.js` format file.\r\n4. Developer can use this token in a JavaScript project like so:\r\n\r\n```javascript\r\nimport React from 'react';\r\nimport icons from 'otkit-icons/token.common.js';\r\n\r\nexport default class RandomComponent extends React.PureComponent {\r\n\r\n  render() {\r\n    return (\r\n      <div>\r\n      {icons.ic_information} // here's the icon\r\n      </div>\r\n    );\r\n  };\r\n\r\n}\r\n```\r\n\r\n**NOTE: Still work in progress. Features I plan to add:**\r\n- [x] Pick a node yaml generator to automate the yaml generation\r\n- [ ] Adjust svgo so that it removes outer SVG tag (but then we have to build the component wrapper, and the example above won't work anymore, so maybe not for V1)\r\n- [ ] Adjust theo so that it only generates common.js for this token (do we ever need CSS version of these icons' paths?)\r\n- [ ] Perhaps make the icon generator run automatically during pre-commit (not sure if we even want this, maybe not for V1)"},"comment":{"url":"https://api.github.com/repos/opentable/design-tokens/issues/comments/365749283","html_url":"https://github.com/opentable/design-tokens/pull/106#issuecomment-365749283","issue_url":"https://api.github.com/repos/opentable/design-tokens/issues/106","id":365749283,"user":{"login":"matteofigus","id":1789893,"avatar_url":"https://avatars2.githubusercontent.com/u/1789893?v=4","gravatar_id":"","url":"https://api.github.com/users/matteofigus","html_url":"https://github.com/matteofigus","followers_url":"https://api.github.com/users/matteofigus/followers","following_url":"https://api.github.com/users/matteofigus/following{/other_user}","gists_url":"https://api.github.com/users/matteofigus/gists{/gist_id}","starred_url":"https://api.github.com/users/matteofigus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matteofigus/subscriptions","organizations_url":"https://api.github.com/users/matteofigus/orgs","repos_url":"https://api.github.com/users/matteofigus/repos","events_url":"https://api.github.com/users/matteofigus/events{/privacy}","received_events_url":"https://api.github.com/users/matteofigus/received_events","type":"User","site_admin":false},"created_at":"2018-02-14T21:22:42Z","updated_at":"2018-02-14T21:22:42Z","author_association":"OWNER","body":"I like the idea thanks for exploring this @karuto.\r\nOut of curiosity, do you have opinions about exporting only the paths VS the whole xml? I am trying to understand pros/cons of both."}}
{"actor":{"display_login":"matteofigus"}}