{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/liveblog/issues/227","labels_url":"https://api.github.com/repos/Automattic/liveblog/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/liveblog/issues/227/comments","events_url":"https://api.github.com/repos/Automattic/liveblog/issues/227/events","html_url":"https://github.com/Automattic/liveblog/pull/227","id":126521035,"number":227,"title":"Add widget to display a list of key events","user":{"login":"rodrigoprimo","id":77215,"avatar_url":"https://avatars.githubusercontent.com/u/77215?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigoprimo","html_url":"https://github.com/rodrigoprimo","followers_url":"https://api.github.com/users/rodrigoprimo/followers","following_url":"https://api.github.com/users/rodrigoprimo/following{/other_user}","gists_url":"https://api.github.com/users/rodrigoprimo/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigoprimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigoprimo/subscriptions","organizations_url":"https://api.github.com/users/rodrigoprimo/orgs","repos_url":"https://api.github.com/users/rodrigoprimo/repos","events_url":"https://api.github.com/users/rodrigoprimo/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigoprimo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-13T21:37:39Z","updated_at":"2016-01-15T16:26:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/liveblog/pulls/227","html_url":"https://github.com/Automattic/liveblog/pull/227","diff_url":"https://github.com/Automattic/liveblog/pull/227.diff","patch_url":"https://github.com/Automattic/liveblog/pull/227.patch"},"body":"I have created a first version of the widget to display a list of key events (issue #224). It is a simple wrapper around [liveblog_key_events] shortcode and its single parameter is the widget title. The number of key events shown is controlled by the Liveblog post configuration. This is a screenshot of the widget form:\r\n\r\n![Widget form](https://raw.githubusercontent.com/rodrigoprimo/liveblog/gh-pages/widget-form.png)\r\n\r\nAnd here a screenshot of the widget displaying key entries when the user is viewing a Liveblog post:\r\n\r\n![Widget form](https://raw.githubusercontent.com/rodrigoprimo/liveblog/gh-pages/widget.png)\r\n\r\nIt would be great to have general comments or suggestions on this first version since I'm still familiarizing myself with this plugin. Besides that, I have two specific questions to ask:\r\n\r\n* The issue description (#224) suggests the use of do_shortcode() inside the widget. I decided to call WPCOM_Liveblog_Entry_Key_Events::shortcode() directly as it is more straightforward and AFAIK there are no drawbacks. Am I missing something?\r\n\r\n* I like unit tests and I'm happy to see that they are becoming more popular in the WP community in recent years. It was great to see that Liveblog has its own tests. But the problem is that I'm not sure if it is worth writing unit tests for something like a widget. On one hand, it is always great to have your code covered by tests. On the other hand, a widget basically outputs HTML and I tend to think that it is hard to setup and maintain tests for this kind of code. What do you guys usually do in situations like this?"},"comment":{"url":"https://api.github.com/repos/Automattic/liveblog/issues/comments/172006603","html_url":"https://github.com/Automattic/liveblog/pull/227#issuecomment-172006603","issue_url":"https://api.github.com/repos/Automattic/liveblog/issues/227","id":172006603,"user":{"login":"rodrigoprimo","id":77215,"avatar_url":"https://avatars.githubusercontent.com/u/77215?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigoprimo","html_url":"https://github.com/rodrigoprimo","followers_url":"https://api.github.com/users/rodrigoprimo/followers","following_url":"https://api.github.com/users/rodrigoprimo/following{/other_user}","gists_url":"https://api.github.com/users/rodrigoprimo/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigoprimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigoprimo/subscriptions","organizations_url":"https://api.github.com/users/rodrigoprimo/orgs","repos_url":"https://api.github.com/users/rodrigoprimo/repos","events_url":"https://api.github.com/users/rodrigoprimo/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigoprimo/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T16:26:21Z","updated_at":"2016-01-15T16:26:21Z","body":"@philipjohn thanks for your input. Any comment on using WPCOM_Liveblog_Entry_Key_Events::shortcode() instead of do_shortcode() (see the description of the PR)?"}}