{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/2758","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/2758/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/2758/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/2758/events","html_url":"https://github.com/WordPress/gutenberg/issues/2758","id":259241017,"number":2758,"title":"Editable: Invoke onChange on every input","user":{"login":"aduth","id":1779930,"avatar_url":"https://avatars1.githubusercontent.com/u/1779930?v=4","gravatar_id":"","url":"https://api.github.com/users/aduth","html_url":"https://github.com/aduth","followers_url":"https://api.github.com/users/aduth/followers","following_url":"https://api.github.com/users/aduth/following{/other_user}","gists_url":"https://api.github.com/users/aduth/gists{/gist_id}","starred_url":"https://api.github.com/users/aduth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduth/subscriptions","organizations_url":"https://api.github.com/users/aduth/orgs","repos_url":"https://api.github.com/users/aduth/repos","events_url":"https://api.github.com/users/aduth/events{/privacy}","received_events_url":"https://api.github.com/users/aduth/received_events","type":"User","site_admin":false},"labels":[{"id":598548627,"url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Component]%20Rich%20Text","name":"[Component] Rich Text","color":"fbca04","default":false},{"id":531680824,"url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Type]%20Task","name":"[Type] Task","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":{"login":"iseulde","id":4710635,"avatar_url":"https://avatars3.githubusercontent.com/u/4710635?v=4","gravatar_id":"","url":"https://api.github.com/users/iseulde","html_url":"https://github.com/iseulde","followers_url":"https://api.github.com/users/iseulde/followers","following_url":"https://api.github.com/users/iseulde/following{/other_user}","gists_url":"https://api.github.com/users/iseulde/gists{/gist_id}","starred_url":"https://api.github.com/users/iseulde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iseulde/subscriptions","organizations_url":"https://api.github.com/users/iseulde/orgs","repos_url":"https://api.github.com/users/iseulde/repos","events_url":"https://api.github.com/users/iseulde/events{/privacy}","received_events_url":"https://api.github.com/users/iseulde/received_events","type":"User","site_admin":false},"assignees":[{"login":"iseulde","id":4710635,"avatar_url":"https://avatars3.githubusercontent.com/u/4710635?v=4","gravatar_id":"","url":"https://api.github.com/users/iseulde","html_url":"https://github.com/iseulde","followers_url":"https://api.github.com/users/iseulde/followers","following_url":"https://api.github.com/users/iseulde/following{/other_user}","gists_url":"https://api.github.com/users/iseulde/gists{/gist_id}","starred_url":"https://api.github.com/users/iseulde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iseulde/subscriptions","organizations_url":"https://api.github.com/users/iseulde/orgs","repos_url":"https://api.github.com/users/iseulde/repos","events_url":"https://api.github.com/users/iseulde/events{/privacy}","received_events_url":"https://api.github.com/users/iseulde/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2017-09-20T17:25:15Z","updated_at":"2018-02-15T14:18:44Z","closed_at":"2018-02-15T14:18:44Z","author_association":"MEMBER","body":"Related: #2750\r\nExplored in #2418\r\nSupersedes #1240\r\n\r\nIn an effort to keep post state in sync and dramatically simplify handling of content, we should invoke the Editable `onChange` callback on every input event which occurs within the editable field. Previously we had decided to trigger the callback only when focus leaves the field, resulting in unexpected behavior as described at #1240. The reason for this was performance concerns in serializing content on every keypress with the overhead of [our value getter mapping](https://github.com/WordPress/gutenberg/blob/544d2a4b997ed879b6865aa256e93bf92a8655b8/blocks/editable/index.js#L39-L53). Since Editable content fields are used in a more granular fashion than normal for a TinyMCE instance (per paragraph, not per document), this is unlikely to pose as much of a concern, and may be helped with efforts of #2750.\r\n\r\nThe current approach in #2418 implements a throttled callback. While this could remedy performance concerns, it also introduces a new set of concerns with canceling pending callbacks in response to future user actions (save, etc). See https://github.com/Automattic/wp-calypso/pull/17819 as an example of where we have encountered this recently in the Calypso editor where we use this approach.\r\n\r\nIt will be important to consider how Undo / Redo operates with this approach, particularly with behaviors implemented as part of #1943 with the TinyMCE -> Redux undo handoff. For example, it would be non-ideal for Undo to pop one character at a time when used in succession."},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/365940159","html_url":"https://github.com/WordPress/gutenberg/issues/2758#issuecomment-365940159","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/2758","id":365940159,"user":{"login":"youknowriad","id":272444,"avatar_url":"https://avatars3.githubusercontent.com/u/272444?v=4","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false},"created_at":"2018-02-15T14:18:44Z","updated_at":"2018-02-15T14:18:44Z","author_association":"CONTRIBUTOR","body":"closed by #4955"}}
{"actor":{"display_login":"youknowriad"}}