{"action":"created","comment":{"url":"https://api.github.com/repos/storybooks/storybook/pulls/comments/186756507","pull_request_review_id":118398206,"id":186756507,"diff_hunk":"@@ -0,0 +1,34 @@\n+import deprecate from 'util-deprecate';\n+\n+// Create a decorator that can be used both in the (deprecated) old \"hoc\" style:\n+//   .add('story', decorator(options)(() => <Story />));\n+//\n+// And in the new, \"parameterized\" style:\n+//   .addDecorator(decorator)\n+//   .add('story', () => <Story />, { name: { parameters } });\n+\n+export const makeTransitionalDecorator = ({ name, parameterName, wrapper }) => {\n+  const decorator = options => (getStory, context) => {\n+    const parameters = context.parameters && context.parameters[parameterName];\n+\n+    return wrapper(getStory, context, {\n+      options,\n+      parameters,\n+    });\n+  };\n+\n+  const hoc = deprecate(\n+    options => story => context => decorator(options)(story, context),\n+    `Passing stories directly into ${name}() is deprecated, instead use addDecorator(${name}) and pass options with the '${parameterName}' parameter`","path":"lib/addons/src/transitional-decorator.js","position":22,"original_position":22,"commit_id":"98a99b5c2f4b9c8e6189c2d4d3dd1faeedea58ed","original_commit_id":"98a99b5c2f4b9c8e6189c2d4d3dd1faeedea58ed","user":{"login":"Hypnosphi","id":6651625,"avatar_url":"https://avatars3.githubusercontent.com/u/6651625?v=4","gravatar_id":"","url":"https://api.github.com/users/Hypnosphi","html_url":"https://github.com/Hypnosphi","followers_url":"https://api.github.com/users/Hypnosphi/followers","following_url":"https://api.github.com/users/Hypnosphi/following{/other_user}","gists_url":"https://api.github.com/users/Hypnosphi/gists{/gist_id}","starred_url":"https://api.github.com/users/Hypnosphi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hypnosphi/subscriptions","organizations_url":"https://api.github.com/users/Hypnosphi/orgs","repos_url":"https://api.github.com/users/Hypnosphi/repos","events_url":"https://api.github.com/users/Hypnosphi/events{/privacy}","received_events_url":"https://api.github.com/users/Hypnosphi/received_events","type":"User","site_admin":false},"body":"Or even global `addDecorator(backgrounds(myBackgrounds)` if you want them for all the stories (which is quite often the case)","created_at":"2018-05-08T14:53:13Z","updated_at":"2018-05-08T14:53:13Z","html_url":"https://github.com/storybooks/storybook/pull/3559#discussion_r186756507","pull_request_url":"https://api.github.com/repos/storybooks/storybook/pulls/3559","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/storybooks/storybook/pulls/comments/186756507"},"html":{"href":"https://github.com/storybooks/storybook/pull/3559#discussion_r186756507"},"pull_request":{"href":"https://api.github.com/repos/storybooks/storybook/pulls/3559"}},"in_reply_to_id":186693273},"pull_request":{"url":"https://api.github.com/repos/storybooks/storybook/pulls/3559","id":186600366,"html_url":"https://github.com/storybooks/storybook/pull/3559","diff_url":"https://github.com/storybooks/storybook/pull/3559.diff","patch_url":"https://github.com/storybooks/storybook/pull/3559.patch","issue_url":"https://api.github.com/repos/storybooks/storybook/issues/3559","number":3559,"state":"open","locked":false,"title":"Refactor transitional decorator from addon-notes","user":{"login":"tmeasday","id":132554,"avatar_url":"https://avatars1.githubusercontent.com/u/132554?v=4","gravatar_id":"","url":"https://api.github.com/users/tmeasday","html_url":"https://github.com/tmeasday","followers_url":"https://api.github.com/users/tmeasday/followers","following_url":"https://api.github.com/users/tmeasday/following{/other_user}","gists_url":"https://api.github.com/users/tmeasday/gists{/gist_id}","starred_url":"https://api.github.com/users/tmeasday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmeasday/subscriptions","organizations_url":"https://api.github.com/users/tmeasday/orgs","repos_url":"https://api.github.com/users/tmeasday/repos","events_url":"https://api.github.com/users/tmeasday/events{/privacy}","received_events_url":"https://api.github.com/users/tmeasday/received_events","type":"User","site_admin":false},"body":"This should make it easy to transitional other addons to a parameter-based style","created_at":"2018-05-08T11:09:31Z","updated_at":"2018-05-08T14:53:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4f91114d09b865a7aef551b7b18fc361da59553","assignee":null,"assignees":[],"requested_reviewers":[{"login":"theinterned","id":2694,"avatar_url":"https://avatars2.githubusercontent.com/u/2694?v=4","gravatar_id":"","url":"https://api.github.com/users/theinterned","html_url":"https://github.com/theinterned","followers_url":"https://api.github.com/users/theinterned/followers","following_url":"https://api.github.com/users/theinterned/following{/other_user}","gists_url":"https://api.github.com/users/theinterned/gists{/gist_id}","starred_url":"https://api.github.com/users/theinterned/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theinterned/subscriptions","organizations_url":"https://api.github.com/users/theinterned/orgs","repos_url":"https://api.github.com/users/theinterned/repos","events_url":"https://api.github.com/users/theinterned/events{/privacy}","received_events_url":"https://api.github.com/users/theinterned/received_events","type":"User","site_admin":false},{"login":"ndelangen","id":3070389,"avatar_url":"https://avatars2.githubusercontent.com/u/3070389?v=4","gravatar_id":"","url":"https://api.github.com/users/ndelangen","html_url":"https://github.com/ndelangen","followers_url":"https://api.github.com/users/ndelangen/followers","following_url":"https://api.github.com/users/ndelangen/following{/other_user}","gists_url":"https://api.github.com/users/ndelangen/gists{/gist_id}","starred_url":"https://api.github.com/users/ndelangen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndelangen/subscriptions","organizations_url":"https://api.github.com/users/ndelangen/orgs","repos_url":"https://api.github.com/users/ndelangen/repos","events_url":"https://api.github.com/users/ndelangen/events{/privacy}","received_events_url":"https://api.github.com/users/ndelangen/received_events","type":"User","site_admin":false},{"login":"alexandrebodin","id":6065744,"avatar_url":"https://avatars2.githubusercontent.com/u/6065744?v=4","gravatar_id":"","url":"https://api.github.com/users/alexandrebodin","html_url":"https://github.com/alexandrebodin","followers_url":"https://api.github.com/users/alexandrebodin/followers","following_url":"https://api.github.com/users/alexandrebodin/following{/other_user}","gists_url":"https://api.github.com/users/alexandrebodin/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandrebodin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandrebodin/subscriptions","organizations_url":"https://api.github.com/users/alexandrebodin/orgs","repos_url":"https://api.github.com/users/alexandrebodin/repos","events_url":"https://api.github.com/users/alexandrebodin/events{/privacy}","received_events_url":"https://api.github.com/users/alexandrebodin/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":603495607,"url":"https://api.github.com/repos/storybooks/storybook/labels/addon:%20actions","name":"addon: actions","color":"fbca04","default":false},{"id":603489924,"url":"https://api.github.com/repos/storybooks/storybook/labels/maintenance","name":"maintenance","color":"aaaaaa","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/storybooks/storybook/pulls/3559/commits","review_comments_url":"https://api.github.com/repos/storybooks/storybook/pulls/3559/comments","review_comment_url":"https://api.github.com/repos/storybooks/storybook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/storybooks/storybook/issues/3559/comments","statuses_url":"https://api.github.com/repos/storybooks/storybook/statuses/98a99b5c2f4b9c8e6189c2d4d3dd1faeedea58ed","head":{"label":"storybooks:tmeasday/refactor-transitional-decorator","ref":"tmeasday/refactor-transitional-decorator","sha":"98a99b5c2f4b9c8e6189c2d4d3dd1faeedea58ed","user":{"login":"storybooks","id":22632046,"avatar_url":"https://avatars3.githubusercontent.com/u/22632046?v=4","gravatar_id":"","url":"https://api.github.com/users/storybooks","html_url":"https://github.com/storybooks","followers_url":"https://api.github.com/users/storybooks/followers","following_url":"https://api.github.com/users/storybooks/following{/other_user}","gists_url":"https://api.github.com/users/storybooks/gists{/gist_id}","starred_url":"https://api.github.com/users/storybooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storybooks/subscriptions","organizations_url":"https://api.github.com/users/storybooks/orgs","repos_url":"https://api.github.com/users/storybooks/repos","events_url":"https://api.github.com/users/storybooks/events{/privacy}","received_events_url":"https://api.github.com/users/storybooks/received_events","type":"Organization","site_admin":false},"repo":{"id":54173593,"name":"storybook","full_name":"storybooks/storybook","owner":{"login":"storybooks","id":22632046,"avatar_url":"https://avatars3.githubusercontent.com/u/22632046?v=4","gravatar_id":"","url":"https://api.github.com/users/storybooks","html_url":"https://github.com/storybooks","followers_url":"https://api.github.com/users/storybooks/followers","following_url":"https://api.github.com/users/storybooks/following{/other_user}","gists_url":"https://api.github.com/users/storybooks/gists{/gist_id}","starred_url":"https://api.github.com/users/storybooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storybooks/subscriptions","organizations_url":"https://api.github.com/users/storybooks/orgs","repos_url":"https://api.github.com/users/storybooks/repos","events_url":"https://api.github.com/users/storybooks/events{/privacy}","received_events_url":"https://api.github.com/users/storybooks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/storybooks/storybook","description":"Interactive UI component dev & test: React, React Native, Vue, Angular","fork":false,"url":"https://api.github.com/repos/storybooks/storybook","forks_url":"https://api.github.com/repos/storybooks/storybook/forks","keys_url":"https://api.github.com/repos/storybooks/storybook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/storybooks/storybook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/storybooks/storybook/teams","hooks_url":"https://api.github.com/repos/storybooks/storybook/hooks","issue_events_url":"https://api.github.com/repos/storybooks/storybook/issues/events{/number}","events_url":"https://api.github.com/repos/storybooks/storybook/events","assignees_url":"https://api.github.com/repos/storybooks/storybook/assignees{/user}","branches_url":"https://api.github.com/repos/storybooks/storybook/branches{/branch}","tags_url":"https://api.github.com/repos/storybooks/storybook/tags","blobs_url":"https://api.github.com/repos/storybooks/storybook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/storybooks/storybook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/storybooks/storybook/git/refs{/sha}","trees_url":"https://api.github.com/repos/storybooks/storybook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/storybooks/storybook/statuses/{sha}","languages_url":"https://api.github.com/repos/storybooks/storybook/languages","stargazers_url":"https://api.github.com/repos/storybooks/storybook/stargazers","contributors_url":"https://api.github.com/repos/storybooks/storybook/contributors","subscribers_url":"https://api.github.com/repos/storybooks/storybook/subscribers","subscription_url":"https://api.github.com/repos/storybooks/storybook/subscription","commits_url":"https://api.github.com/repos/storybooks/storybook/commits{/sha}","git_commits_url":"https://api.github.com/repos/storybooks/storybook/git/commits{/sha}","comments_url":"https://api.github.com/repos/storybooks/storybook/comments{/number}","issue_comment_url":"https://api.github.com/repos/storybooks/storybook/issues/comments{/number}","contents_url":"https://api.github.com/repos/storybooks/storybook/contents/{+path}","compare_url":"https://api.github.com/repos/storybooks/storybook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/storybooks/storybook/merges","archive_url":"https://api.github.com/repos/storybooks/storybook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/storybooks/storybook/downloads","issues_url":"https://api.github.com/repos/storybooks/storybook/issues{/number}","pulls_url":"https://api.github.com/repos/storybooks/storybook/pulls{/number}","milestones_url":"https://api.github.com/repos/storybooks/storybook/milestones{/number}","notifications_url":"https://api.github.com/repos/storybooks/storybook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/storybooks/storybook/labels{/name}","releases_url":"https://api.github.com/repos/storybooks/storybook/releases{/id}","deployments_url":"https://api.github.com/repos/storybooks/storybook/deployments","created_at":"2016-03-18T04:23:44Z","updated_at":"2018-05-08T14:45:42Z","pushed_at":"2018-05-08T13:38:17Z","git_url":"git://github.com/storybooks/storybook.git","ssh_url":"git@github.com:storybooks/storybook.git","clone_url":"https://github.com/storybooks/storybook.git","svn_url":"https://github.com/storybooks/storybook","homepage":"https://storybook.js.org","size":99897,"stargazers_count":23565,"watchers_count":23565,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1610,"mirror_url":null,"archived":false,"open_issues_count":146,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1610,"open_issues":146,"watchers":23565,"default_branch":"master"}},"base":{"label":"storybooks:master","ref":"master","sha":"4f3137f46f2c28f1146fec059d8aa76f7fa90345","user":{"login":"storybooks","id":22632046,"avatar_url":"https://avatars3.githubusercontent.com/u/22632046?v=4","gravatar_id":"","url":"https://api.github.com/users/storybooks","html_url":"https://github.com/storybooks","followers_url":"https://api.github.com/users/storybooks/followers","following_url":"https://api.github.com/users/storybooks/following{/other_user}","gists_url":"https://api.github.com/users/storybooks/gists{/gist_id}","starred_url":"https://api.github.com/users/storybooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storybooks/subscriptions","organizations_url":"https://api.github.com/users/storybooks/orgs","repos_url":"https://api.github.com/users/storybooks/repos","events_url":"https://api.github.com/users/storybooks/events{/privacy}","received_events_url":"https://api.github.com/users/storybooks/received_events","type":"Organization","site_admin":false},"repo":{"id":54173593,"name":"storybook","full_name":"storybooks/storybook","owner":{"login":"storybooks","id":22632046,"avatar_url":"https://avatars3.githubusercontent.com/u/22632046?v=4","gravatar_id":"","url":"https://api.github.com/users/storybooks","html_url":"https://github.com/storybooks","followers_url":"https://api.github.com/users/storybooks/followers","following_url":"https://api.github.com/users/storybooks/following{/other_user}","gists_url":"https://api.github.com/users/storybooks/gists{/gist_id}","starred_url":"https://api.github.com/users/storybooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storybooks/subscriptions","organizations_url":"https://api.github.com/users/storybooks/orgs","repos_url":"https://api.github.com/users/storybooks/repos","events_url":"https://api.github.com/users/storybooks/events{/privacy}","received_events_url":"https://api.github.com/users/storybooks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/storybooks/storybook","description":"Interactive UI component dev & test: React, React Native, Vue, Angular","fork":false,"url":"https://api.github.com/repos/storybooks/storybook","forks_url":"https://api.github.com/repos/storybooks/storybook/forks","keys_url":"https://api.github.com/repos/storybooks/storybook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/storybooks/storybook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/storybooks/storybook/teams","hooks_url":"https://api.github.com/repos/storybooks/storybook/hooks","issue_events_url":"https://api.github.com/repos/storybooks/storybook/issues/events{/number}","events_url":"https://api.github.com/repos/storybooks/storybook/events","assignees_url":"https://api.github.com/repos/storybooks/storybook/assignees{/user}","branches_url":"https://api.github.com/repos/storybooks/storybook/branches{/branch}","tags_url":"https://api.github.com/repos/storybooks/storybook/tags","blobs_url":"https://api.github.com/repos/storybooks/storybook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/storybooks/storybook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/storybooks/storybook/git/refs{/sha}","trees_url":"https://api.github.com/repos/storybooks/storybook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/storybooks/storybook/statuses/{sha}","languages_url":"https://api.github.com/repos/storybooks/storybook/languages","stargazers_url":"https://api.github.com/repos/storybooks/storybook/stargazers","contributors_url":"https://api.github.com/repos/storybooks/storybook/contributors","subscribers_url":"https://api.github.com/repos/storybooks/storybook/subscribers","subscription_url":"https://api.github.com/repos/storybooks/storybook/subscription","commits_url":"https://api.github.com/repos/storybooks/storybook/commits{/sha}","git_commits_url":"https://api.github.com/repos/storybooks/storybook/git/commits{/sha}","comments_url":"https://api.github.com/repos/storybooks/storybook/comments{/number}","issue_comment_url":"https://api.github.com/repos/storybooks/storybook/issues/comments{/number}","contents_url":"https://api.github.com/repos/storybooks/storybook/contents/{+path}","compare_url":"https://api.github.com/repos/storybooks/storybook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/storybooks/storybook/merges","archive_url":"https://api.github.com/repos/storybooks/storybook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/storybooks/storybook/downloads","issues_url":"https://api.github.com/repos/storybooks/storybook/issues{/number}","pulls_url":"https://api.github.com/repos/storybooks/storybook/pulls{/number}","milestones_url":"https://api.github.com/repos/storybooks/storybook/milestones{/number}","notifications_url":"https://api.github.com/repos/storybooks/storybook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/storybooks/storybook/labels{/name}","releases_url":"https://api.github.com/repos/storybooks/storybook/releases{/id}","deployments_url":"https://api.github.com/repos/storybooks/storybook/deployments","created_at":"2016-03-18T04:23:44Z","updated_at":"2018-05-08T14:45:42Z","pushed_at":"2018-05-08T13:38:17Z","git_url":"git://github.com/storybooks/storybook.git","ssh_url":"git@github.com:storybooks/storybook.git","clone_url":"https://github.com/storybooks/storybook.git","svn_url":"https://github.com/storybooks/storybook","homepage":"https://storybook.js.org","size":99897,"stargazers_count":23565,"watchers_count":23565,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1610,"mirror_url":null,"archived":false,"open_issues_count":146,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1610,"open_issues":146,"watchers":23565,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/storybooks/storybook/pulls/3559"},"html":{"href":"https://github.com/storybooks/storybook/pull/3559"},"issue":{"href":"https://api.github.com/repos/storybooks/storybook/issues/3559"},"comments":{"href":"https://api.github.com/repos/storybooks/storybook/issues/3559/comments"},"review_comments":{"href":"https://api.github.com/repos/storybooks/storybook/pulls/3559/comments"},"review_comment":{"href":"https://api.github.com/repos/storybooks/storybook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/storybooks/storybook/pulls/3559/commits"},"statuses":{"href":"https://api.github.com/repos/storybooks/storybook/statuses/98a99b5c2f4b9c8e6189c2d4d3dd1faeedea58ed"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"Hypnosphi"}}