{ "id": "172734", "key": "TIMOB-26679", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [], "resolution": null, "resolutiondate": null, "created": "2018-12-12T17:23:42.000+0000", "priority": null, "labels": [ "engSchedule", "ios" ], "versions": [ { "id": "20429", "name": "Release 7.5.1", "archived": false, "released": true, "releaseDate": "2019-02-26" } ], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-03-26T15:36:53.000+0000", "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" } }, "components": [], "description": "From the documentation [here|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Label-property-ellipsize], I thought that setting the label's ellipsize property to TEXT_ELLIPSIZE_TRUNCATE_CHAR_WRAP should add an ellipses at the end of the truncated text, but it's just truncating the text without adding the ellipses.\r\n\r\n*Workaround*\r\nThe default ellipsize setting (TEXT_ELLIPSIZE_TRUNCATE_END) does add ellipses. So not sure what the intended difference between TEXT_ELLIPSIZE_TRUNCATE_CHAR_WRAP and TEXT_ELLIPSIZE_TRUNCATE_END is.\r\n\r\n*Sample App*\r\n\r\nCreate a sample classic titanium app and put this code in your app.js:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow();\r\n\r\n// Expected: Only show 1 line with ellipses at the end\r\n// Actual: Only shows 1 line truncated text, but no ellipses\r\nvar label_char_setting = Ti.UI.createLabel({\r\n text: 'This is a long label that should not wrap and instead ellipsize after last fitting character',\r\n width: 200,\r\n top: '35%',\r\n ellipsize: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_CHAR_WRAP,\r\n wordWrap: false,\r\n font: {\r\n fontSize: 16\r\n },\r\n maxLines: 1\r\n});\r\n\r\n// Expected: Only show 1 line with ellipses at the end\r\n// Actual: As expected\r\nvar label_default_setting = Ti.UI.createLabel({\r\n text: 'This is a long label that should not wrap and instead ellipsize after last fitting character',\r\n width: 200,\r\n top: '50%',\r\n ellipsize: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_END,\r\n wordWrap: false,\r\n font: {\r\n fontSize: 16\r\n },\r\n maxLines: 1\r\n});\r\n\r\nwin.add([label_char_setting, label_default_setting]);\r\n\r\nwin.open();\r\n\r\n// added during app creation. this will automatically login to\r\n// ACS for your application and then fire an event (see below)\r\n// when connected or errored. if you do not use ACS in your\r\n// application as a client, you should remove this block\r\n(function(){\r\nvar ACS = require('ti.cloud'),\r\n env = Ti.App.deployType.toLowerCase() === 'production' ? 'production' : 'development',\r\n username = Ti.App.Properties.getString('acs-username-'+env),\r\n password = Ti.App.Properties.getString('acs-password-'+env);\r\n\r\n// if not configured, just return\r\nif (!env || !username || !password) { return; }\r\n/**\r\n * Appcelerator Cloud (ACS) Admin User Login Logic\r\n *\r\n * fires login.success with the user as argument on success\r\n * fires login.failed with the result as argument on error\r\n */\r\nACS.Users.login({\r\n login:username,\r\n password:password,\r\n}, function(result){\r\n if (env==='development') {\r\n Ti.API.info('ACS Login Results for environment `'+env+'`:');\r\n Ti.API.info(result);\r\n }\r\n if (result && result.success && result.users && result.users.length){\r\n Ti.App.fireEvent('login.success',result.users[0],env);\r\n } else {\r\n Ti.App.fireEvent('login.failed',result,env);\r\n }\r\n});\r\n\r\n})();\r\n{code}\r\n\r\n*Result*\r\n !Screen Shot 2018-12-12 at 11.11.12 AM.png|thumbnail! ", "attachment": [ { "id": "65972", "filename": "Screen Shot 2018-12-12 at 11.11.12 AM.png", "author": { "name": "emilyafeder@gmail.com", "key": "emilyafeder@gmail.com", "displayName": "Emily Feder", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-12T17:22:38.000+0000", "size": 23953, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Label property ellipsize = TEXT_ELLIPSIZE_TRUNCATE_CHAR_WRAP not adding ellipses", "creator": { "name": "emilyafeder@gmail.com", "key": "emilyafeder@gmail.com", "displayName": "Emily Feder", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "emilyafeder@gmail.com", "key": "emilyafeder@gmail.com", "displayName": "Emily Feder", "active": true, "timeZone": "America/Chicago" }, "environment": "Titanium SDK: 7.4.1.GA\r\nJavascript Engine: V8\r\nPlatform & version: iOS\r\n11.4 Device Details: iOS simulator (iPhone 7+)\r\nHost Operating System: OS X 10.13 64 bit\r\nNode Version: 7.10.0\r\nTitanium CLI: 5.1.1\r\nNpm Version: 4.2.0", "comment": { "comments": [ { "id": "444566", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\n\r\nThanks for reporting this issue. Can you please test this on SDK 7.5.0.GA and let us know how it goes.\r\n\r\n\r\n", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-12-13T04:39:44.000+0000", "updated": "2018-12-13T04:39:44.000+0000" }, { "id": "444702", "author": { "name": "emilyafeder@gmail.com", "key": "emilyafeder@gmail.com", "displayName": "Emily Feder", "active": true, "timeZone": "America/Chicago" }, "body": "I tried with sdk 7.5.0.GA but saw no difference.", "updateAuthor": { "name": "emilyafeder@gmail.com", "key": "emilyafeder@gmail.com", "displayName": "Emily Feder", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-18T18:07:43.000+0000", "updated": "2018-12-18T18:07:43.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }