{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/dialog/issues/209","repository_url":"https://api.github.com/repos/aurelia/dialog","labels_url":"https://api.github.com/repos/aurelia/dialog/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/dialog/issues/209/comments","events_url":"https://api.github.com/repos/aurelia/dialog/issues/209/events","html_url":"https://github.com/aurelia/dialog/pull/209","id":176927982,"number":209,"title":"fix(dialog-renderer, dialog-service): fix settings merging","user":{"login":"StrahilKazlachev","id":5302492,"avatar_url":"https://avatars.githubusercontent.com/u/5302492?v=3","gravatar_id":"","url":"https://api.github.com/users/StrahilKazlachev","html_url":"https://github.com/StrahilKazlachev","followers_url":"https://api.github.com/users/StrahilKazlachev/followers","following_url":"https://api.github.com/users/StrahilKazlachev/following{/other_user}","gists_url":"https://api.github.com/users/StrahilKazlachev/gists{/gist_id}","starred_url":"https://api.github.com/users/StrahilKazlachev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StrahilKazlachev/subscriptions","organizations_url":"https://api.github.com/users/StrahilKazlachev/orgs","repos_url":"https://api.github.com/users/StrahilKazlachev/repos","events_url":"https://api.github.com/users/StrahilKazlachev/events{/privacy}","received_events_url":"https://api.github.com/users/StrahilKazlachev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-14T14:49:07Z","updated_at":"2016-09-28T01:20:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aurelia/dialog/pulls/209","html_url":"https://github.com/aurelia/dialog/pull/209","diff_url":"https://github.com/aurelia/dialog/pull/209.diff","patch_url":"https://github.com/aurelia/dialog/pull/209.patch"},"body":"fix #181 - it turns out that the `if` binding in the `dialog-header` is messing with the `lock` setting. The binding gets to run before the renderer merges the default settings with the passed ones. So when `lock` is not passed:\r\n\r\n1. a property for `lock` is installed on the `controller.settings` by the binding, and the value is `undefined`.\r\n2. `rendered.showDialog` runs and merges the settings, the `undefined` overwrites the default value - not what we want, and the `controller.settings` are not updated.\r\n\r\nRefactoring:\r\n- moved the merging of the settings in the `dialog-service` so they can be merged as early as possible - there are other boolean settings that can get messed up if used in bindings.\r\n- made `startingZIndex` not to be overwritten by settings passed to `open` and `openAndYieldController`, only when configuring the plugin - the render was using it from `defaultSettings` not the merged ones, it doesn't make much sense to change this per dialog basis.\r\n- updated the tests accordingly - I hope so :laughing: "},"comment":{"url":"https://api.github.com/repos/aurelia/dialog/issues/comments/250046516","html_url":"https://github.com/aurelia/dialog/pull/209#issuecomment-250046516","issue_url":"https://api.github.com/repos/aurelia/dialog/issues/209","id":250046516,"user":{"login":"PWKad","id":4238393,"avatar_url":"https://avatars.githubusercontent.com/u/4238393?v=3","gravatar_id":"","url":"https://api.github.com/users/PWKad","html_url":"https://github.com/PWKad","followers_url":"https://api.github.com/users/PWKad/followers","following_url":"https://api.github.com/users/PWKad/following{/other_user}","gists_url":"https://api.github.com/users/PWKad/gists{/gist_id}","starred_url":"https://api.github.com/users/PWKad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PWKad/subscriptions","organizations_url":"https://api.github.com/users/PWKad/orgs","repos_url":"https://api.github.com/users/PWKad/repos","events_url":"https://api.github.com/users/PWKad/events{/privacy}","received_events_url":"https://api.github.com/users/PWKad/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T01:20:19Z","updated_at":"2016-09-28T01:20:19Z","body":"@StrahilKazlachev can you run `gulp lint` and fix the issues in `dialog-service.js` and any new ones?  It looks like at some point there were two created in master so if you want to include them in this PR that would be fine else I'll fix them (just trying to not to create a merge issue yet)"}}
{"actor":{"display_login":"PWKad"}}