{"action":"created","comment":{"url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls/comments/58664476","id":58664476,"diff_hunk":"@@ -71,14 +71,56 @@ module app.core.metaschema {\n                 var properties = dataschema['properties'];\n \n                 _.forOwn(properties, (value, key) => {\n-                    elements.push({\n-                        \"type\": \"Control\",\n-                        \"label\": _.capitalize(key),\n-                        \"scope\": {\n-                            \"$ref\": \"#/properties/\" + key\n-                        },\n-                        \"readOnly\": !value['enum'] && (key === 'type' || key === 'scope')\n-                    })\n+                    if (key == 'rule') {\n+                        elements.push({\n+                            \"type\": \"Group\",\n+                            \"label\": _.capitalize(key),\n+                            \"elements\": [\n+                                {\n+                                    \"type\": \"Control\",\n+                                    \"label\": \"Effect\",\n+                                    \"scope\": {\n+                                        \"$ref\": \"#/properties/rule/properties/effect\"\n+                                    }\n+                                },\n+                                {\n+                                    \"type\": \"Group\",\n+                                    \"label\": \"Condition\",\n+                                    \"elements\": [\n+                                        {\n+                                            \"type\": \"VerticalLayout\",\n+                                            \"elements\": [\n+                                                {\n+                                                    \"type\": \"Control\",\n+                                                    \"label\": \"Scope\",\n+                                                    \"scope\": {\n+                                                        \"$ref\": \"#/properties/rule/properties/condition/properties/scope/properties/$ref\"\n+                                                    }\n+                                                },\n+                                                {\n+                                                    \"type\": \"Control\",\n+                                                    \"label\": \"Expected Value\",\n+                                                    \"scope\": {\n+                                                        \"$ref\": \"#/properties/rule/properties/condition/properties/expectedValue\"\n+                                                    }\n+                                                }\n+                                            ]\n+                                        }\n+                                    ]\n+\n+                                }\n+                            ]\n+                        });","path":"app/src/components/core/metaschema/Definition.ts","position":51,"original_position":51,"commit_id":"a1bbcfce79cf483a03f1887908f6f1af63528b20","original_commit_id":"a1bbcfce79cf483a03f1887908f6f1af63528b20","user":{"login":"edgarmueller","id":711092,"avatar_url":"https://avatars.githubusercontent.com/u/711092?v=3","gravatar_id":"","url":"https://api.github.com/users/edgarmueller","html_url":"https://github.com/edgarmueller","followers_url":"https://api.github.com/users/edgarmueller/followers","following_url":"https://api.github.com/users/edgarmueller/following{/other_user}","gists_url":"https://api.github.com/users/edgarmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/edgarmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edgarmueller/subscriptions","organizations_url":"https://api.github.com/users/edgarmueller/orgs","repos_url":"https://api.github.com/users/edgarmueller/repos","events_url":"https://api.github.com/users/edgarmueller/events{/privacy}","received_events_url":"https://api.github.com/users/edgarmueller/received_events","type":"User","site_admin":false},"body":"The argument for `push` is deeply nested, which I think makes it hard to follow and error prone. We might want to think about extracting factory methods for the single UI schema elements. Perhaps it would also make sense to re-use the ones from the JSON Forms Core. ","created_at":"2016-04-06T07:52:47Z","updated_at":"2016-04-06T07:52:47Z","html_url":"https://github.com/eclipsesource/JsonFormsEditor/pull/35#discussion_r58664476","pull_request_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls/comments/58664476"},"html":{"href":"https://github.com/eclipsesource/JsonFormsEditor/pull/35#discussion_r58664476"},"pull_request":{"href":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls/35","id":65319578,"html_url":"https://github.com/eclipsesource/JsonFormsEditor/pull/35","diff_url":"https://github.com/eclipsesource/JsonFormsEditor/pull/35.diff","patch_url":"https://github.com/eclipsesource/JsonFormsEditor/pull/35.patch","issue_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/issues/35","number":35,"state":"open","locked":false,"title":"Issues: #31, #30, #29, #23, #21, #13, #10, #9","user":{"login":"pancho111203","id":9058460,"avatar_url":"https://avatars.githubusercontent.com/u/9058460?v=3","gravatar_id":"","url":"https://api.github.com/users/pancho111203","html_url":"https://github.com/pancho111203","followers_url":"https://api.github.com/users/pancho111203/followers","following_url":"https://api.github.com/users/pancho111203/following{/other_user}","gists_url":"https://api.github.com/users/pancho111203/gists{/gist_id}","starred_url":"https://api.github.com/users/pancho111203/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pancho111203/subscriptions","organizations_url":"https://api.github.com/users/pancho111203/orgs","repos_url":"https://api.github.com/users/pancho111203/repos","events_url":"https://api.github.com/users/pancho111203/events{/privacy}","received_events_url":"https://api.github.com/users/pancho111203/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-05T14:58:05Z","updated_at":"2016-04-06T07:52:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00348194a3d35100127880f1822ff87dea7ff17a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls/35/commits","review_comments_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls/35/comments","review_comment_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/issues/35/comments","statuses_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/statuses/a1bbcfce79cf483a03f1887908f6f1af63528b20","head":{"label":"pancho111203:master","ref":"master","sha":"a1bbcfce79cf483a03f1887908f6f1af63528b20","user":{"login":"pancho111203","id":9058460,"avatar_url":"https://avatars.githubusercontent.com/u/9058460?v=3","gravatar_id":"","url":"https://api.github.com/users/pancho111203","html_url":"https://github.com/pancho111203","followers_url":"https://api.github.com/users/pancho111203/followers","following_url":"https://api.github.com/users/pancho111203/following{/other_user}","gists_url":"https://api.github.com/users/pancho111203/gists{/gist_id}","starred_url":"https://api.github.com/users/pancho111203/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pancho111203/subscriptions","organizations_url":"https://api.github.com/users/pancho111203/orgs","repos_url":"https://api.github.com/users/pancho111203/repos","events_url":"https://api.github.com/users/pancho111203/events{/privacy}","received_events_url":"https://api.github.com/users/pancho111203/received_events","type":"User","site_admin":false},"repo":{"id":51580543,"name":"JsonFormsEditor","full_name":"pancho111203/JsonFormsEditor","owner":{"login":"pancho111203","id":9058460,"avatar_url":"https://avatars.githubusercontent.com/u/9058460?v=3","gravatar_id":"","url":"https://api.github.com/users/pancho111203","html_url":"https://github.com/pancho111203","followers_url":"https://api.github.com/users/pancho111203/followers","following_url":"https://api.github.com/users/pancho111203/following{/other_user}","gists_url":"https://api.github.com/users/pancho111203/gists{/gist_id}","starred_url":"https://api.github.com/users/pancho111203/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pancho111203/subscriptions","organizations_url":"https://api.github.com/users/pancho111203/orgs","repos_url":"https://api.github.com/users/pancho111203/repos","events_url":"https://api.github.com/users/pancho111203/events{/privacy}","received_events_url":"https://api.github.com/users/pancho111203/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pancho111203/JsonFormsEditor","description":"","fork":true,"url":"https://api.github.com/repos/pancho111203/JsonFormsEditor","forks_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/forks","keys_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/teams","hooks_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/hooks","issue_events_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/issues/events{/number}","events_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/events","assignees_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/assignees{/user}","branches_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/branches{/branch}","tags_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/tags","blobs_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/git/refs{/sha}","trees_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/statuses/{sha}","languages_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/languages","stargazers_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/stargazers","contributors_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/contributors","subscribers_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/subscribers","subscription_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/subscription","commits_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/commits{/sha}","git_commits_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/git/commits{/sha}","comments_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/comments{/number}","issue_comment_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/issues/comments{/number}","contents_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/contents/{+path}","compare_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/merges","archive_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/downloads","issues_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/issues{/number}","pulls_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/pulls{/number}","milestones_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/milestones{/number}","notifications_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/labels{/name}","releases_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/releases{/id}","deployments_url":"https://api.github.com/repos/pancho111203/JsonFormsEditor/deployments","created_at":"2016-02-12T10:23:57Z","updated_at":"2016-02-12T10:23:57Z","pushed_at":"2016-04-05T15:17:15Z","git_url":"git://github.com/pancho111203/JsonFormsEditor.git","ssh_url":"git@github.com:pancho111203/JsonFormsEditor.git","clone_url":"https://github.com/pancho111203/JsonFormsEditor.git","svn_url":"https://github.com/pancho111203/JsonFormsEditor","homepage":null,"size":1444,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eclipsesource:master","ref":"master","sha":"3e31e16b9bd6ecc9e4d276cf6cb3837abed19a1a","user":{"login":"eclipsesource","id":525860,"avatar_url":"https://avatars.githubusercontent.com/u/525860?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipsesource","html_url":"https://github.com/eclipsesource","followers_url":"https://api.github.com/users/eclipsesource/followers","following_url":"https://api.github.com/users/eclipsesource/following{/other_user}","gists_url":"https://api.github.com/users/eclipsesource/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipsesource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipsesource/subscriptions","organizations_url":"https://api.github.com/users/eclipsesource/orgs","repos_url":"https://api.github.com/users/eclipsesource/repos","events_url":"https://api.github.com/users/eclipsesource/events{/privacy}","received_events_url":"https://api.github.com/users/eclipsesource/received_events","type":"Organization","site_admin":false},"repo":{"id":45380492,"name":"JsonFormsEditor","full_name":"eclipsesource/JsonFormsEditor","owner":{"login":"eclipsesource","id":525860,"avatar_url":"https://avatars.githubusercontent.com/u/525860?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipsesource","html_url":"https://github.com/eclipsesource","followers_url":"https://api.github.com/users/eclipsesource/followers","following_url":"https://api.github.com/users/eclipsesource/following{/other_user}","gists_url":"https://api.github.com/users/eclipsesource/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipsesource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipsesource/subscriptions","organizations_url":"https://api.github.com/users/eclipsesource/orgs","repos_url":"https://api.github.com/users/eclipsesource/repos","events_url":"https://api.github.com/users/eclipsesource/events{/privacy}","received_events_url":"https://api.github.com/users/eclipsesource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipsesource/JsonFormsEditor","description":"","fork":false,"url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor","forks_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/forks","keys_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/teams","hooks_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/hooks","issue_events_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/issues/events{/number}","events_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/events","assignees_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/assignees{/user}","branches_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/branches{/branch}","tags_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/tags","blobs_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/languages","stargazers_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/stargazers","contributors_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/contributors","subscribers_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/subscribers","subscription_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/subscription","commits_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/contents/{+path}","compare_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/merges","archive_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/downloads","issues_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/issues{/number}","pulls_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/labels{/name}","releases_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/releases{/id}","deployments_url":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/deployments","created_at":"2015-11-02T08:06:44Z","updated_at":"2016-04-01T14:12:27Z","pushed_at":"2016-04-05T15:17:15Z","git_url":"git://github.com/eclipsesource/JsonFormsEditor.git","ssh_url":"git@github.com:eclipsesource/JsonFormsEditor.git","clone_url":"https://github.com/eclipsesource/JsonFormsEditor.git","svn_url":"https://github.com/eclipsesource/JsonFormsEditor","homepage":null,"size":1444,"stargazers_count":4,"watchers_count":4,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":26,"forks":2,"open_issues":26,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls/35"},"html":{"href":"https://github.com/eclipsesource/JsonFormsEditor/pull/35"},"issue":{"href":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/issues/35"},"comments":{"href":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/eclipsesource/JsonFormsEditor/statuses/a1bbcfce79cf483a03f1887908f6f1af63528b20"}}}}