{"action":"created","issue":{"url":"https://api.github.com/repos/GibbsConsulting/django-plotly-dash/issues/20","repository_url":"https://api.github.com/repos/GibbsConsulting/django-plotly-dash","labels_url":"https://api.github.com/repos/GibbsConsulting/django-plotly-dash/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/GibbsConsulting/django-plotly-dash/issues/20/comments","events_url":"https://api.github.com/repos/GibbsConsulting/django-plotly-dash/issues/20/events","html_url":"https://github.com/GibbsConsulting/django-plotly-dash/issues/20","id":344398496,"node_id":"MDU6SXNzdWUzNDQzOTg0OTY=","number":20,"title":"Give iframe parent div an id based on app name","user":{"login":"eddy-ojb","id":26047714,"node_id":"MDQ6VXNlcjI2MDQ3NzE0","avatar_url":"https://avatars2.githubusercontent.com/u/26047714?v=4","gravatar_id":"","url":"https://api.github.com/users/eddy-ojb","html_url":"https://github.com/eddy-ojb","followers_url":"https://api.github.com/users/eddy-ojb/followers","following_url":"https://api.github.com/users/eddy-ojb/following{/other_user}","gists_url":"https://api.github.com/users/eddy-ojb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddy-ojb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddy-ojb/subscriptions","organizations_url":"https://api.github.com/users/eddy-ojb/orgs","repos_url":"https://api.github.com/users/eddy-ojb/repos","events_url":"https://api.github.com/users/eddy-ojb/events{/privacy}","received_events_url":"https://api.github.com/users/eddy-ojb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-25T11:09:17Z","updated_at":"2018-07-27T12:58:39Z","closed_at":null,"author_association":"NONE","body":"I have noticed an issue with injecting a dpd iframe in to a page where the parent div is restricting the iframe:\r\n\r\n<img width=\"960\" alt=\"iframe_1\" src=\"https://user-images.githubusercontent.com/26047714/43197480-3552a8f2-9003-11e8-980d-f440a5003fb3.PNG\">\r\n\r\nIf amending the parent div height from 0 to X pixels, this resolves the issue:\r\n\r\n<img width=\"506\" alt=\"iframe_2\" src=\"https://user-images.githubusercontent.com/26047714/43197527-5ae42140-9003-11e8-9760-e5f460b589f9.PNG\">\r\n\r\n<img width=\"960\" alt=\"iframe_3\" src=\"https://user-images.githubusercontent.com/26047714/43197542-622e1406-9003-11e8-8750-775267cd6ffe.png\">\r\n\r\nPerhaps each parent div should be given an id that is a function of the DjangoDash name property a standard? This way, we can apply our own css to size the iframe container.\r\n\r\nFor example, in plotly_items.html:\r\n\r\n```\r\n<div id={{app.name}}   style=\"{{dstyle}}\">\r\n  <iframe src=\"{{app.base_url}}\" style=\"{{istyle}}\"frameborder=\"{{fbs}}\"></iframe>\r\n</div>\r\n\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/GibbsConsulting/django-plotly-dash/issues/comments/408411052","html_url":"https://github.com/GibbsConsulting/django-plotly-dash/issues/20#issuecomment-408411052","issue_url":"https://api.github.com/repos/GibbsConsulting/django-plotly-dash/issues/20","id":408411052,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODQxMTA1Mg==","user":{"login":"eddy-ojb","id":26047714,"node_id":"MDQ6VXNlcjI2MDQ3NzE0","avatar_url":"https://avatars2.githubusercontent.com/u/26047714?v=4","gravatar_id":"","url":"https://api.github.com/users/eddy-ojb","html_url":"https://github.com/eddy-ojb","followers_url":"https://api.github.com/users/eddy-ojb/followers","following_url":"https://api.github.com/users/eddy-ojb/following{/other_user}","gists_url":"https://api.github.com/users/eddy-ojb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddy-ojb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddy-ojb/subscriptions","organizations_url":"https://api.github.com/users/eddy-ojb/orgs","repos_url":"https://api.github.com/users/eddy-ojb/repos","events_url":"https://api.github.com/users/eddy-ojb/events{/privacy}","received_events_url":"https://api.github.com/users/eddy-ojb/received_events","type":"User","site_admin":false},"created_at":"2018-07-27T12:58:38Z","updated_at":"2018-07-27T12:58:38Z","author_association":"NONE","body":"That sounds good to me, though what springs to mind is whether the same app instance counter will be assigned to an instance you care about if a co-developer comes in and adds code before or after, adding an instance of their own. \r\n\r\nThis could upset the css and has the potential to be annoying working on a project as part of a team. If consistency can't be enforced then a possibility is to explicitly assign a counter e.g.: DjangoDash(instance_counter=1)."}}
{"actor":{"display_login":"eddy-ojb"}}