{ "id": "130632", "key": "ALOY-1023", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "15758", "description": "Alloy 1.4.0", "name": "Alloy 1.4.0", "archived": false, "released": true, "releaseDate": "2014-07-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-05-23T13:50:24.000+0000", "created": "2014-05-19T20:36:04.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-3.3.0", "qe-testadded", "regression" ], "versions": [ { "id": "15758", "description": "Alloy 1.4.0", "name": "Alloy 1.4.0", "archived": false, "released": true, "releaseDate": "2014-07-17" } ], "issuelinks": [ { "id": "42457", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "137601", "key": "ALOY-1154", "fields": { "summary": "Consider deep merging only font properties, not gradients, etc.", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2014-10-28T15:48:37.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": "13603", "name": "Styling", "description": "TSS, dynamic styling, styling API" } ], "description": "h5. Problem description\r\nFont styles are not correctly merged and they could be applied to the wrong object.\r\n\r\nh5. Steps to reproduce\r\n1. Get sample code from: https://github.com/appcelerator/alloy/tree/master/test/apps/advanced/complex_styling\r\n\r\n2. Run on iOS device\r\n\r\n3. Check #lbl6 and #lbl7\r\n\r\nResult: using alloy 1.4.0-alpha version, the font style looks the same, while fontFamily, fontWeight and fontSize is actually only applied to #lbl6.\r\n\r\nAlso, from the compiled code: \r\n{code}\r\n $.__views.lbl6 = Ti.UI.createLabel({\r\n left: 0,\r\n color: \"black\",\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.SIZE,\r\n textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,\r\n font: {\r\n fontSize: \"16dp\",\r\n fontWeight: \"bold\",\r\n fontFamily: \"Zapfino\"\r\n },\r\n text: \"6. Bold, large, custom font, font properties mixed from various stylesheets\",\r\n id: \"lbl6\"\r\n });\r\n $.__views.sv.add($.__views.lbl6);\r\n $.__views.lbl7 = Ti.UI.createLabel({\r\n left: 0,\r\n color: \"blue\",\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.SIZE,\r\n textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,\r\n font: {\r\n fontSize: \"16dp\",\r\n fontWeight: \"bold\",\r\n fontFamily: \"Zapfino\"\r\n },\r\n text: \"7. Theme controls color: iOS=blue, Android=green, MobileWeb=red, generic=black, font size from main index.tss\",\r\n id: \"lbl7\"\r\n });\r\n{code}\r\n\r\nColor and text properties are fine, but the font properties, that should just be applied to #lbl6, are also applied to #lbl7.\r\n\r\n", "attachment": [], "flagged": false, "summary": "Issue merging font styles", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.3.0.v20140516180912\r\nAlloy 1.4.0-alpha\r\nAppcelerator Studio 3.3.0.201405161313\r\nCLI 3.3.0-alpha3", "closedSprints": [ { "id": 112, "state": "closed", "name": "2014 Sprint 10 Alloy", "startDate": "2014-05-12T16:00:00.000Z", "endDate": "2014-05-24T00:00:00.000Z", "completeDate": "2014-05-27T18:12:31.273Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "305665", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "Ran the sample app. \r\nIt seems #lbl6's font style is applied to the labels after it and doesn't have fontFamily property specifically defined. \r\nAffected elements are #lbl7, #lbl9 and also the last two labels \r\n", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-05-20T09:23:08.000+0000", "updated": "2014-05-20T09:23:08.000+0000" }, { "id": "306091", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR : https://github.com/appcelerator/alloy/pull/411\r\n\r\nTest apps: \r\nhttps://github.com/feons/alloy/tree/ALOY-1023/test/apps/testing/ALOY-1023\r\nhttps://github.com/feons/alloy/tree/master/test/apps/advanced/complex_styling\r\n\r\nFunctional Test:\r\n1. Built the complex_styling app, font properties #lbl7, #lbl9 and also the last two labels are overwritten by #lbl6's font style\r\n2. Built the test app, #lbl2 is not using #lbl1's font style.\r\n\r\n", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-05-22T16:56:58.000+0000", "updated": "2014-05-22T16:56:58.000+0000" }, { "id": "306132", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "I have submitted my own PR which solves the problem in a different way. As Feon discovered, the fault was the deepExtend() function. So rather than work around that defect, I've replaced that function.\r\n\r\nPR: https://github.com/appcelerator/alloy/pull/413\r\n\r\nTest app: https://github.com/appcelerator/alloy/tree/master/test/apps/advanced/complex_styling \r\n\r\nFunctional test: label 6 should have the custom font face, but the ones that follow after it should not (many were getting that font face before)\r\n\r\nWaiting on input from Federico and Feon before resolving this ticket and merging that PR", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-05-22T20:43:57.000+0000", "updated": "2014-05-22T20:43:57.000+0000" }, { "id": "306223", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR https://github.com/appcelerator/alloy/pull/413 merged to master and 1_4_X", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-05-23T13:50:24.000+0000", "updated": "2014-05-23T13:50:24.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }