{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5071","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5071/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5071/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5071/events","html_url":"https://github.com/Automattic/wp-calypso/pull/5071","id":151550525,"number":5071,"title":"WIP: Add \"insert items\" menu item to editor","user":{"login":"dmsnell","id":5431237,"avatar_url":"https://avatars.githubusercontent.com/u/5431237?v=3","gravatar_id":"","url":"https://api.github.com/users/dmsnell","html_url":"https://github.com/dmsnell","followers_url":"https://api.github.com/users/dmsnell/followers","following_url":"https://api.github.com/users/dmsnell/following{/other_user}","gists_url":"https://api.github.com/users/dmsnell/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsnell/subscriptions","organizations_url":"https://api.github.com/users/dmsnell/orgs","repos_url":"https://api.github.com/users/dmsnell/repos","events_url":"https://api.github.com/users/dmsnell/events{/privacy}","received_events_url":"https://api.github.com/users/dmsnell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Plans","name":"Plans","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/85","html_url":"https://github.com/Automattic/wp-calypso/milestones/Plans:%20Iteration%202","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/85/labels","id":1743970,"number":85,"title":"Plans: Iteration 2","description":"","creator":{"login":"rralian","id":134044,"avatar_url":"https://avatars.githubusercontent.com/u/134044?v=3","gravatar_id":"","url":"https://api.github.com/users/rralian","html_url":"https://github.com/rralian","followers_url":"https://api.github.com/users/rralian/followers","following_url":"https://api.github.com/users/rralian/following{/other_user}","gists_url":"https://api.github.com/users/rralian/gists{/gist_id}","starred_url":"https://api.github.com/users/rralian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rralian/subscriptions","organizations_url":"https://api.github.com/users/rralian/orgs","repos_url":"https://api.github.com/users/rralian/repos","events_url":"https://api.github.com/users/rralian/events{/privacy}","received_events_url":"https://api.github.com/users/rralian/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":21,"state":"open","created_at":"2016-05-03T03:49:33Z","updated_at":"2016-05-16T21:43:17Z","due_on":"2016-05-31T05:00:00Z","closed_at":null},"comments":40,"created_at":"2016-04-28T05:08:30Z","updated_at":"2016-05-16T22:14:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5071","html_url":"https://github.com/Automattic/wp-calypso/pull/5071","diff_url":"https://github.com/Automattic/wp-calypso/pull/5071.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/5071.patch"},"body":"Part of #5070\r\n\r\nAdds an \"insert item\" menu bar to the editor toolbar to allow inserting various types of media or embeds into a post, similar to how the insert menus in mainstream applications work.\r\n\r\n![artboard1](https://cloud.githubusercontent.com/assets/5431237/14875734/72a65c6a-0cc2-11e6-9e43-915999e507a8.png)\r\n\r\nThis PR's goal is to add in the empty shell on the editor toolbar which will make it easy to add other modules or embeds.\r\n\r\n**Testing**\r\n - Load the editor\r\n - Check for the new dropdown on the top left of the toolbar\r\n\r\n**Questions**\r\n - [ ] There's something pretty strange about the way this code replaces the top HTML in the split button. It's deeply coupled into the DOM structure of what the TinyMCE menu creates. I would appreciate some advice on a better or more idiomatic way to do this.\r\n - [x] <del>The toolbar button initialization and runtime code is tightly coupled to TinyMCE's API. This is making it hard to abstract the buttons and actions; for example, it's not possible to simply add the existing media plugin into the new dropdown menu. Our options are to **refactor the existing TinyMCE plugins** or to provide an adapter interface to mock the TinyMCE API and pass through the appropriate calls to the actual TinyMCE. None of this feels like the \"right way to do it\" so if anyone can offer some wisdom that would help us keep the code clean.</del> As long as the other plugins create a new TinyMCE command, we can use that command in the insert menu without having to rewire anything else.\r\n\r\ncc: @dan @aduth @drw158 @rodrigoi "},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/219564777","html_url":"https://github.com/Automattic/wp-calypso/pull/5071#issuecomment-219564777","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5071","id":219564777,"user":{"login":"drw158","id":618551,"avatar_url":"https://avatars.githubusercontent.com/u/618551?v=3","gravatar_id":"","url":"https://api.github.com/users/drw158","html_url":"https://github.com/drw158","followers_url":"https://api.github.com/users/drw158/followers","following_url":"https://api.github.com/users/drw158/following{/other_user}","gists_url":"https://api.github.com/users/drw158/gists{/gist_id}","starred_url":"https://api.github.com/users/drw158/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drw158/subscriptions","organizations_url":"https://api.github.com/users/drw158/orgs","repos_url":"https://api.github.com/users/drw158/repos","events_url":"https://api.github.com/users/drw158/events{/privacy}","received_events_url":"https://api.github.com/users/drw158/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T22:14:38Z","updated_at":"2016-05-16T22:14:38Z","body":"I just updated the design of the button\r\n\r\n![screen shot 2016-05-16 at 5 08 38 pm](https://cloud.githubusercontent.com/assets/618551/15305468/f05bb7de-1b88-11e6-9509-74b273eb2b34.png)\r\n\r\nThis increases the over size of the clickable area. The caret changes color, only while hovering on the caret element.\r\n\r\nI couldn't figure out how to lighten the add media icon while hovering over the caret (the add media icon precedes the caret icon).\r\n\r\nBecause of this change, I don't think aligning the design of the text color button is totally relevant anymore. It wouldn't make sense to adopt the new add media button design. They act similar enough right now imo.\r\n\r\nCan we do one last review/check and enable for horizon and wpcalypso?"}}