Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update dummy app to latest ember conventions #735

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
env: {
browser: true
},
<<<<<<< HEAD

rules: {
'generator-star-spacing': ['error', { before: false, after: false }],
Expand All @@ -39,6 +40,9 @@ module.exports = {
'ember/require-computed-property-dependencies': 'warn'
},

=======
rules: {},
>>>>>>> 8a10e77... v3.16.1...v3.20.0
overrides: [
// node files
{
Expand Down
6 changes: 0 additions & 6 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ module.exports = {
'no-inline-styles': {
allowDynamicStyles: true
},
'no-curly-component-invocation': false,
'no-action': false,
'no-implicit-this': false,
'require-button-type': false,
'link-href-attributes': false,
'require-valid-alt-text': false,
'no-invalid-role': false
}
};
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ node_js:
# so that your addon works for all apps
- "10"

dist: trusty
dist: xenial

addons:
chrome: stable
Expand All @@ -22,10 +22,11 @@ env:
matrix:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-lts-3.4
- EMBER_TRY_SCENARIO=ember-3.6
- EMBER_TRY_SCENARIO=ember-lts-3.8
- EMBER_TRY_SCENARIO=ember-lts-3.12
- EMBER_TRY_SCENARIO=ember-lts-3.16
- EMBER_TRY_SCENARIO=ember-lts-3.20
- EMBER_TRY_SCENARIO=ember-classic
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
Expand Down
22 changes: 10 additions & 12 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ module.exports = async function() {
useYarn: true,
scenarios: [
{
name: 'ember-lts-3.4',
name: 'ember-3.6',
npm: {
devDependencies: {
'ember-source': '~3.4.0'
'ember-source': '~3.6.0'
}
}
},
Expand Down Expand Up @@ -38,6 +38,14 @@ module.exports = async function() {
}
}
},
{
name: 'ember-lts-3.20',
npm: {
devDependencies: {
'ember-source': '~3.20.0'
}
}
},
{
name: 'ember-release',
npm: {
Expand All @@ -62,16 +70,6 @@ module.exports = async function() {
}
}
},
// The default `.travis.yml` runs this scenario via `npm test`,
// not via `ember try`. It's still included here so that running
// `ember try:each` manually or from a customized CI config will run it
// along with all the other scenarios.
{
name: 'ember-default',
npm: {
devDependencies: {}
}
},
{
name: 'ember-default-with-jquery',
env: {
Expand Down
4 changes: 4 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ module.exports = function(defaults) {
]
},

'ember-power-select': {
theme: 'bootstrap'
},

'ember-cli-babel': {
includePolyfill: true
}
Expand Down
51 changes: 27 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,72 +19,75 @@
"homepage": "https://github.com/offirgolan/ember-light-table",
"scripts": {
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"start": "ember serve",
"test": "ember test",
"test:all": "ember try:each",
"test": "npm-run-all lint:* test:*",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each",
"changelog": "lerna-changelog"
},
"dependencies": {
"@html-next/vertical-collection": "^1.0.0",
"ember-cli-babel": "^7.17.2",
"ember-cli-htmlbars": "^4.2.2",
"ember-cli-string-helpers": "^4.0.6",
"ember-cli-babel": "^7.21.0",
"ember-cli-htmlbars": "^5.2.0",
"ember-cli-string-helpers": "^5.0.0",
"ember-get-config": "^0.2.4",
"ember-in-viewport": "^3.7.2",
"ember-scrollable": "^1.0.2",
"ember-truth-helpers": "^2.0.0",
"ember-wormhole": "^0.5.5"
},
"devDependencies": {
"@ember/jquery": "^0.6.1",
"@ember/jquery": "^1.1.0",
"@ember/optional-features": "^1.3.0",
"@glimmer/component": "^1.0.0",
"@glimmer/component": "^1.0.1",
"@glimmer/tracking": "^1.0.0",
"babel-eslint": "^10.0.3",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^1.5.3",
"ember-cli": "~3.16.1",
"ember-auto-import": "^1.6.0",
"ember-cli": "~3.20.0",
"ember-cli-app-version": "^3.2.0",
"ember-cli-autoprefixer": "^0.8.1",
"ember-cli-code-coverage": "^0.4.2",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-eslint": "^5.1.0",
"ember-cli-github-pages": "^0.2.2",
"ember-cli-inject-live-reload": "^2.0.2",
"ember-cli-less": "^2.0.1",
"ember-cli-less": "^3.0.1",
"ember-cli-mirage": "^1.1.0",
"ember-cli-release": "1.0.0-beta.2",
"ember-cli-sri": "^2.1.1",
"ember-cli-template-lint": "^2.0.2",
"ember-cli-uglify": "^3.0.0",
"ember-cli-yuidoc": "0.9.1",
"ember-code-snippet": "^3.0.0",
"ember-composable-helpers": "^3.1.1",
"ember-concurrency": "^1.0.0",
"ember-composable-helpers": "^4.2.2",
"ember-concurrency": "^1.2.1",
"ember-data": "^3.16.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-font-awesome": "^4.0.0-rc.4",
"ember-load-initializers": "^2.1.1",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-notify-property-change-polyfill": "^0.0.2",
"ember-one-way-controls": "^3.0.1",
"ember-prism": "^0.6.1",
"ember-power-select": "^4.0.0",
"ember-prism": "^0.7.0",
"ember-qunit": "^4.6.0",
"ember-resolver": "^7.0.0",
"ember-responsive": "^3.0.5",
"ember-source": "~3.16.0",
"ember-resolver": "^8.0.0",
"ember-responsive": "^4.0.0",
"ember-source": "~3.20.2",
"ember-source-channel-url": "^2.0.1",
"ember-template-lint": "^2.9.1",
"ember-try": "^1.4.0",
"eslint-plugin-ember": "^8.1.1",
"eslint": "^7.5.0",
"eslint-plugin-ember": "^8.9.2",
"eslint-plugin-ember-suave": "^2.0.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-node": "^11.1.0",
"faker": "^4.1.0",
"lerna-changelog": "^1.0.1",
"loader.js": "^4.7.0",
"qunit-dom": "^1.0.0",
"npm-run-all": "^4.1.5",
"qunit-dom": "^1.2.0",
"yuidoc-ember-theme": "^2.0.1"
},
"engines": {
Expand All @@ -97,7 +100,7 @@
"configPath": "tests/dummy/config",
"demoURL": "http://offirgolan.github.io/ember-light-table",
"versionCompatibility": {
"ember": ">=3.4.0 <4.0.0"
"ember": ">=3.6.0 <4.0.0"
}
},
"changelog": {
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Application from '@ember/application';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
import config from 'dummy/config/environment';

export default class App extends Application {
modulePrefix = config.modulePrefix;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// BEGIN-SNIPPET table-common
import Mixin from '@ember/object/mixin';
import { computed } from '@ember/object';
// BEGIN-SNIPPET base-table
import Component from '@ember/component';
import { computed, action } from '@ember/object';
import { isEmpty } from '@ember/utils';
import { inject as service } from '@ember/service';
import Table from 'ember-light-table';
import { task } from 'ember-concurrency';

export default Mixin.create({
export default Component.extend({
store: service(),

page: 0,
Expand Down Expand Up @@ -44,24 +44,24 @@ export default Mixin.create({
this.set('canLoadMore', !isEmpty(records));
}).restartable(),

actions: {
onScrolledToBottom() {
if (this.get('canLoadMore')) {
this.incrementProperty('page');
this.get('fetchRecords').perform();
}
},
@action
onScrolledToBottom() {
if (this.get('canLoadMore')) {
this.incrementProperty('page');
this.get('fetchRecords').perform();
}
},

onColumnClick(column) {
if (column.sorted) {
this.setProperties({
dir: column.ascending ? 'asc' : 'desc',
sort: column.get('valuePath'),
canLoadMore: true,
page: 0
});
this.get('model').clear();
}
@action
onColumnClick(column) {
if (column.sorted) {
this.setProperties({
dir: column.ascending ? 'asc' : 'desc',
sort: column.get('valuePath'),
canLoadMore: true,
page: 0
});
this.get('model').clear();
}
}
});
Expand Down
5 changes: 2 additions & 3 deletions tests/dummy/app/components/columns/draggable-table.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// BEGIN-SNIPPET draggable-table
import Component from '@ember/component';
import TableCommon from '../../mixins/table-common';
import BaseTable from '../base-table';
import { computed } from '@ember/object';

export default Component.extend(TableCommon, {
export default BaseTable.extend({
columns: computed(function() {
return [{
label: 'User Details',
Expand Down
5 changes: 2 additions & 3 deletions tests/dummy/app/components/columns/grouped-table.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// BEGIN-SNIPPET grouped-table
import Component from '@ember/component';
import TableCommon from '../../mixins/table-common';
import BaseTable from '../base-table';
import { computed } from '@ember/object';

export default Component.extend(TableCommon, {
export default BaseTable.extend({
columns: computed(function() {
return [{
label: 'User Details',
Expand Down
5 changes: 2 additions & 3 deletions tests/dummy/app/components/columns/resizable-table.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// BEGIN-SNIPPET resizable-table
import Component from '@ember/component';
import TableCommon from '../../mixins/table-common';
import BaseTable from '../base-table';
import { computed } from '@ember/object';

export default Component.extend(TableCommon, {
export default BaseTable.extend({
columns: computed(function() {
return [{
label: 'User Details',
Expand Down
Loading