{"action":"created","issue":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/issues/532","repository_url":"https://api.github.com/repos/ckeditor/ckeditor5-engine","labels_url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/issues/532/labels{/name}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/issues/532/comments","events_url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/issues/532/events","html_url":"https://github.com/ckeditor/ckeditor5-engine/issues/532","id":165739992,"number":532,"title":"Schema improvements","user":{"login":"scofalik","id":1502228,"avatar_url":"https://avatars.githubusercontent.com/u/1502228?v=3","gravatar_id":"","url":"https://api.github.com/users/scofalik","html_url":"https://github.com/scofalik","followers_url":"https://api.github.com/users/scofalik/followers","following_url":"https://api.github.com/users/scofalik/following{/other_user}","gists_url":"https://api.github.com/users/scofalik/gists{/gist_id}","starred_url":"https://api.github.com/users/scofalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scofalik/subscriptions","organizations_url":"https://api.github.com/users/scofalik/orgs","repos_url":"https://api.github.com/users/scofalik/repos","events_url":"https://api.github.com/users/scofalik/events{/privacy}","received_events_url":"https://api.github.com/users/scofalik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/labels/candidate:1.0.0","name":"candidate:1.0.0","color":"ffdd33"},{"url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/labels/module:model","name":"module:model","color":"fef2c0"},{"url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/labels/status:discussion","name":"status:discussion","color":"e6e6e6"},{"url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/labels/type:enhancement","name":"type:enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-07-15T08:52:39Z","updated_at":"2016-10-26T12:28:15Z","closed_at":null,"body":"As we know, `Schema` is probably the weakest part of engine model right now. We didn't have clear requirements and idea how it will be used when we created it.\r\n\r\nSince iteration 2 is about bringing stable API, I think we need to include refactoring/rewritting/improving `Schema`. I open this issue so we can share requirements and thoughts on how it could work.\r\n\r\nSome conclusions that we aready drawn:\r\n* `SchemaItem`s should be based on classes mechanism and extending.\r\n* We need custom \"checking\" functions for some rules, which could be provided as some kind of callbacks.\r\n* We need better attributes handling: introduce rule that allow or disallow element basing on more than one attribute and allow or disallow basing on attribute value, also we need a way to specify \"pairs\" (i.e. text can have `linkHref` or `linkName` but not both -- I remember there were cases like this)."},"comment":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/issues/comments/256332392","html_url":"https://github.com/ckeditor/ckeditor5-engine/issues/532#issuecomment-256332392","issue_url":"https://api.github.com/repos/ckeditor/ckeditor5-engine/issues/532","id":256332392,"user":{"login":"Reinmar","id":156149,"avatar_url":"https://avatars.githubusercontent.com/u/156149?v=3","gravatar_id":"","url":"https://api.github.com/users/Reinmar","html_url":"https://github.com/Reinmar","followers_url":"https://api.github.com/users/Reinmar/followers","following_url":"https://api.github.com/users/Reinmar/following{/other_user}","gists_url":"https://api.github.com/users/Reinmar/gists{/gist_id}","starred_url":"https://api.github.com/users/Reinmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reinmar/subscriptions","organizations_url":"https://api.github.com/users/Reinmar/orgs","repos_url":"https://api.github.com/users/Reinmar/repos","events_url":"https://api.github.com/users/Reinmar/events{/privacy}","received_events_url":"https://api.github.com/users/Reinmar/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T12:28:15Z","updated_at":"2016-10-26T12:28:15Z","body":"Especially, taken that it knows that it's here only temporary :P\r\n\r\nOne more thing:\r\n\r\n```\r\nconst attributes = ( node instanceof Element ) ? node.getAttributes() : undefined;\r\n\r\n\t\treturn this.schema.check( { name: this._getNodeSchemaName( node ), attributes, inside: path } );\r\n```\r\n\r\nAnd I've got e.g. 10 tests failing.\r\n\r\n```\r\nconst attributes = ( node instanceof Element ) ? node.getAttributes() : null;\r\n\r\n\t\treturn this.schema.check( { name: this._getNodeSchemaName( node ), attributes, inside: path } );\r\n```\r\n\r\nAnd I've got 20 tests failing.\r\n\r\nVery curious :D"}}
{"actor":{"display_login":"Reinmar"}}