{"action":"created","issue":{"url":"https://api.github.com/repos/spotify/luigi/issues/1316","labels_url":"https://api.github.com/repos/spotify/luigi/issues/1316/labels{/name}","comments_url":"https://api.github.com/repos/spotify/luigi/issues/1316/comments","events_url":"https://api.github.com/repos/spotify/luigi/issues/1316/events","html_url":"https://github.com/spotify/luigi/pull/1316","id":111751373,"number":1316,"title":"Computes number of columns per graph level more accurately","user":{"login":"daveFNbuck","id":2091885,"avatar_url":"https://avatars.githubusercontent.com/u/2091885?v=3","gravatar_id":"","url":"https://api.github.com/users/daveFNbuck","html_url":"https://github.com/daveFNbuck","followers_url":"https://api.github.com/users/daveFNbuck/followers","following_url":"https://api.github.com/users/daveFNbuck/following{/other_user}","gists_url":"https://api.github.com/users/daveFNbuck/gists{/gist_id}","starred_url":"https://api.github.com/users/daveFNbuck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveFNbuck/subscriptions","organizations_url":"https://api.github.com/users/daveFNbuck/orgs","repos_url":"https://api.github.com/users/daveFNbuck/repos","events_url":"https://api.github.com/users/daveFNbuck/events{/privacy}","received_events_url":"https://api.github.com/users/daveFNbuck/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-16T03:28:38Z","updated_at":"2015-10-19T14:20:16Z","closed_at":"2015-10-19T11:47:22Z","pull_request":{"url":"https://api.github.com/repos/spotify/luigi/pulls/1316","html_url":"https://github.com/spotify/luigi/pull/1316","diff_url":"https://github.com/spotify/luigi/pull/1316.diff","patch_url":"https://github.com/spotify/luigi/pull/1316.patch"},"body":"The number of columns per level was computed to be the minimum of the\r\nnumber of columns allowed in the viewport and the number of items in the\r\nrow. This is an overestimate, however, due to the way that columns are\r\nfilled in. Suppose we have 6 columns and 7 items. We'll put two items in\r\neach column, as ceil(7 / 6) = 2. Because there are only 7 items, we only\r\nend up using 5 columns. Because we are laying out for 6, this means we\r\ndon't use enough horizontal space.\r\n\r\nTo fix this, we can either use a variable number of items per column or\r\nadjust the layout to display the number of columns actually used. I opt\r\nfor the second choice here, as the code is simpler and it looks nicer\r\nwith the binary tree example graph I was using."},"comment":{"url":"https://api.github.com/repos/spotify/luigi/issues/comments/149226978","html_url":"https://github.com/spotify/luigi/pull/1316#issuecomment-149226978","issue_url":"https://api.github.com/repos/spotify/luigi/issues/1316","id":149226978,"user":{"login":"daveFNbuck","id":2091885,"avatar_url":"https://avatars.githubusercontent.com/u/2091885?v=3","gravatar_id":"","url":"https://api.github.com/users/daveFNbuck","html_url":"https://github.com/daveFNbuck","followers_url":"https://api.github.com/users/daveFNbuck/followers","following_url":"https://api.github.com/users/daveFNbuck/following{/other_user}","gists_url":"https://api.github.com/users/daveFNbuck/gists{/gist_id}","starred_url":"https://api.github.com/users/daveFNbuck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daveFNbuck/subscriptions","organizations_url":"https://api.github.com/users/daveFNbuck/orgs","repos_url":"https://api.github.com/users/daveFNbuck/repos","events_url":"https://api.github.com/users/daveFNbuck/events{/privacy}","received_events_url":"https://api.github.com/users/daveFNbuck/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T14:20:16Z","updated_at":"2015-10-19T14:20:16Z","body":"Yeah, the description should have said 4 columns."}}