{"action":"closed","issue":{"url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/825","labels_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/825/labels{/name}","comments_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/825/comments","events_url":"https://api.github.com/repos/CartoDB/cartodb.js/issues/825/events","html_url":"https://github.com/CartoDB/cartodb.js/issues/825","id":117616945,"number":825,"title":"Code revision","user":{"login":"acanimal","id":732033,"avatar_url":"https://avatars.githubusercontent.com/u/732033?v=3","gravatar_id":"","url":"https://api.github.com/users/acanimal","html_url":"https://github.com/acanimal","followers_url":"https://api.github.com/users/acanimal/followers","following_url":"https://api.github.com/users/acanimal/following{/other_user}","gists_url":"https://api.github.com/users/acanimal/gists{/gist_id}","starred_url":"https://api.github.com/users/acanimal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acanimal/subscriptions","organizations_url":"https://api.github.com/users/acanimal/orgs","repos_url":"https://api.github.com/users/acanimal/repos","events_url":"https://api.github.com/users/acanimal/events{/privacy}","received_events_url":"https://api.github.com/users/acanimal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CartoDB/cartodb.js/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-18T15:54:55Z","updated_at":"2015-12-04T11:05:30Z","closed_at":"2015-12-04T11:05:30Z","body":"## Proposal \r\n\r\n### Comments and doc\r\n\r\n- [ ] Once sentence describing the class/module goal.\r\n- [ ] Comment with one line sentence any code with some \"complex\" logic, i.e.: methods, a pieces of code that make some search and modification, etc.\r\n- [ ] Document the `options` a model or view can receive at construction time.\r\n- [ ] Document callbacks. \r\n- [ ] Document properties a class (model or view) uses internally, i.e. on `cdb.geo.ui.CategoryLegend` the `className` or `template` properties that subclasses uses, or are later user by other classes (i.e. `Vis.cartodb_logo` attribute.\r\n\r\n### Conventions and nomenclature\r\n\r\nGood for code clarification and review/modify months later.\r\n\r\n- [ ] Name variables depending if they contain data, model or view reference. For example about layer:\r\n  - `layerData`: contains the data passed to create a layer,\r\n  - `layerModel`: reference to a model,\r\n  - `layerView`: reference to a view.\r\n  - For collections: `layersModelCollection` or `layersViewCollection`.\r\n- [ ] Start private methods with underscore `_`, document with `@private` and ensure never them use outside the object.\r\n- [ ] Do not augment the options passed to an object (concretely the vizdata object with configuration).\r\n\r\n\r\n### Review tasks\r\n\r\n- [ ] Review all TODO comments\r\n- [ ] Avoid empty methods (i.e. `Vis.doOnOrientationChange`, `setMapPosition`, ...)\r\n- [ ] Check methods with one or few lines that delegates to another one (i.e. `Vis.addLegends`)\r\n- [ ] Ensure valid public methods (those that can be invoked on a class), i.e `Vis.createLegendView`.\r\n- [ ] Avoid calling private methods (those with `_`) outside a class (i.e calling `viz._addLegends` in createLayers).\r\n\r\n\r\n\r\n"}}