{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/335","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/335/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/335/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/335/events","html_url":"https://github.com/WordPress/gutenberg/pull/335","id":217391540,"number":335,"title":"Render generic fallback block for unknown block type","user":{"login":"aduth","id":1779930,"avatar_url":"https://avatars2.githubusercontent.com/u/1779930?v=3","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":562969841,"url":"https://api.github.com/repos/WordPress/gutenberg/labels/Plugin","name":"Plugin","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-03-27T22:16:13Z","updated_at":"2017-03-29T11:24:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/335","html_url":"https://github.com/WordPress/gutenberg/pull/335","diff_url":"https://github.com/WordPress/gutenberg/pull/335.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/335.patch"},"body":"This pull request seeks to start handling of blocks which cannot be associated with a known registered block type. The current implementation is very basic and unfinished; merely setting HTML of a `div` (dangerously) and displaying an overlay with messaging atop the rendered content.\r\n\r\n![Unknown Block](https://cloud.githubusercontent.com/assets/1779930/24380342/c9c7bcf2-1318-11e7-9889-0fbbc7d00ed6.png)\r\n\r\nCaveats:\r\n\r\n- Again, this is temporary / WIP. I highly doubt we'd want \"Unknown Block\" messaging shown atop the block, but at least this gives a better sense that those blocks were detected by the parser.\r\n\r\nOpen questions:\r\n\r\n- How do we expect these sorts of blocks to behave from a UX perspective? (cc @jasmussen)\r\n- Is a \"generic\" block a good approach as the fallback?\r\n- Does it make sense to expose `isVisible` as an option to blocks? In this case it was something of an internal flag to prevent the generic block being made available as an option in the inserter, but I could potentially see this being useful for other cases (discontinuing blocks) and aligns reasonably well to `isVisible` control behavior.\r\n\r\nImplementation notes:\r\n\r\n- Moved parser logic back into base `blocks/index.js` . Primarily to enable attribute parsing to wait until block has been determined. The fallback logic occurs in the `Editor` class, not in the parsing, since the block parser should not be aware of this generic block type. (cc @youknowriad for thoughts)\r\n- Now treating `settings.edit` as a component, which has a few nice advantages around avoiding wrapper elements and enabling the plugin author to define `edit` and `save` as `Component` classes (e.g. if needing to trigger network request upon mount)"},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/290060865","html_url":"https://github.com/WordPress/gutenberg/pull/335#issuecomment-290060865","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/335","id":290060865,"user":{"login":"annaephox","id":25762760,"avatar_url":"https://avatars3.githubusercontent.com/u/25762760?v=3","gravatar_id":"","url":"https://api.github.com/users/annaephox","html_url":"https://github.com/annaephox","followers_url":"https://api.github.com/users/annaephox/followers","following_url":"https://api.github.com/users/annaephox/following{/other_user}","gists_url":"https://api.github.com/users/annaephox/gists{/gist_id}","starred_url":"https://api.github.com/users/annaephox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annaephox/subscriptions","organizations_url":"https://api.github.com/users/annaephox/orgs","repos_url":"https://api.github.com/users/annaephox/repos","events_url":"https://api.github.com/users/annaephox/events{/privacy}","received_events_url":"https://api.github.com/users/annaephox/received_events","type":"User","site_admin":false},"created_at":"2017-03-29T11:24:32Z","updated_at":"2017-03-29T11:24:32Z","body":"Hi! We (Ephox) have been thinking about this issue and experimenting with some ideas...\r\n\r\nImagine that in addition to all the block types that we are building ( #16 ) we create a **TinyMCE Block Type**. So, when you click on the inserter ( #323 ), TinyMCE Block Type would pop up as one of the choices. \r\n\r\nThe idea behind this block type would be to leverage TinyMCE to:\r\n- satisfy the edge cases i.e. the people who want to type up complex documents with tables, lists, and fancy formatting, spellchecking, MS Word cut and paste, etc\r\n- provide backwards compatibility\r\n- provide accessibility and \r\n- leverage TinyMCE mobile for editing on tablets and mobile phones\r\n\r\n**The UI on the TinyMCE Block Type would look just like the rest of the WP blocks**, so it would appear seamless in the context of the whole page.\r\n\r\nA really rough sketch: blue are all the WP block types; red is the TinyMCE Block Type\r\n\r\n![tinymce block type sketch](https://cloud.githubusercontent.com/assets/25762760/24452112/0651eef6-14c5-11e7-9df2-1f936e8aa33c.jpg)\r\n\r\n( cc @intronic @Afraithe )"}}
{"actor":{"display_login":"annaephox"}}