Skip to content

Commit

Permalink
Upgraded to ember 1.12.0
Browse files Browse the repository at this point in the history
Upgraded ember list view to v 0.0.6
Moved required properties into list-view mixin
Part of emberjs#360
  • Loading branch information
patsy-issa committed Oct 13, 2015
1 parent 20c6af8 commit 138b4ac
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 47 deletions.
22 changes: 22 additions & 0 deletions app/mixins/views/list-view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Ember from "ember";
import ListItemView from "ember-inspector/views/list-item";

const { Mixin, computed } = Ember;

export default Mixin.create({
contentHeight: Ember.computed.alias('controller.controllers.application.contentHeight'),

height: computed('contentHeight', function() {
let headerHeight = 31;
let contentHeight = this.get('contentHeight');

// In testing list-view is created before `contentHeight` is set
// which will trigger an exception
if (!contentHeight) {
return 1;
}
return contentHeight - headerHeight;
}),
rowHeight: 30,
itemViewClass: ListItemView
});
3 changes: 1 addition & 2 deletions app/styles/list_view.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

.list-view {
.list-view {
position: relative;
font-size: 11px;
height: 100%;
Expand Down
8 changes: 4 additions & 4 deletions app/views/instance-list.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import ListView from "ember-inspector/views/list";
import ListItemView from "ember-inspector/views/list-item";
import ListView from 'ember-list-view';
import ListItemView from 'ember-inspector/views/list-item';
import ListViewMixin from 'ember-inspector/mixins/views/list-view';

export default ListView.extend({
export default ListView.extend(ListViewMixin, {
itemViewClass: ListItemView.extend({
templateName: "instance_item"
})

});
3 changes: 2 additions & 1 deletion app/views/list-item.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ListItemView from "list-view/list-item-view";
import ListItemView from 'ember-list-view/list-item-view';

export default ListItemView.extend({
classNames: ["list-tree__item-wrapper", "row-wrapper"]
});
24 changes: 3 additions & 21 deletions app/views/list.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
import Ember from "ember";
import ListItemView from "ember-inspector/views/list-item";
import ListView from "list-view/list-view";
const { computed } = Ember;
import ListViewMixin from 'ember-inspector/mixins/views/list-view';

export default ListView.extend({
classNames: ["list-tree"],

contentHeight: Ember.computed.alias('controller.controllers.application.contentHeight'),

height: computed('contentHeight', function() {
let headerHeight = 31;
let contentHeight = this.get('contentHeight');

// In testing list-view is created before `contentHeight` is set
// which will trigger an exception
if (!contentHeight) {
return 1;
}
return contentHeight - headerHeight;
}),
rowHeight: 30,
itemViewClass: ListItemView
export default ListView.extend(ListViewMixin, {
classNames: ["list-tree"]
});
6 changes: 3 additions & 3 deletions app/views/promise-list.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import ListView from "ember-inspector/views/list";
import ListView from 'ember-list-view';
import ListItemView from "ember-inspector/views/list-item";
import ListViewMixin from 'ember-inspector/mixins/views/list-view';

export default ListView.extend({
export default ListView.extend(ListViewMixin, {
itemViewClass: ListItemView.extend({
templateName: "promise_item"
})

});
8 changes: 4 additions & 4 deletions app/views/record-list.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Ember from 'ember';
import ListView from "ember-inspector/views/list";
import ListView from 'ember-list-view';
import ListItemView from "ember-inspector/views/list-item";
import ListViewMixin from 'ember-inspector/mixins/views/list-view';

const { computed } = Ember;
const { readOnly } = computed;
const { computed: { readOnly } } = Ember;

export default ListView.extend({
export default ListView.extend(ListViewMixin, {
itemViewClass: ListItemView.extend({
templateName: "record_item",

Expand Down
9 changes: 5 additions & 4 deletions app/views/route-list.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Ember from 'ember';
import ListView from "ember-inspector/views/list";
import ListView from 'ember-list-view';
import ListItemView from "ember-inspector/views/list-item";
const { computed } = Ember;
const { readOnly } = computed;
import ListViewMixin from 'ember-inspector/mixins/views/list-view';

export default ListView.extend({
const { computed: { readOnly } } = Ember;

export default ListView.extend(ListViewMixin, {
itemViewClass: ListItemView.extend({
templateName: "route_item",

Expand Down
5 changes: 3 additions & 2 deletions app/views/view-list.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import Ember from "ember";
import ListView from "ember-inspector/views/list";
import ListView from 'ember-list-view';
import ListItemView from "ember-inspector/views/list-item";
import ListViewMixin from 'ember-inspector/mixins/views/list-view';

const { computed } = Ember;
const { readOnly } = computed;

export default ListView.extend({
export default ListView.extend(ListViewMixin, {
itemViewClass: ListItemView.extend({
templateName: "view_item",

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ember-inspector",
"dependencies": {
"jquery": "^1.11.1",
"ember": "1.10.0",
"ember": "1.12.0",
"ember-resolver": "~0.1.12",
"loader.js": "ember-cli/loader.js#3.2.0",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
Expand Down
3 changes: 2 additions & 1 deletion ember_debug/object-inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,8 @@ function getDebugInfo(object) {
'layout',
'templateData',
'domManager',
'states'
'states',
'element'
);
}

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"ember-cli-qunit": "0.3.9",
"ember-cli-uglify": "1.0.1",
"ember-export-application-global": "^1.0.2",
"ember-list-view": "0.0.6",
"ember-pikaday": "^0.2.1",
"eslint-config-ember": "0.2.0",
"grunt": "^0.4.5",
Expand All @@ -59,8 +60,7 @@
"grunt-mozilla-addon-sdk": "~0.4.0",
"grunt-s3": "^0.2.0-alpha.3",
"grunt-version": "^0.3.0",
"js-string-escape": "^1.0.0",
"list-view": "emberjs/list-view#aefb20f"
"js-string-escape": "^1.0.0"
},
"dependencies": {
"ember-new-computed": "^1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/object_inspector_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ test("Date fields are editable", async function t(assert) {
});

test("Errors are correctly displayed", async function t(assert) {
let obj = objectFactory( {
let obj = objectFactory({
name: 'My Object',
objectId: '1',
errors: [
Expand All @@ -479,7 +479,7 @@ test("Errors are correctly displayed", async function t(assert) {
assert.equal(findByLabel('object-inspector-errors').length, 1);
assert.equal(findByLabel('object-inspector-error').length, 2);

clickByLabel('send-errors-to-console');
await clickByLabel('send-errors-to-console');

assert.equal(name, 'objectInspector:traceErrors');
assert.equal(message.objectId, '1');
Expand Down

0 comments on commit 138b4ac

Please sign in to comment.