yahoo / ember-gridstack

Ember components to build drag-and-drop multi-column grids powered by gridstack.js
https://yahoo.github.io/ember-gridstack/
Other
37 stars 29 forks source link

Update gridstack.js to 0.6.4. #48

Closed ttill closed 4 years ago

ttill commented 4 years ago

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

adumesny commented 4 years ago

glad to see keeping up with my gridstack changes. Note that as of 0.5.3 grid options width is now column, height now maxRow, and setGridWidth() now setColumn() to match what they are. Old names are still supported (console warnings).

https://github.com/gridstack/gridstack.js/releases/tag/v0.5.3

Also a much smaller jquery-ui is now included in gridstack-all.min.js (and under dist/jquery-ui.min.js) so no need to include it anymore (hidden, to be removed later)

ttill commented 4 years ago

@adumesny Thank you very much for your hints and your ongoing work on this great library!

balajimanoharan commented 4 years ago

Hey @ttill, thanks for working on this. there is still a build error that needs to be addressed before this can be merged. Do you mind taking a look at that?

adumesny commented 4 years ago

https://travis-ci.org/yahoo/ember-gridstack/jobs/646774452?utm_medium=notification&utm_source=github_status

not ok 13 Chrome 80.0 - [109 ms] - Integration | Component | grid stack: onChange action

note that I greatly reduced the number of calls to change callbacks, but apparently I introduced a bug where there is some case it doesn't get called when it should - see https://github.com/gridstack/gridstack.js/issues/1142 I'll try to fix that next week and release a 0.6.4 if I can (working on major 1.0.0 release with no jquery)

balajimanoharan commented 4 years ago

Thanks @adumesny for letting us know. Looking forward to your 1.0 release as well.

ttill commented 4 years ago

Unfortunately 0.6.4 did not fix the test. I did some experiments but was unable to figure out what's going on, as onChange is working as expected in my app.

adumesny commented 4 years ago

@ttill doesn't look like the build is failing anymore though ? I don't see a red X next to change # (but a conflicting package file)

balajimanoharan commented 4 years ago

@adumesny The build didn't run in this case, since the package.json changes need to be resolved. But I built this locally, and noticed that adding new items to a grid does not trigger a change event anymore. Moving and resizing grid items trigger the change event correctly.

If that's expected behavior, I can just update the tests here.

adumesny commented 4 years ago

yes adding/removing an item will ONLY now call change event on other nodes if they changed, else you get just the add/remove with the latest position/size. That is a change from the previously very verbose callbacks.

ttill commented 4 years ago

I rebased on master and fixed the tests anticipating gridstack.js' new event logic and also considering onAdded and onRemoved in addition to onChange.

balajimanoharan commented 4 years ago

Thanks @ttill @adumesny. Will publish a release later today.

adumesny commented 4 years ago

great. I should have v1.0.0 later this week which removes jquery dependencies from API/package That will require code and packaging change though.