{ "id": "150046", "key": "TIMOB-19295", "fields": { "issuetype": { "id": "8", "description": "A technical task.", "name": "Technical task", "subtask": true }, "parent": { "id": "148692", "key": "TIMOB-18998", "fields": { "summary": "iOS9: App thinning: Create XCAssets (imagesets) w/ the cli and access resources within those catalogs at runtime", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-09-30T02:34:16.000+0000", "created": "2015-07-31T03:06:57.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "appthinning" ], "versions": [], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2015-10-30T21:11:22.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" }, { "id": "10207", "name": "Tooling" } ], "description": "*Need titanium CLI to be able to *\r\n1. generate a default Media.xcassets folder in xcode project\r\n2. transfer existing image files in titanium project into this folder\r\n3. generate corresponding Contents.json file\r\n\r\n*Note*\r\n- Details in the Contents.json and folder naming and structure will be based on existing titanium naming convention i.e. image@2x.png, image@3x.png etc.\r\n- Ignore Android specific images. only consider iOS specific, and common platform images.", "attachment": [ { "id": "56694", "filename": "Screen Shot 2015-09-12 at 8.06.45 am.png", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-12T00:13:14.000+0000", "size": 57024, "mimeType": "image/png" }, { "id": "56799", "filename": "testAssets.zip", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-09-22T18:36:08.000+0000", "size": 1216121, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS9: Titanium CLI automatically converts existing images to assets catalog", "creator": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 494, "state": "closed", "name": "2015 Sprint 20 SDK", "startDate": "2015-09-26T00:29:19.845Z", "endDate": "2015-10-10T00:29:00.000Z", "completeDate": "2015-10-12T05:33:30.964Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "359751", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-12T23:50:52.000+0000", "updated": "2015-08-12T23:50:52.000+0000" }, { "id": "361873", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~cbarber], can we consider this?\r\nTell our Ti developers that if you want to enjoy App thinning on images, they have to do the following naming conventions:\r\nA. pic.png, pic@2x.png, pic@3x.png\r\nB. No 2 images should share the same name even if it's in different folders\r\n\r\nOn the Tooling side:\r\nA. Only process images with suffix *@*, and put them into assets catalogs \r\nB. Ignore image files with suffix *@*, and leave them where they are\r\nC. If there's a way to check if there's a conflict in names , throw a warning that there's conflicting names.\r\n\r\nOn the SDK side:\r\nany image-related loading, we'll check if it's in any assets catalog and load it, otherwise, we will load it from URL.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-01T03:31:48.000+0000", "updated": "2015-09-01T03:31:48.000+0000" }, { "id": "363570", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~fokkezb], [~ingo], opinions appreciated.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-11T02:02:19.000+0000", "updated": "2015-09-11T02:02:19.000+0000" }, { "id": "363577", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "If we ignore images without suffix @, then I assume you mean apart from those who also have a @2x and/or @3x counterpart?\r\n\r\nThis will break apps since I think it's fairly common for some to have:\r\n\r\n{code}\r\nimages/red-theme/go.png\r\nimages/red-theme/go@2x.png\r\nimages/blue-theme/go.png\r\nimages/blue-theme/go@2x.png\r\n{code}\r\n\r\nMaybe we should introduce a new {{catalog}} folder? Then our logic on that folder can be more simple and strict and it won't break stuff.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-09-11T07:23:51.000+0000", "updated": "2015-09-11T07:23:51.000+0000" }, { "id": "363601", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can we include the path as part of the image name? Or some other way to make the names distinct?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-11T16:30:57.000+0000", "updated": "2015-09-11T16:30:57.000+0000" }, { "id": "363603", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "That's... brilliant! Just hash the filepaths (since there's probably restricted chars)!", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-09-11T16:39:25.000+0000", "updated": "2015-09-11T16:39:25.000+0000" }, { "id": "363605", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Yeah, I like that idea too. So {{images/red-theme/go.png}} would become {{f55a327854b54c63e04d0a1a3694636dc0403aa5_go.png}}. You'd just SHA1 the entire resolved path and possibly append the filename. Resolving images from the runtime would be easy. Generating the asset catalogs at build time would be easy too.\r\n\r\nThis still doesn't solve the problem of app thinning. How do we flag which images are meant for certain devices?", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-09-11T16:51:27.000+0000", "updated": "2015-09-11T16:51:27.000+0000" }, { "id": "363621", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Well, you know which devices support @2x or @3x and people could use ~ipad etc?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-09-11T19:22:53.000+0000", "updated": "2015-09-11T19:22:53.000+0000" }, { "id": "363622", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I dunno about that. Maybe it's best to punt this ticket until we build a real catalog system and move away from file naming conventions.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-09-11T19:24:53.000+0000", "updated": "2015-09-11T19:24:53.000+0000" }, { "id": "363648", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Well, the image asset catalog support by default universal - 1x, 2x, 3x. \r\nThen the user is allowed to assign device idioms when they specifically want total control over the images. See attached.\r\n!Screen Shot 2015-09-12 at 8.06.45 am.png|thumbnail!", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-12T00:12:37.000+0000", "updated": "2015-09-12T00:13:58.000+0000" }, { "id": "363669", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Agree with [~cng] that we can cover first two rows of that screenshot with existing @nx and ~idiom naming schemes and since we don't support watch in Titanium we can go with that without any developer changes", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-09-12T09:35:19.000+0000", "updated": "2015-09-12T09:35:19.000+0000" }, { "id": "364809", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Agreed. We should proceed with option #1.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-23T18:17:13.000+0000", "updated": "2015-09-23T18:17:13.000+0000" }, { "id": "364932", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/7231\r\n\r\neg. given these images: \r\n{quote}\r\nimages/red/logo/logo.png\r\nimages/red/logo/logo@2x.png\r\nimages/red/logo/logo@3x.png\r\nimages/red/logo/logo@2x~ipad.png\r\n{quote}\r\n\r\nThe *image set* name for the group of images will be *SHA1(images/red/logo/logo.png).imageset*. ", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-09-24T22:53:12.000+0000", "updated": "2015-09-24T22:53:34.000+0000" }, { "id": "365343", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "-[~fmiao] Let me know when you have the backport ready. Thanks!-\r\n\r\nNevermind, no backport necessary!", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-09-30T02:34:45.000+0000", "updated": "2015-09-30T02:36:21.000+0000" }, { "id": "368498", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified implemented, using:\r\n\r\nMacOS 10.11.2 (15C27e)\r\nStudio 4.4.0.201510290507\r\nTi SDK 5.1.0.v20151028190028\r\nAppc NPM 4.2.1\r\nAppc CLI 5.1.0-38\r\nTi CLI 5.0.5\r\nAlloy 1.7.16\r\nArrow 1.3.13\r\nXcode 7.2 (7C46l)\r\nNode v0.12.7\r\nJava 1.7.0_80\r\nproduction\r\n\r\nExisting images are included in the xcode asset catalog and an appropriate contents.json file is generated. Used sample app from parent ticket as well as default projects built/packaged to different targets to test.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-10-30T21:11:22.000+0000", "updated": "2015-10-30T21:11:22.000+0000" } ], "maxResults": 25, "total": 25, "startAt": 0 } } }