- Leaking instance state into Klasses
- Improper setup/teardown of the event listeners
- Stashing state in global or module scopes
- Saving non-primitive property of controllers to non-singleton objects
- Failing to destroy the third party widgets when the component is unmounted
- Closure leaks
setInterval
- Saving non-singletons components into singletons controllers/services
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default Ember.Component.extend({ | |
modalPane: injectService(), | |
// 1. | |
delete() { | |
this.get('modalPane').confirm({ | |
header: 'Delete Tab', | |
message: 'Are you sure to delete the tab?' | |
affirm: () => { | |
// handle confirm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
const PRIMITIVE_INPUTS = { | |
input: 'input-field', | |
select: 'select-field', | |
} | |
const FormFor = Ember.Component.extend({ | |
init() { | |
this._super(...arguments); |
- git mv *.js to *.es6
find test/javascripts/unit/**/*.js -exec bash -c 'file={}; git mv $file ${file%.js}.es6' \;
- generate todo list of usage
grep -rl "{{variant-autocomplete-field" app/assets/javascripts/templates/** | awk '{b="- [ ] "$1; print b}'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'table', | |
classNames: ['et-table'] | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.tabSize": 2, | |
"editor.formatOnSave": false, | |
"[javascript]": { | |
"editor.formatOnSave": false | |
}, | |
"editor.renderWhitespace": "all", | |
"files.trimTrailingWhitespace": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
const Grouped = Ember.ArrayProxy.extend({ | |
}); | |
export default Ember.Component.extend({ | |
groupedSettings: Ember.computed('appSettings.[]', function() { | |
let appSettings = this.appSettings; | |
return appSettings.reduce((iter, curr) => { | |
let existingGroup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
queryParams: ['fooQuery', 'objFoo'], | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
isDisabled: true | |
}); |