{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5598","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5598/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5598/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5598/events","html_url":"https://github.com/Automattic/wp-calypso/pull/5598","id":156899442,"number":5598,"title":"Editor: Display warning when post type not supported by site","user":{"login":"aduth","id":1779930,"avatar_url":"https://avatars.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":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Custom%20Post%20Types%20(CPT)","name":"Custom Post Types (CPT)","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Editor","name":"Editor","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Design%20Review","name":"[Status] Needs Design Review","color":"009800"},{"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":null,"comments":2,"created_at":"2016-05-26T04:07:30Z","updated_at":"2016-05-26T14:41:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5598","html_url":"https://github.com/Automattic/wp-calypso/pull/5598","diff_url":"https://github.com/Automattic/wp-calypso/pull/5598.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/5598.patch"},"body":"Related: #5398 \r\n\r\nThis pull request seeks to display a warning in the post editor when attempting to edit a post type which is not supported by the site.\r\n\r\nBefore|After\r\n---|---\r\n![Before](https://cloud.githubusercontent.com/assets/1779930/15563321/8475a6f2-22d5-11e6-8a4b-dd06ceea9f4a.png)|![After](https://cloud.githubusercontent.com/assets/1779930/15563318/7a6857ae-22d5-11e6-9d35-5e772268e5df.png)\r\n\r\n__Testing instructions:__\r\n\r\nEnsure there are no regressions or warnings when attempting to edit an existing post type, particularly posts or pages.\r\n\r\nVerify that when attempting to edit a post type which does not exist for the site, the warning is shown, e.g. [`/edit/xyz`](http://calypso.localhost:3000/edit/xyz)."},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/221890842","html_url":"https://github.com/Automattic/wp-calypso/pull/5598#issuecomment-221890842","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5598","id":221890842,"user":{"login":"aduth","id":1779930,"avatar_url":"https://avatars.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},"created_at":"2016-05-26T14:41:02Z","updated_at":"2016-05-26T14:41:02Z","body":"Thanks for the feedback @folletto ! Admittedly I made a few barely-founded assumptions here, so happy to make large revisions.\r\n\r\nThe scenario here is not a common one, but perhaps a user was referred to edit testimonials by the link `/edit/jetpack-testimonials`. They choose a site, but it hasn't enabled the post type. Currently, the editor loads and gives the user the false impression they can start writing. This isn't exclusive to our own supported post types, e.g. if a user manually edits the path with a nonsensical post type.\r\n\r\nRelated: #5329 (list view equivalent)\r\n\r\n>What's the reason to redirect to `stats`? Wouldn't be better to redirect on Posts? I'm saying this mostly guessing the user intent.\r\n\r\nYeah, I thought it useful to include some sort of \"Get me out of here!\" link, and stats (the default landing for My Sites) came to mind, though I do think Posts may be more useful for what a user would be trying to achieve if caught in this scenario.\r\n\r\n>Can we swap the order? Blue-right (primary), white-left?\r\n\r\nSure.\r\n\r\n>Could we write a text that gives a better idea of what's happening?\r\n\r\nYep, in retrospect, the text isn't very helpful or comforting. Also consider that, while related, this doesn't yet satisfy the requirements of #5398, which is: if a site supports a particular post type, but the user doesn't meet the requirements to be able to manage that type of post. In those cases, we'll likely want a similar experience (in case we can think of text that applies well to both).\r\n\r\nWhat you've suggested seems to work well, though as mentioned above, this isn't exclusive to post types that we offer on WordPress.com/Jetpack. I'd suggest we'd either change the \"read more\" line of your proposal to something more of a suggestion (\"Check out our custom post types!\") or conditionally shown only if the attempted type trying to be accessed matches one of our supported types (as we did in #5329).\r\n\r\nI'm also not sure \"normal post\" conveys any more meaning. Maybe \"blog post\" ? Maybe eliminate this button altogether?"}}
{"actor":{"display_login":"aduth"}}