{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter/issues/14784","repository_url":"https://api.github.com/repos/flutter/flutter","labels_url":"https://api.github.com/repos/flutter/flutter/issues/14784/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/14784/comments","events_url":"https://api.github.com/repos/flutter/flutter/issues/14784/events","html_url":"https://github.com/flutter/flutter/pull/14784","id":298772123,"number":14784,"title":"Make text shrink to fit its lines when multi line","user":{"login":"sroddy","id":729934,"avatar_url":"https://avatars2.githubusercontent.com/u/729934?v=4","gravatar_id":"","url":"https://api.github.com/users/sroddy","html_url":"https://github.com/sroddy","followers_url":"https://api.github.com/users/sroddy/followers","following_url":"https://api.github.com/users/sroddy/following{/other_user}","gists_url":"https://api.github.com/users/sroddy/gists{/gist_id}","starred_url":"https://api.github.com/users/sroddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sroddy/subscriptions","organizations_url":"https://api.github.com/users/sroddy/orgs","repos_url":"https://api.github.com/users/sroddy/repos","events_url":"https://api.github.com/users/sroddy/events{/privacy}","received_events_url":"https://api.github.com/users/sroddy/received_events","type":"User","site_admin":false},"labels":[{"id":487496476,"url":"https://api.github.com/repos/flutter/flutter/labels/cla:%20yes","name":"cla: yes","color":"ffffff","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-20T22:25:25Z","updated_at":"2018-03-07T19:22:28Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/flutter/flutter/pulls/14784","html_url":"https://github.com/flutter/flutter/pull/14784","diff_url":"https://github.com/flutter/flutter/pull/14784.diff","patch_url":"https://github.com/flutter/flutter/pull/14784.patch"},"body":"fixes #13211\r\n\r\nWhen a multiline paragraph was layouted inside a constrained box, its resulting width was always the box max. This behaviour is probably not the one someone would expect. In fact it was breaking one of our designs (a view very similar to the native iMessage, Whatsapp and Facebook Messenger apps, where the messages are inside bubbles that are perfectly wrapped around the texts. This PR fixes the behaviour making sure that the paragraph is always layouted using a width that is computed from the widest row.\r\n\r\nSome tests are still failing (my guess is that the hard-coded values inside the tests can be corrected with the new ones).\r\n\r\nOur empirical tests prove that this should be the expected behaviour, however we can be missing the bigger picture, so please tell me what do you think about this.\r\n "},"comment":{"url":"https://api.github.com/repos/flutter/flutter/issues/comments/371253741","html_url":"https://github.com/flutter/flutter/pull/14784#issuecomment-371253741","issue_url":"https://api.github.com/repos/flutter/flutter/issues/14784","id":371253741,"user":{"login":"Hixie","id":551196,"avatar_url":"https://avatars2.githubusercontent.com/u/551196?v=4","gravatar_id":"","url":"https://api.github.com/users/Hixie","html_url":"https://github.com/Hixie","followers_url":"https://api.github.com/users/Hixie/followers","following_url":"https://api.github.com/users/Hixie/following{/other_user}","gists_url":"https://api.github.com/users/Hixie/gists{/gist_id}","starred_url":"https://api.github.com/users/Hixie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hixie/subscriptions","organizations_url":"https://api.github.com/users/Hixie/orgs","repos_url":"https://api.github.com/users/Hixie/repos","events_url":"https://api.github.com/users/Hixie/events{/privacy}","received_events_url":"https://api.github.com/users/Hixie/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T19:22:28Z","updated_at":"2018-03-07T19:22:28Z","author_association":"CONTRIBUTOR","body":"This is really expensive, so probably not something we want to do for every paragraph we render. It's also a behaviour that might lead to unexpected effects, for example if each paragraph is wrapped in a Container with a different color, all in a Column, then the result will be that each paragraph is a slightly different width and the alignment will look off.\r\n\r\nHowever, you can get the effect you're looking for just by wrapping the Text widget with an IntrinsicWidth widget. That will also be expensive, but the expense will be limited to just the cases you care about. Does that satisfy your use case?"}}
{"actor":{"display_login":"Hixie"}}