Skip to content

Features/octane version #1

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

Merged
merged 163 commits into from
Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
14e3d17
Revert "[bugfix] Recompute row meta index when previous prepend cause…
cyk Feb 1, 2019
4a06df0
Fix build (#661)
cyril-sf Mar 13, 2019
8bec5ee
Upgrade several project dependencies (#658)
josemarluedke Mar 13, 2019
c0992e5
Add .yarnrc and .npmrc
Mar 13, 2019
3d38dad
Add yarn.lock
Mar 13, 2019
843b0f8
[FEATURE] Add support for context menu on header cells (#662)
cyril-sf Mar 20, 2019
2eb29fa
don't try to notify the cell value of a change if the context is bein…
nolman Jan 10, 2019
94a4f2f
[CHORE] Node 6 support - pin jsdom
Mar 29, 2019
54ae825
Merge pull request #671 from Addepar/cyril/node-6-support
mixonic Mar 29, 2019
15be87a
Pin ember-cli-page-object
Mar 30, 2019
c084e0b
Merge pull request #674 from Addepar/cyril/build-issue
mixonic Apr 1, 2019
f2825fd
[FEATURE] Use `sortEmptyLast` on the header to have empty values at t…
Mar 29, 2019
91ab599
ember-th renders only the block when one is passed.
Mar 25, 2019
84f881a
[BUGFIX] Empty values are sorted properly
Apr 1, 2019
809e4f3
Merge pull request #675 from Addepar/cyril/sort-empty-last
mixonic Apr 2, 2019
d094c5e
[CHORE] Update to node 8
Mar 29, 2019
7f5c2fa
[CHORE] Unpin jsdom after dropping support for Node 6
Apr 3, 2019
08ab5e9
Merge pull request #670 from Addepar/cyril/node-support
mixonic Apr 4, 2019
878194c
[BUGFIX] Ensure dynamicAlias works on latest Ember (#679)
pzuraq Apr 11, 2019
90f07d8
Start converting to classic classes (#677)
RobbieTheWagner Apr 11, 2019
e9f16c0
Convert row-wrapper and simple-checkbox to classic classes (#681)
RobbieTheWagner Apr 14, 2019
444b0ad
thead, th, and tr to classic components (#680)
nummi Apr 16, 2019
777119e
Convert collapse-tree, column-tree, and ember-td to classic (#682)
RobbieTheWagner Apr 17, 2019
a1d5122
Move ember-decorators to devDeps (#685)
RobbieTheWagner Apr 24, 2019
2aa54aa
[BUG] Setting the column width to its current value works
Apr 23, 2019
74705cc
Merge pull request #684 from Addepar/cyril/debug-portfolio-td
mixonic Apr 24, 2019
cb72742
[BUG] Fix memory leaks related to vertical-collection
Apr 24, 2019
1c3b87a
Change pinned dependency specifier for vertical-collection
bantic Apr 26, 2019
bbe22b4
Ensure that table column widths are recomputed when columns change
rondale-sc May 17, 2019
a67a2b1
Skip _onColumnsChange when there are no remaining columns
bantic May 17, 2019
4c9143f
Convert ember-thead test to a form that works with older Ember
bantic May 20, 2019
0fc27a4
Fix arguments for test helper functions
bantic May 20, 2019
280efd5
Use back-compatible template for ember 1.12 and 1.13
bantic May 20, 2019
c8814b3
Add Ember-1.12 compatibility for `this.set` and `this.get` in test
bantic May 20, 2019
8575206
Add comment about the `rafFinished` helper
bantic May 20, 2019
ea8a46f
Merge pull request #690 from bantic/rondale-sc/testing-column-removal
bantic May 20, 2019
88451e1
[CHORE] ember-beta is supported
Apr 23, 2019
6c1e84f
[PERF] Set default bufferSize to 1
May 30, 2019
b7d56a6
[TEST] Add rowCount to page object for thead, tbody and tfoot
Jun 6, 2019
d50456f
ember-decorators/argument is needed to generate the documentation
Jun 10, 2019
8bb4844
Enable strict BEM class name format
Jun 11, 2019
0aa5637
[FEATURE] Text alignment can be defined per column
Jun 11, 2019
46c173b
CHORE: Change jsconfig settings so that tests are included
bantic Jul 10, 2019
a3b0565
DOCS: Fix rendering of addon docs pages
bantic Jul 10, 2019
753ed3d
DOCS: Avoid passing incorrect/unneeded args to faker.* methods
bantic Jul 10, 2019
fb25c87
CHORE: Change jsconfig settings so that tests are included (#705)
bantic Jul 11, 2019
929e619
Merge pull request #706 from bantic/bantic/fix-docs-rendering-basic
bantic Jul 11, 2019
fecbdda
DOCS: Improve table-customization docs pages
bantic Jul 10, 2019
c06324c
DOCS: Avoid passing incorrect/unneeded args to faker.* methods (#707)
bantic Jul 11, 2019
4cbaee8
Merge pull request #708 from bantic/bantic/docs/table-customization
bantic Jul 11, 2019
aca13be
DOCS: Add basic acceptance test for docs/ routes
bantic Jul 10, 2019
e34c094
[DOCS]: Add basic acceptance test for docs/ routes (#714)
bantic Jul 12, 2019
f98b783
DOCS: Test that subcolumns docs render cells
bantic Jul 10, 2019
b92911d
DOCS: Test that subcolumns docs render cells (#710)
bantic Jul 12, 2019
be7853f
[DOCS] Fix autogenerated API docs for components
bantic Jul 15, 2019
14dbc96
[DOCS] Add "Testing" section
bantic Jul 15, 2019
e4379ed
[DOCS] Fix autogenerated API docs for components (#716)
bantic Jul 15, 2019
5c6f61e
[DOCS] Add "Testing" section (#717)
bantic Jul 15, 2019
9ccfd27
DOCS: Better spacing for Resize/Reorder columns demo
bantic Jul 15, 2019
cb3fd69
DOCS: Remove unused args to docs-hero
bantic Jul 15, 2019
19fec7d
[DOCS] Remove unused `.red-cell` css style
bantic Jul 15, 2019
2a34966
[DOCS] Style tweaks (#718)
bantic Jul 15, 2019
2ae1eb1
[CHORE] v2.0.0-beta.8
bantic Jul 15, 2019
5a09605
[CHORE] Add 3.4, 3.8 LTS to ember-try
bantic Jul 16, 2019
a4cc1cc
[CHORE] Update .travis.yml
bantic Jul 16, 2019
fc9ac40
[CHORE] More update to travis.yml
bantic Jul 16, 2019
15cf3ae
[CHORE] Add 3.4, 3.8 LTS to ember-try (#720)
bantic Jul 16, 2019
f96c851
[CHORE] Remove unused ember-cli-addon-docs configs
bantic Jul 16, 2019
997e2b3
Remove @function annotation from private mergeSort function
bantic Jul 16, 2019
d5f1d6e
[CHORE] Remove unused ember-cli-addon-docs configs (#722)
bantic Jul 16, 2019
4a8ddae
[DOCS] Unconditionally enable faker for dummy app
bantic Jul 16, 2019
74d858f
[DOCS] Unconditionally enable faker for dummy app (#723)
bantic Jul 17, 2019
6f89fd6
[DOCS] Show selected-row checkmark
bantic Jul 17, 2019
37a06ef
Merge pull request #724 from Addepar/bantic/docs/checkmark
bantic Jul 17, 2019
0a85f71
[DOCS] Add 2-state sorting example
bantic Jul 17, 2019
0fa3e3f
[DOCS] Add 2-state sorting example (#725)
bantic Jul 17, 2019
4471931
Bump up the size of demo data for selection
mixonic Jul 19, 2019
a22c73e
Use objectAt to fetch rowValues (cause meta alloc)
mixonic Jul 19, 2019
6f05b44
[DOCS] Fix up wording and typo in docs
bantic Jul 19, 2019
fde9fee
Update tests/dummy/app/pods/docs/guides/body/row-selection/template.md
bantic Jul 19, 2019
1af2010
[DOCS] Fix up wording and typo in docs (#729)
bantic Jul 19, 2019
2c54a06
fix eslint
bantic Jul 19, 2019
da1b0f7
[DOCS] Change styling for row-selection demo options
bantic Jul 19, 2019
5c8643d
[DOCS] Change styling for row-selection demo options (#730)
bantic Jul 19, 2019
9261ff4
Merge pull request #727 from Addepar/mixonic/allocate-meta-when-selec…
mixonic Jul 19, 2019
cae077a
Test that unrendered (occluded) row selection can be managed
bantic Jul 19, 2019
84badeb
Test that unrendered (occluded) row selection can be managed (#731)
bantic Jul 19, 2019
31b2c4d
v2.0.0-beta.9
bantic Jul 19, 2019
b985d8f
[DOCS] Add interactive row-selection demo
bantic Jul 22, 2019
024b2af
[DOCS] Add interactive row-selection demo (#732)
bantic Jul 22, 2019
2bcaa71
Add failing test for #735
bantic Jul 22, 2019
4ed6b17
Potential fix for #735
bantic Jul 22, 2019
cb89009
Add failing test for #735 (#736)
bantic Jul 22, 2019
111acb0
Render tables with no columns correctly (#737)
bantic Jul 23, 2019
b485e26
v2.0.0
bantic Jul 23, 2019
08150bf
[DOCS] Miscellaneous small fixes
bantic Jul 23, 2019
66a45d4
[DOCS] Miscellaneous small fixes (#738)
bantic Jul 23, 2019
d029cab
[DOCS] Update readme to add link to online docs
bantic Jul 23, 2019
df2aa93
Merge pull request #739 from Addepar/bantic/docs/readme
bantic Jul 23, 2019
1b94ae1
move addon to dependencies
eflanagan0 Jul 23, 2019
3861c1e
enable fillMode to support an nth-column option
chbonser Nov 26, 2018
c9ab9a0
make all single column fill modes reuse the same resize implementation
chbonser Jul 23, 2019
e523c6f
Merge pull request #742 from efx/fix-741
bantic Jul 23, 2019
2cf07a6
[FEAT] enable fillMode to support an nth-column option (#635)
bantic Jul 26, 2019
dd80594
[DOCS] Update docs for `fillColumnIndex`
bantic Jul 26, 2019
d202c2b
[DOCS] Test clicking on snippets links on docs pages
bantic Jul 29, 2019
fab4fbc
[DOCS] Fix demo snippets on Sorting, Dynamic Fixed Columns docs
bantic Jul 29, 2019
c9aa88b
[DOCS] Test clicking on snippets links on docs pages (#746)
bantic Jul 29, 2019
d2ea37e
Add failing tests for #747
bantic Jul 29, 2019
961a5d5
Add `setupAllRowMeta`, `mapSelectionToMeta` to CollapseTree
bantic Jul 30, 2019
ea8d909
Add debug-handlers polyfill to capture warning in older Ember
bantic Jul 30, 2019
78a35c1
assert row is selected in test
bantic Jul 30, 2019
7b2e855
only register the warn handler 1x during testing
bantic Jul 30, 2019
0faf6dd
Do not JSON.stringify missing row
bantic Jul 30, 2019
4604929
[BUG] Fix cases where manual selection includes unrendered or no… (#748)
bantic Jul 31, 2019
2eaee47
[TESTS] footer page object extends body page object
bantic Jul 31, 2019
87796c5
[TESTS] footer page object extends body page object (#749)
bantic Jul 31, 2019
8bddfa9
[DOCS] Add Changelog.md (#750)
bantic Jul 31, 2019
0eec444
[CHORE] Use release-it for releases (#751)
bantic Jul 31, 2019
eeccff6
Update readme and release-it config
bantic Jul 31, 2019
f810830
Release 2.1.0
bantic Jul 31, 2019
a04716f
Added example of using CSS Flex with ember-table (#752)
octabode Aug 9, 2019
c9e8b41
[TESTS] Allow ember-beta scenario to fail at CI (#755)
bantic Aug 15, 2019
8412c1f
Add npm version badge
bantic Aug 15, 2019
5a2a51c
Update version badge in README
bantic Aug 15, 2019
44a7ae0
[FEAT] Enforce maximum height (by percentage) for sticky footers and …
bantic Aug 15, 2019
275b176
Release 2.1.1
bantic Aug 15, 2019
c183d6b
[CHORE] use vertical-collection @ ^1.0.0-beta.14 (#756)
bantic Aug 16, 2019
3aa2645
Release 2.1.2
bantic Aug 16, 2019
1f832cd
bugfix: allow zero for fillColumnIndex
Sep 13, 2019
4e184c1
Bump deps. Pin addon-docs to avoid regression
mixonic Sep 17, 2019
b7b7305
Merge pull request #770 from Addepar/mixonic/bump-deps
mixonic Sep 17, 2019
94b1e51
Merge pull request #768 from MichalBryxi/bugfix/nth-column-zero
mixonic Sep 17, 2019
5d33dc0
Release 2.1.3
mixonic Sep 17, 2019
2d49721
Update ember-classy-page-object to latest ^0.6.0 (#772)
bantic Oct 25, 2019
cc6897e
Release 2.1.4
bantic Oct 25, 2019
c2c1ea3
Fix release badge (#774)
bantic Oct 25, 2019
8673471
Fix CI (#773)
bantic Oct 29, 2019
c5c9cee
Use async observer when target app is Ember 3.13+ (#777)
bantic Oct 30, 2019
cdfd8f1
Remove unused `_notifyCollection` property (#779)
bantic Oct 30, 2019
b9ab330
[DOCS] Add browser compatibility section (#769)
ctjhoa Oct 31, 2019
af2f0a3
Fix column-reordering with Ember 3.13+ (#778)
bantic Nov 5, 2019
626f3a4
[FEAT] Add direction to reorder indicator (#766)
frykten Nov 5, 2019
16de576
[DOCS] Remove Ember 3.13 section from readme (#781)
bantic Nov 5, 2019
476140b
Bump ember-test-selectors (#782)
mixonic Nov 5, 2019
6529af2
Release v2.2.0
bantic Nov 5, 2019
f95f678
[DOCS] Add new reorder-directional classes (#783)
frykten Nov 11, 2019
8d18c9b
Use resolutions to force prettier to 1.18.2
bantic Nov 21, 2019
150f0ce
Merge pull request #790 from Addepar/bantic/789-fix-prettier-complaints
mixonic Nov 22, 2019
0bd5806
bugfix: first multiselection has no _lastSelectedIndex
frykten Nov 19, 2019
61a9cd0
Merge pull request #788 from frykten/fix_selection
mixonic Nov 22, 2019
040df20
Release 2.2.1
bantic Dec 11, 2019
5eaf79c
Avoid "update prop already used in computation"
mixonic Jan 8, 2020
d923e47
Ignore engine incompat
mixonic Jan 9, 2020
b24e98e
Merge pull request #802 from mixonic/mixonic/3.15-compat
mixonic Jan 9, 2020
020ad0b
Release 2.2.2
mixonic Jan 9, 2020
195c842
Add testing for rowCount for tree tables
jiayingxu Jan 10, 2020
6503b3e
Update row count when tree collapses
mixonic Jan 10, 2020
22a16e9
Merge pull request #806 from mixonic/mixonic/rowcount-fix
mixonic Jan 13, 2020
258efe3
Release 2.2.3
mixonic Jan 13, 2020
7b60824
Merge remote-tracking branch 'upstream/master' into features/octane-v…
tempo22 May 22, 2020
d8cb852
restore ember th behavior
tempo22 Sep 8, 2020
8ab747f
Quickfix: column re-ordering
tempo22 Oct 6, 2020
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
24 changes: 20 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
module.exports = {
extends: ['@addepar', '@addepar/eslint-config/ember'],
parser: 'babel-eslint',
env: {
es6: true,
},
rules: {
'no-restricted-globals': 'off',

'ember/closure-actions': 'off',
'ember/avoid-leaking-state-in-ember-objects': 'off',

'ember-best-practices/require-dependent-keys': 'off',
}

'no-restricted-imports': [
'error',
{
paths: [
{
name: '@ember/object',
importNames: ['observer'],
message: 'For compatibility, use `import { observer } from "-private/utils/observer"`',
},
{
name: '@ember/object/observers',
importNames: ['addObserver', 'removeObserver'],
message:
'For compatibility, use `import { addObserver, removeObserver } from "-private/utils/observer"`',
},
],
},
],
},
};
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ testem.log
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
yarn.lock
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@addepar:registry = "https://registry.npmjs.org/"
12 changes: 12 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"git": {
"tagName": "v${version}"
},
"github": {
"release": false
},
"hooks": {
"after:release": "yarn run docs:deploy",
"after:bump": "npx auto-changelog -p"
}
}
6 changes: 6 additions & 0 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
options:
config-file: node_modules/@addepar/sass-lint-config/config.yml
rules:
# Name Formats
class-name-format:
- 2
-
convention: strictbem
66 changes: 46 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,72 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "6"
- '8'

sudo: required
dist: trusty

addons:
chrome: stable

cache:
yarn: true
directories:
- node_modules

global:
# See https://git.io/vdao3 for details.
- JOBS=1
env:
# 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-1.12
- EMBER_TRY_SCENARIO=ember-1.13
- EMBER_TRY_SCENARIO=ember-lts-2.8
- EMBER_TRY_SCENARIO=ember-lts-2.18
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default

matrix:
fast_finish: true
global:
# See https://git.io/vdao3 for details.
- JOBS=1

branches:
only:
- master
# npm version tags
- /^v\d+\.\d+\.\d+/

jobs:
fail_fast: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary

include:
# runs linting and tests with current locked deps

- stage: 'Tests'
name: 'Tests'
install:
- yarn install --non-interactive

script:
- yarn run lint
- yarn run test

- name: 'Floating dependencies'
script:
- yarn test

# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- stage: 'Additional Tests'
env: EMBER_TRY_SCENARIO=ember-1.12
- env: EMBER_TRY_SCENARIO=ember-1.13
- env: EMBER_TRY_SCENARIO=ember-lts-2.8
- env: EMBER_TRY_SCENARIO=ember-lts-2.18
- env: EMBER_TRY_SCENARIO=ember-lts-3.4
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

install:
- yarn install --no-lockfile --non-interactive
- yarn install --no-lockfile --non-interactive --ignore-engines

script:
- yarn run lint
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry "https://registry.npmjs.org/"
528 changes: 528 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

98 changes: 61 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Build Status](https://travis-ci.org/Addepar/ember-table.svg?branch=master)](https://travis-ci.org/Addepar/ember-table)
![npm version](https://img.shields.io/npm/v/ember-table)

# Ember Table

Expand All @@ -13,6 +14,7 @@ ember install ember-table
```

## Features

- Column resizing, column reordering.
- Table resizing.
- Fixed first column.
Expand All @@ -23,9 +25,12 @@ ember install ember-table

## Documentation

For more detailed documentation, clone the repo, run `yarn && yarn start` and then navigate to `http://localhost:4200/docs`
Documentation is available at: https://opensource.addepar.com/ember-table/docs

Ember Table uses [ember-cli-addon-docs](https://github.com/ember-learn/ember-cli-addon-docs) for its documentation.
To run the docs locally, clone the repo, run `yarn && yarn start` and then navigate to `http://localhost:4200/docs`.

## Usage.
## Usage

To use `Ember Table`, you need to create `columns` and `rows` dataset.

Expand All @@ -36,16 +41,16 @@ each row for that column. If you only want to use the default template, you can
specify a `name` on the column which will be rendered in the template.

```javascript
columns: [
{
name: `Open time`,
valuePath: `open`
},
{
name: `Close time`,
valuePath: `close`
}
]
columns: [
{
name: `Open time`,
valuePath: `open`,
},
{
name: `Close time`,
valuePath: `close`,
},
];
```

`rows` could be a javascript array, ember array or any data structure that implements `length` and
Expand All @@ -54,21 +59,21 @@ data as user scrolls. Each object in the `rows` data structure should contains a
by all `valuePath` in `columns` array.

```javascript
rows: computed(function() {
const rows = emberA();
rows: computed(function() {
const rows = emberA();

rows.pushObject({
open: '8AM',
close: '8PM'
});
rows.pushObject({
open: '8AM',
close: '8PM',
});

rows.pushObject({
open: '11AM',
close: '9PM'
});
rows.pushObject({
open: '11AM',
close: '9PM',
});

return rows;
})
return rows;
});
```

### Template
Expand All @@ -87,11 +92,11 @@ You can use the block form of the table to customize its template. The component
structure matches that of actual HTML tables, and allows you to customize it at
any level. At the cell level, you get access to these four values:

* `value` - The value of the cell
* `cell` - A unique cell cache. You can use this to track cell state without
- `value` - The value of the cell
- `cell` - A unique cell cache. You can use this to track cell state without
dirtying the underlying model.
* `column` - The column itself.
* `row` - The row itself.
- `column` - The column itself.
- `row` - The row itself.

You can use these values to customize cell in many ways. For instance, if you
want to have every cell in a particular column use a component, you can add a
Expand Down Expand Up @@ -120,7 +125,6 @@ If you want to use default table style, import the `ember-table/default` SASS fi
You can also use the `ember-tfoot` component, which has the same API as
`ember-tbody`:


```
{{#ember-table as |t|}}
{{t.head columns=columns}}
Expand All @@ -131,19 +135,39 @@ You can also use the `ember-tfoot` component, which has the same API as
{{/ember-table}}
```

## Browser compatibility

This project is written using an EcmaScript 6 javascript syntax.
Babel doesn't include polyfill by default, so if you want to target legacy browsers (eg. IE11),
you need to add this to your `ember-cli-build.js`:

```js
var app = new EmberApp({
'ember-cli-babel': {
includePolyfill: true,
},
});
```

## Migrating from old Ember table

To support smooth migration from old version of Ember table (support only till ember 1.11), we have
move the old source code to separate package [ember-table-legacy](https://github.com/Addepar/ember-table-legacy).
It's a separate package from this Ember table package and you can install it using yarn or npm.
This allows you to have 2 versions of ember table in your code base and you can start your migrating
one table at at time. The recommended migration steps are as follows (if you are using ember 1.11):

1) Rename all your ember-table import to ember-table-legacy. (for example:
`import EmberTable from 'ember-table/components/ember-table'` becomes
`import EmberTableLegacy from 'ember-table-legacy/components/ember-table-legacy'`. Remove reference
of `ember-table` in `package.json`.
2) Install `ember-table-legacy` using `yarn add ember-table-legacy` or `npm install ember-table-legacy`
3) Run your app to make sure that it works without issue.
4) Reinstall the latest version of this `ember-table` repo.
5) You can start using new version of Ember table from now or replacing the old ones.
1. Rename all your ember-table import to ember-table-legacy. (for example:
`import EmberTable from 'ember-table/components/ember-table'` becomes
`import EmberTableLegacy from 'ember-table-legacy/components/ember-table-legacy'`. Remove reference
of `ember-table` in `package.json`.
2. Install `ember-table-legacy` using `yarn add ember-table-legacy` or `npm install ember-table-legacy`
3. Run your app to make sure that it works without issue.
4. Reinstall the latest version of this `ember-table` repo.
5. You can start using new version of Ember table from now or replacing the old ones.

# Releasing new versions (for maintainers)

We use [`release-it`](https://github.com/release-it/release-it).
To create a new release, run `yarn run release`. To do a dry-run: `yarn run release --dry-run`.
The tool will prompt you to select the new release version.
3 changes: 3 additions & 0 deletions addon-test-support/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import TablePage from './pages/ember-table';

export { TablePage };
19 changes: 16 additions & 3 deletions addon-test-support/pages/-private/ember-table-body.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
import { alias, triggerable, collection, hasClass, property } from 'ember-classy-page-object';
import PageObject, {
alias,
triggerable,
collection,
hasClass,
property,
} from 'ember-classy-page-object';
import { findElement } from 'ember-classy-page-object/extend';

import { click } from 'ember-native-dom-helpers';

export default {
export default PageObject.extend({
scope: 'tbody',

/**
Returns the number of rows in the body.
*/
get rowCount() {
return Number(findElement(this).getAttribute('data-test-row-count'));
},

/**
List of rows in table body. Each of property/function in this collections is the property/func
of a single row selected by using calling rows.objectAt(index).
Expand Down Expand Up @@ -73,4 +86,4 @@ export default {
getCell(rowIndex, columnIndex) {
return this.rows.objectAt(rowIndex).cells.objectAt(columnIndex);
},
};
});
13 changes: 3 additions & 10 deletions addon-test-support/pages/-private/ember-table-footer.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import { collection } from 'ember-classy-page-object';
import EmberTableBody from './ember-table-body';

export default {
export default EmberTableBody.extend({
scope: 'tfoot',

footers: collection({
scope: 'td',
}),

rows: collection({
scope: 'tr',

cells: collection({
scope: 'td',
}),
}),
};
});
Loading