{"action":"closed","number":110,"pull_request":{"url":"https://api.github.com/repos/yahoo/fluxible/pulls/110","id":32573898,"html_url":"https://github.com/yahoo/fluxible/pull/110","diff_url":"https://github.com/yahoo/fluxible/pull/110.diff","patch_url":"https://github.com/yahoo/fluxible/pull/110.patch","issue_url":"https://api.github.com/repos/yahoo/fluxible/issues/110","number":110,"state":"closed","locked":false,"title":"[wip] initial attempt to namespace plugins","user":{"login":"jedireza","id":979929,"avatar_url":"https://avatars.githubusercontent.com/u/979929?v=3","gravatar_id":"","url":"https://api.github.com/users/jedireza","html_url":"https://github.com/jedireza","followers_url":"https://api.github.com/users/jedireza/followers","following_url":"https://api.github.com/users/jedireza/following{/other_user}","gists_url":"https://api.github.com/users/jedireza/gists{/gist_id}","starred_url":"https://api.github.com/users/jedireza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedireza/subscriptions","organizations_url":"https://api.github.com/users/jedireza/orgs","repos_url":"https://api.github.com/users/jedireza/repos","events_url":"https://api.github.com/users/jedireza/events{/privacy}","received_events_url":"https://api.github.com/users/jedireza/received_events","type":"User","site_admin":false},"body":"This is my initial attempt to namespace plugins and address #79.\r\n\r\nOne goal I had was to ensure that plugin authors don't need to change anything. However when we used to pass the context to a plugin's `plugActionContext`, `plugComponentContext` or `plugStoreContext`, it may have already been decorated with some resources.\r\n\r\nFor example in the `getActionContext` method we were creating this context object:\r\n\r\n```js\r\nvar actionContext = {\r\n    dispatch: this._dispatcher.dispatch.bind(this._dispatcher),\r\n    executeAction: this.executeAction.bind(this),\r\n    getStore: this._dispatcher.getStore.bind(this._dispatcher)\r\n};\r\n```\r\n\r\nand passing that to the plugin's `plugActionContext` function, which it then decoratea with it's own functionality. But now we're passing an empty object `{}` just for that plugin to decorate. My concern is... what if plugin authors were using the resources on the context we were passing.\r\n\r\nIf the plugins do indeed need those resources:\r\n\r\n - We could include copies of the decorated resources (`dispatch`, `executeAction` and `getStore` in the example above) to each plugin. No changes are required for plugin authors _but_ it feels sloppy to have multiple references to these resources floating around.\r\n - We could to pass the ~~parent~~ real context as another argument to their `plugActionContext`, `plugComponentContext` and `plugStoreContext` functions. This _would_ require plugin authors to change code.\r\n - If we accept that changes may be required by plugin authors... we do already pass a reference to `this` as the second argument, plugin authors could access the resources they need from there.\r\n - And another option I almost forgot (mentioned in #79) is that we could require a new object be returned from these `plug*Context` functions. This approach may be the easier change to implement for plugin authors.\r\n\r\nYour thoughts are welcome.","created_at":"2015-04-03T07:13:29Z","updated_at":"2015-05-27T00:36:28Z","closed_at":"2015-05-27T00:36:28Z","merged_at":null,"merge_commit_sha":"709e9b127733db3accb28d40d75c48beb5548d1b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yahoo/fluxible/pulls/110/commits","review_comments_url":"https://api.github.com/repos/yahoo/fluxible/pulls/110/comments","review_comment_url":"https://api.github.com/repos/yahoo/fluxible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yahoo/fluxible/issues/110/comments","statuses_url":"https://api.github.com/repos/yahoo/fluxible/statuses/17ced8b789b7cb5e5c1e3cd3796a389a1334d77e","head":{"label":"jedireza:namespace-plugins","ref":"namespace-plugins","sha":"17ced8b789b7cb5e5c1e3cd3796a389a1334d77e","user":{"login":"jedireza","id":979929,"avatar_url":"https://avatars.githubusercontent.com/u/979929?v=3","gravatar_id":"","url":"https://api.github.com/users/jedireza","html_url":"https://github.com/jedireza","followers_url":"https://api.github.com/users/jedireza/followers","following_url":"https://api.github.com/users/jedireza/following{/other_user}","gists_url":"https://api.github.com/users/jedireza/gists{/gist_id}","starred_url":"https://api.github.com/users/jedireza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedireza/subscriptions","organizations_url":"https://api.github.com/users/jedireza/orgs","repos_url":"https://api.github.com/users/jedireza/repos","events_url":"https://api.github.com/users/jedireza/events{/privacy}","received_events_url":"https://api.github.com/users/jedireza/received_events","type":"User","site_admin":false},"repo":null},"base":{"label":"yahoo:master","ref":"master","sha":"5bb6a47e78901ea0010b924f795df30fed467444","user":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":26189434,"name":"fluxible","full_name":"yahoo/fluxible","owner":{"login":"yahoo","id":16574,"avatar_url":"https://avatars.githubusercontent.com/u/16574?v=3","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/fluxible","description":"A pluggable container for isomorphic flux applications","fork":false,"url":"https://api.github.com/repos/yahoo/fluxible","forks_url":"https://api.github.com/repos/yahoo/fluxible/forks","keys_url":"https://api.github.com/repos/yahoo/fluxible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/fluxible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/fluxible/teams","hooks_url":"https://api.github.com/repos/yahoo/fluxible/hooks","issue_events_url":"https://api.github.com/repos/yahoo/fluxible/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/fluxible/events","assignees_url":"https://api.github.com/repos/yahoo/fluxible/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/fluxible/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/fluxible/tags","blobs_url":"https://api.github.com/repos/yahoo/fluxible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/fluxible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/fluxible/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/fluxible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/fluxible/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/fluxible/languages","stargazers_url":"https://api.github.com/repos/yahoo/fluxible/stargazers","contributors_url":"https://api.github.com/repos/yahoo/fluxible/contributors","subscribers_url":"https://api.github.com/repos/yahoo/fluxible/subscribers","subscription_url":"https://api.github.com/repos/yahoo/fluxible/subscription","commits_url":"https://api.github.com/repos/yahoo/fluxible/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/fluxible/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/fluxible/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/fluxible/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/fluxible/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/fluxible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/fluxible/merges","archive_url":"https://api.github.com/repos/yahoo/fluxible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/fluxible/downloads","issues_url":"https://api.github.com/repos/yahoo/fluxible/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/fluxible/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/fluxible/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/fluxible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/fluxible/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/fluxible/releases{/id}","created_at":"2014-11-04T21:25:38Z","updated_at":"2015-05-26T21:29:34Z","pushed_at":"2015-05-23T16:07:30Z","git_url":"git://github.com/yahoo/fluxible.git","ssh_url":"git@github.com:yahoo/fluxible.git","clone_url":"https://github.com/yahoo/fluxible.git","svn_url":"https://github.com/yahoo/fluxible","homepage":"http://fluxible.io","size":2295,"stargazers_count":798,"watchers_count":798,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":62,"mirror_url":null,"open_issues_count":21,"forks":62,"open_issues":21,"watchers":798,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yahoo/fluxible/pulls/110"},"html":{"href":"https://github.com/yahoo/fluxible/pull/110"},"issue":{"href":"https://api.github.com/repos/yahoo/fluxible/issues/110"},"comments":{"href":"https://api.github.com/repos/yahoo/fluxible/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/yahoo/fluxible/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/yahoo/fluxible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yahoo/fluxible/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/yahoo/fluxible/statuses/17ced8b789b7cb5e5c1e3cd3796a389a1334d77e"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":4,"review_comments":0,"commits":1,"additions":102,"deletions":69,"changed_files":4}}