{"action":"created","issue":{"url":"https://api.github.com/repos/Starcounter/Home/issues/89","repository_url":"https://api.github.com/repos/Starcounter/Home","labels_url":"https://api.github.com/repos/Starcounter/Home/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/Starcounter/Home/issues/89/comments","events_url":"https://api.github.com/repos/Starcounter/Home/issues/89/events","html_url":"https://github.com/Starcounter/Home/issues/89","id":222998655,"number":89,"title":"Use `starcounter-include` in default PartialToStandaloneHtmlProvider","user":{"login":"tomalec","id":17435,"avatar_url":"https://avatars2.githubusercontent.com/u/17435?v=3","gravatar_id":"","url":"https://api.github.com/users/tomalec","html_url":"https://github.com/tomalec","followers_url":"https://api.github.com/users/tomalec/followers","following_url":"https://api.github.com/users/tomalec/following{/other_user}","gists_url":"https://api.github.com/users/tomalec/gists{/gist_id}","starred_url":"https://api.github.com/users/tomalec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomalec/subscriptions","organizations_url":"https://api.github.com/users/tomalec/orgs","repos_url":"https://api.github.com/users/tomalec/repos","events_url":"https://api.github.com/users/tomalec/events{/privacy}","received_events_url":"https://api.github.com/users/tomalec/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-04-20T09:09:02Z","updated_at":"2017-05-10T08:50:40Z","closed_at":null,"body":"Currently default `PartialToStandaloneHtmlProvider` uses just `imported-template` to stamp root partial:\r\n```html\r\n<body>\r\n    <template is=\"\"dom-bind\"\" id=\"\"puppet-root\"\">\r\n        <template is=\"\"imported-template\"\" content$=\"\"{{{{model.Html}}}}\"\" model=\"\"{{{{model}}}}\"\"></template>\r\n    </template>\r\n     ...\r\n```\r\n\r\nIt results in lack of support for any layout features, like default `declarative-shadow-dom` (eventually could be fixed by https://github.com/Starcounter/RebelsLounge/issues/78) and explicit Shadow DOM compositions (ones from `Starcounter.HTMLComposition` given by CompositionProvider).\r\n\r\nThat's why I would suggest to\r\n1. Use `starcounter-include` on root level:\r\n   ```html\r\n   <body>\r\n       <starcounter-include view-model=\"\"{{{{model}}}}\"\"></starcounter-include>\r\n       ...\r\n    ```\r\n    As we didn't deprecate non-namespaced view-models yet (https://github.com/Starcounter/starcounter-include/issues/29) it should work out of the box. But given that we decided to deprecate it eventually, it would require to have namespaced view-model JSON on root level. @chrhol is that possible, easy enough to implement?\r\n\r\n  Alternatively we could\r\n\r\n2. Rely on `declarative-shadow-dom` as independent custom element (https://github.com/Starcounter/RebelsLounge/issues/78 once it's done) . Then default ones (provided by app devs - from app code) should work regardless of the container. Then the explicit custom ones, given by the composer/editor/designer app/person (ones from the database) could be delivered also using `<declarative-shadow-dom>` merged by HTML merger.\r\n    However, this would require:\r\n    1. Implementing `<d-s-d>` as independent CE which may take some time and is at risk due to lack of `is=\"\"` support in browsers and other potential lifecycle problems,\r\n    2. Heavy re-design in composition flow (which I planned anyways, but in long-term),\r\n    3. Changes to HTML Merger, which was pretty stable so far,\r\n    4. Implementing additional feature to `<d-s-d>` to overwrite instead of appending Shadow DOM\r\n    5. Workaround in some other way the problem of missing slots and slot names (current responsibility of `<starcounter-include>`/`<juicy-composition>`\r\n3. Suggest to all app developers, to use `MaterPage.html` - which we already found confusing.\r\n\r\n/cc @warpech @Mackiovello "},"comment":{"url":"https://api.github.com/repos/Starcounter/Home/issues/comments/300417816","html_url":"https://github.com/Starcounter/Home/issues/89#issuecomment-300417816","issue_url":"https://api.github.com/repos/Starcounter/Home/issues/89","id":300417816,"user":{"login":"chrhol","id":1658979,"avatar_url":"https://avatars3.githubusercontent.com/u/1658979?v=3","gravatar_id":"","url":"https://api.github.com/users/chrhol","html_url":"https://github.com/chrhol","followers_url":"https://api.github.com/users/chrhol/followers","following_url":"https://api.github.com/users/chrhol/following{/other_user}","gists_url":"https://api.github.com/users/chrhol/gists{/gist_id}","starred_url":"https://api.github.com/users/chrhol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrhol/subscriptions","organizations_url":"https://api.github.com/users/chrhol/orgs","repos_url":"https://api.github.com/users/chrhol/repos","events_url":"https://api.github.com/users/chrhol/events{/privacy}","received_events_url":"https://api.github.com/users/chrhol/received_events","type":"User","site_admin":false},"created_at":"2017-05-10T08:50:40Z","updated_at":"2017-05-10T08:50:40Z","body":"So the tasks are to:\r\n- Update `PartialToStandaloneHtmlProvider` to use `starcounter-include`\r\n- Change so that root json is namespaced.\r\n\r\nIs that correct, or is the second task optional? I feel a little confused :) And there is no other things that needs to be changed, so although behaviour is changing, it shouldn't break any apps?"}}
{"actor":{"display_login":"chrhol"}}