{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/pontoon/issues/860","repository_url":"https://api.github.com/repos/mozilla/pontoon","labels_url":"https://api.github.com/repos/mozilla/pontoon/issues/860/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pontoon/issues/860/comments","events_url":"https://api.github.com/repos/mozilla/pontoon/issues/860/events","html_url":"https://github.com/mozilla/pontoon/pull/860","id":296932587,"number":860,"title":"[WIP] NOBUG - Request for comments - Move markPlaceables outside main.js","user":{"login":"jotes","id":8784972,"avatar_url":"https://avatars2.githubusercontent.com/u/8784972?v=4","gravatar_id":"","url":"https://api.github.com/users/jotes","html_url":"https://github.com/jotes","followers_url":"https://api.github.com/users/jotes/followers","following_url":"https://api.github.com/users/jotes/following{/other_user}","gists_url":"https://api.github.com/users/jotes/gists{/gist_id}","starred_url":"https://api.github.com/users/jotes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jotes/subscriptions","organizations_url":"https://api.github.com/users/jotes/orgs","repos_url":"https://api.github.com/users/jotes/repos","events_url":"https://api.github.com/users/jotes/events{/privacy}","received_events_url":"https://api.github.com/users/jotes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-14T00:12:43Z","updated_at":"2018-02-19T12:03:41Z","closed_at":"2018-02-19T12:03:41Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/mozilla/pontoon/pulls/860","html_url":"https://github.com/mozilla/pontoon/pull/860","diff_url":"https://github.com/mozilla/pontoon/pull/860.diff","patch_url":"https://github.com/mozilla/pontoon/pull/860.patch"},"body":"@mathjazz\r\nHey, so after my declaration at our irc channel I experimented with code related to markPlaceables (I feel kinda forced by struggles introduced during work on #836).\r\nImportant disclaimer: So, this PR isn't like ready to merge thing. I haven't add tests yet, but I feel it can be (easily) done later. `placeables.js` is built by webpack. Placeables are later visible as `placeables.markAll()` in `main.js`\r\n\r\nThe question is if we want to pursue such way of working with the legacy Pontoon js -> move some parts of `main.js` code to separate modules and expose them globally (via `window`).\r\n\r\nFrom my perspective that approach has following benefits:\r\n* you can use sort-of name-spaces instead of one god-like objects\r\n* unit-testing\r\n\r\nI feel that those things still can be valuable during the transition phase to Translate.next and to add some anti-regression tests.\r\nAaaand there's a huge chance that there are better approaches to handle such legacy code in Javascript -> I'm open to learn something new.\r\nIf We want to pursue that, I'll create a proper PR to add support for legacy modules and later add PR for refactoring which will move placeables, fixes issue with leading/trailing spaces (1-2 days of afterhours :D).\r\n\r\nFeel free to ping Adrian/Ryan -> I'm not sure who's less busy right now :("},"comment":{"url":"https://api.github.com/repos/mozilla/pontoon/issues/comments/366670948","html_url":"https://github.com/mozilla/pontoon/pull/860#issuecomment-366670948","issue_url":"https://api.github.com/repos/mozilla/pontoon/issues/860","id":366670948,"user":{"login":"jotes","id":8784972,"avatar_url":"https://avatars2.githubusercontent.com/u/8784972?v=4","gravatar_id":"","url":"https://api.github.com/users/jotes","html_url":"https://github.com/jotes","followers_url":"https://api.github.com/users/jotes/followers","following_url":"https://api.github.com/users/jotes/following{/other_user}","gists_url":"https://api.github.com/users/jotes/gists{/gist_id}","starred_url":"https://api.github.com/users/jotes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jotes/subscriptions","organizations_url":"https://api.github.com/users/jotes/orgs","repos_url":"https://api.github.com/users/jotes/repos","events_url":"https://api.github.com/users/jotes/events{/privacy}","received_events_url":"https://api.github.com/users/jotes/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T12:03:41Z","updated_at":"2018-02-19T12:03:41Z","author_association":"CONTRIBUTOR","body":"After discussion at work week We decided to wait till `translate.next` because placeables will be rewritten anyway."}}
{"actor":{"display_login":"jotes"}}