{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/5054","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5054/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5054/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5054/events","html_url":"https://github.com/WordPress/gutenberg/issues/5054","id":297159240,"number":5054,"title":"Inserter sometimes replaces empty blocks, and sometimes inserts after","user":{"login":"notnownikki","id":3314354,"avatar_url":"https://avatars2.githubusercontent.com/u/3314354?v=4","gravatar_id":"","url":"https://api.github.com/users/notnownikki","html_url":"https://github.com/notnownikki","followers_url":"https://api.github.com/users/notnownikki/followers","following_url":"https://api.github.com/users/notnownikki/following{/other_user}","gists_url":"https://api.github.com/users/notnownikki/gists{/gist_id}","starred_url":"https://api.github.com/users/notnownikki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notnownikki/subscriptions","organizations_url":"https://api.github.com/users/notnownikki/orgs","repos_url":"https://api.github.com/users/notnownikki/repos","events_url":"https://api.github.com/users/notnownikki/events{/privacy}","received_events_url":"https://api.github.com/users/notnownikki/received_events","type":"User","site_admin":false},"labels":[{"id":644027893,"url":"https://api.github.com/repos/WordPress/gutenberg/labels/Needs%20Design%20Feedback","name":"Needs Design Feedback","color":"0e8a16","default":false},{"id":531680828,"url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Type]%20Question","name":"[Type] Question","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-14T16:26:11Z","updated_at":"2018-02-22T11:26:59Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Issue Overview\r\n\r\nIf I have my cursor in an empty paragraph block, and I use the inserter to insert a new heading or paragraph block, it transforms the block into a heading, or does nothing. But, if I have my cursor in an empty heading block and use the inserter to insert a new paragraph or heading, a new one is inserted, every time. In both cases, the title of the inserter is \"add block\", but it does different things.\r\n\r\nApparently there is some philosophical discussion about \"is an empty block a block\"? But from a UI perspective, an empty block looks like a block and behaves like a block, but the inserter changes behaviour, and there's no hint about what behaviour it's going to do.\r\n\r\n## Steps to Reproduce (for bugs)\r\n1. Have an empty paragraph block\r\n2. \"Insert\" a heading. Heading will replace the block.\r\n3. Have an empty heading block.\r\n4. Insert a heading. Heading will actually be inserted.\r\n\r\n## Expected Behavior\r\n\r\nThe inserter's behaviour should be consistent. Even if we're saying \"empty blocks get transformed\", it should consistently do this."},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/367652120","html_url":"https://github.com/WordPress/gutenberg/issues/5054#issuecomment-367652120","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5054","id":367652120,"user":{"login":"jasmussen","id":1204802,"avatar_url":"https://avatars3.githubusercontent.com/u/1204802?v=4","gravatar_id":"","url":"https://api.github.com/users/jasmussen","html_url":"https://github.com/jasmussen","followers_url":"https://api.github.com/users/jasmussen/followers","following_url":"https://api.github.com/users/jasmussen/following{/other_user}","gists_url":"https://api.github.com/users/jasmussen/gists{/gist_id}","starred_url":"https://api.github.com/users/jasmussen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasmussen/subscriptions","organizations_url":"https://api.github.com/users/jasmussen/orgs","repos_url":"https://api.github.com/users/jasmussen/repos","events_url":"https://api.github.com/users/jasmussen/events{/privacy}","received_events_url":"https://api.github.com/users/jasmussen/received_events","type":"User","site_admin":false},"created_at":"2018-02-22T11:26:59Z","updated_at":"2018-02-22T11:26:59Z","author_association":"CONTRIBUTOR","body":"This ticket seems to touch upon a larger issue, that seems to have been surfaced as other refinements take care of the _obvious stuff_, making the _less obvious but still important stuff_ suddenly shine brighter.\r\n\r\nFor the case in point, the empty paragraph block has become the _commandline_. It's a magical block that allows you to start typing to make it a text block, or use the slash command to insert, or use the recent blocks interface on the right to replace it entirely. \r\n\r\nThis is cool, because it's a singular interface you get access to whenever you make a linebreak. \r\n\r\nBut why doesn't this work in _all_ text blocks, including the Heading? \r\n\r\n- Why can't I use the slash command in all text blocks?\r\n- Why aren't all text blocks replaced when inserting another block into it?\r\n\r\nThe reason why the empty paragraph block is _replaced_ when it's empty and you insert another block, is because we are trying to adhere to what would happen in a non-block editor. You'd put the caret on an empty line, insert an image, and then you'd now have an image instead of an empty paragraph. But I do agree, it would be nice if this behavior was the same across all basic text blocks.\r\n\r\nI don't know how hard that would be for us to accomplish, but it would definitely be worth looking into. \r\n\r\nAlso related: https://github.com/WordPress/gutenberg/issues/3785#issuecomment-351412573\r\n"}}
{"actor":{"display_login":"jasmussen"}}