{"action":"created","issue":{"url":"https://api.github.com/repos/dimagi/commcare-hq/issues/22600","repository_url":"https://api.github.com/repos/dimagi/commcare-hq","labels_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/22600/labels{/name}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/22600/comments","events_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/22600/events","html_url":"https://github.com/dimagi/commcare-hq/pull/22600","id":386776286,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1NDE0NDk4","number":22600,"title":"Require js migration: multimedia referencer & multimedia bulk upload pages","user":{"login":"Rohit25negi","id":21310920,"node_id":"MDQ6VXNlcjIxMzEwOTIw","avatar_url":"https://avatars3.githubusercontent.com/u/21310920?v=4","gravatar_id":"","url":"https://api.github.com/users/Rohit25negi","html_url":"https://github.com/Rohit25negi","followers_url":"https://api.github.com/users/Rohit25negi/followers","following_url":"https://api.github.com/users/Rohit25negi/following{/other_user}","gists_url":"https://api.github.com/users/Rohit25negi/gists{/gist_id}","starred_url":"https://api.github.com/users/Rohit25negi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rohit25negi/subscriptions","organizations_url":"https://api.github.com/users/Rohit25negi/orgs","repos_url":"https://api.github.com/users/Rohit25negi/repos","events_url":"https://api.github.com/users/Rohit25negi/events{/privacy}","received_events_url":"https://api.github.com/users/Rohit25negi/received_events","type":"User","site_admin":false},"labels":[{"id":87923342,"node_id":"MDU6TGFiZWw4NzkyMzM0Mg==","url":"https://api.github.com/repos/dimagi/commcare-hq/labels/awaiting%20QA","name":"awaiting QA","color":"fbca04","default":false},{"id":724784918,"node_id":"MDU6TGFiZWw3MjQ3ODQ5MTg=","url":"https://api.github.com/repos/dimagi/commcare-hq/labels/product/all-users-all-environments","name":"product/all-users-all-environments","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-03T11:32:20Z","updated_at":"2018-12-06T17:43:49Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/22600","html_url":"https://github.com/dimagi/commcare-hq/pull/22600","diff_url":"https://github.com/dimagi/commcare-hq/pull/22600.diff","patch_url":"https://github.com/dimagi/commcare-hq/pull/22600.patch"},"body":"This Code changes migrates the multimedia referencer & multimedia bulk upload pages(which use multimedia) to fit in requirejs.\r\n[multimedia uploader](https://github.com/dimagi/MediaUploader) is a library based on YUI. YUI itself is not AMD compatible, in order to fit it to requirejs it's shim configuration is added.\r\nMultimedia is used to some other places also like [here](https://staging.commcarehq.org/a/dummy/apps/view/7e041cfffdb860b85d77a5d4302dd372/form/4acbbb4b8d5eaa58ccce1c616bdffe3709e38385/#form-settings) and some other places as well which are not migrated yet.\r\nYUI also need some global configuration which it internally reads from global variable `YUI_config`. This configuration cannot be put into requirejs_config file as this is specific to YUI and needed in specific way.  Therefore this configuration is moved to a new file `hqmedia/js/yui_config.js` which is not yet migrated to require js pattern(to use local YUI) because some multimedia pages are still left. \r\n\r\nOnce All multimedia pages are migrated then finally it can be migrated and  `partials/multimedia_js.html` can be removed.\r\n\r\nThis `hqmedia/js/yui_config.js` is added to shim configuration as dependency of `file-uploader` so that the user of `file-uploader` does not need to worry about explicitly.\r\n"},"comment":{"url":"https://api.github.com/repos/dimagi/commcare-hq/issues/comments/444962812","html_url":"https://github.com/dimagi/commcare-hq/pull/22600#issuecomment-444962812","issue_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/22600","id":444962812,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDk2MjgxMg==","user":{"login":"orangejenny","id":1486591,"node_id":"MDQ6VXNlcjE0ODY1OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1486591?v=4","gravatar_id":"","url":"https://api.github.com/users/orangejenny","html_url":"https://github.com/orangejenny","followers_url":"https://api.github.com/users/orangejenny/followers","following_url":"https://api.github.com/users/orangejenny/following{/other_user}","gists_url":"https://api.github.com/users/orangejenny/gists{/gist_id}","starred_url":"https://api.github.com/users/orangejenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orangejenny/subscriptions","organizations_url":"https://api.github.com/users/orangejenny/orgs","repos_url":"https://api.github.com/users/orangejenny/repos","events_url":"https://api.github.com/users/orangejenny/events{/privacy}","received_events_url":"https://api.github.com/users/orangejenny/received_events","type":"User","site_admin":false},"created_at":"2018-12-06T17:43:49Z","updated_at":"2018-12-06T17:43:49Z","author_association":"CONTRIBUTOR","body":"FYI this is breaking the languages tab in app settings on staging:\r\n```Uncaught TypeError: Cannot read property 'file' of undefined\r\n    at hqmediauploaders.js:8\r\n    at Function.m.each.m.forEach (underscore.js:153)\r\n    at hqmediauploaders.js:7\r\n    at hqModules.js:87\r\n    at hqDefine (hqModules.js:87)\r\n    at hqmediauploaders.js:1\r\n\r\nUncaught Error: The module 'hqmedia/js/hqmediauploaders' has not yet been defined. Did you include <script src=\"hqmedia/js/hqmediauploaders.js\"></script> on your html page?\r\n    at hqImport (hqModules.js:102)\r\n    at app_logos.js:3\r\n    at hqModules.js:87\r\n    at hqDefine (hqModules.js:87)\r\n    at hqDefine (hqModules.js:49)\r\n    at app_logos.js:1```"}}
{"actor":{"display_login":"orangejenny"}}