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

Addon is unusable with Ember 2.15 #239

Closed
10 tasks done
onechiporenko opened this issue Aug 19, 2017 · 32 comments
Closed
10 tasks done

Addon is unusable with Ember 2.15 #239

onechiporenko opened this issue Aug 19, 2017 · 32 comments
Assignees
Labels

Comments

@onechiporenko
Copy link
Owner

onechiporenko commented Aug 19, 2017

  • All internal partials should be replaced with components
  • Refactor models-table to use contextual components
  • Refactor existing tests (use ember-cli-mirage and ember-cli-page-object)
  • Add MORE tests (and for server-paginated table too)
  • Change components nesting
  • Allow to send actions from anywhere in the component to the outer context
  • Add yuidocs
  • Themes
  • Check performance
  • Create separated demos for v1.13 and v2.0
@onechiporenko onechiporenko self-assigned this Aug 19, 2017
@steverhoades
Copy link
Contributor

@onechiporenko I just attempted to upgrade to 2.15 and see why this issue was created.

Do you know what in 2.15 broke this add-on? I'd like to help if possible but at the moment there isn't a clear error indicating where this add-on is failing.

What I am seeing is empty rows in the table and an error being thrown on click.

ember-metal.js:3988 TypeError: Cannot read property 'get' of undefined
    at Class.onRowSelect (route.js:171)
    at Router$1.triggerEvent (router.js:1017)
    at trigger (router.js:111)
    at Router$1.trigger (router.js:1699)
    at Class.send (router.js:327)
    at Class.send (action_handler.js:42)
    at Class.triggerAction (target_action_support.js:89)
    at Class.sendAction (action_support.js:115)
    at Class.clickOnRow (component.js:44)
    at Class.send (action_support.js:129)

@steverhoades
Copy link
Contributor

@onechiporenko Adding the following issue so it can be tracked. I believe this is related to the breakage of this add-on in 2.15.

emberjs/ember.js#15621

@onechiporenko
Copy link
Owner Author

Hi, @steverhoades. Something become broken with partials on Ember-2.15. Since Ember core-devs recommended to not use partials and move to the contextual components I have to do this too. Branch v2.0 (https://github.com/onechiporenko/ember-models-table/tree/v2.0) contains new version of ember-models-table. It's not published yet, but i'm working on it.

@mydea
Copy link

mydea commented Sep 4, 2017

I now it is still WIP, but may I recommend that you nest the components? I think that would make it easier to grasp & to override it.

E.g.:

components/models-table.js
components/models-table/select.js
components/models-table/footer.js
components/models-table/row.js
...

You can use these nested components normally in the template, e.g. {{models-table/row}}.

@onechiporenko
Copy link
Owner Author

@mydea, thanks. I think I'll do as you said. It's a good idea!
2.0 is big major release with great changes, so fill free to propose/ask/recommend :)

@mydea
Copy link

mydea commented Sep 4, 2017

Awesome! Is there a place for recommendations etc, or should I just put them here?
I would also be up to help out if there is anything you'd need help with - ember-models-table is an integral part of our products, so I'm happy to give back :)

@onechiporenko
Copy link
Owner Author

onechiporenko commented Sep 4, 2017

Yes, you may put it here.

I would also be up to help out if there is anything you'd need help with

Thanks! For now I need a "fresh outlook" (IDK, if it's a correct translation from "свежий взгляд со стороны").

"Coding part" contains next items:

  • Refactor existing tests (use ember-cli-mirage and ember-cli-page-object)
  • Add MORE tests (and for server-paginated table too)
  • Change components nesting
  • Allow to send actions from anywhere in the component to the outer context
  • Check performance
  • Create separated demos for v1.13 and v2.0
  • Take over the world

@onechiporenko
Copy link
Owner Author

onechiporenko commented Sep 4, 2017

ember-models-table is an integral part of our products, so I'm happy to give back :)

I'm really glad that ember-models-table is useful for your products :)

@Ramblurr
Copy link

Ramblurr commented Sep 5, 2017

The discussion here has left me a little confused. Glad to see 2.0 is coming along :-D

But, is version 1.x going to be updated to support Ember >= 2.15?

@onechiporenko
Copy link
Owner Author

@Ramblurr, upgrading 1.x means that some partials (IDK all partials or only a part of them) should be combined into one template.
As for now, it's not a problem with addon itself. Yes, I've used not best practice with partials instead of components, but partials are supported currently and are not deprecated officially. Some error happens with Ember (or Glimmer or any other lib). I believe that bug emberjs/ember.js#15621 will be fixed and v1.x will continue work correctly.

@Ramblurr
Copy link

Ramblurr commented Sep 8, 2017

Good to hear! I didn't realize this was caused by a bug in Ember rather than a deprecation/change. Thanks @onechiporenko

@onechiporenko
Copy link
Owner Author

onechiporenko commented Sep 11, 2017

v2.0.0-alpha.1 is released. It's a pre-release for anyone who wants to test new design and help to improve it.

Run ember ember-cli-yuidoc to build docs-dir

@majesticblvd
Copy link

Hey, first of all thanks for a great addon! When using Ember 2.15 with v2.0.0-alpha.1 branch, the column template functionality is not working (the cells are now blank). propertyName cells are still showing up correctly.

Keep up the good work!

@onechiporenko
Copy link
Owner Author

@DennisNygren, main idea for version 2.* is replace templates (partials) with contextual and "normal" components. So, upgrade to version 2.* requires refactoring. Some migration docs will be prepared later. For now - just replace partials with components.

@onechiporenko
Copy link
Owner Author

v2.0.0-beta.1 is released.

@majesticblvd
Copy link

@onechiporenko Ok thanks for your quick reply!

@arnebit
Copy link

arnebit commented Sep 21, 2017

Great work so far!

Is there a particular reason not to pass table=this to a componentForFilterCell anymore?

That used to be the case before and I relied on it (on accessing processedColumns in particular) to implement filter options dependent on another filter (subcategory <- main category).

@onechiporenko
Copy link
Owner Author

@arnebit, componentForFilterCell receives several properties (see https://github.com/onechiporenko/ember-models-table/blob/v2.0/addon/templates/components/models-table/row-filtering.hbs#L16). Let me know if something more is needed.

Passing table=this is a bad practice that I shouldn't use before (but I did 😢)

@onechiporenko
Copy link
Owner Author

v2.0.0-beta.2 is released.

@cmonzon44
Copy link

cmonzon44 commented Sep 24, 2017

Separated issue is created
#254

===========
edited by @onechiporenko

@arnebit
Copy link

arnebit commented Sep 25, 2017

@onechiporenko Why is passing table=this bad? Because it would give the user...flexibility? ;-)

The aforementioned processedColumns aside, looking for table. in my project, I find I am also accessing/using

  • the sort action and
  • filteredContent,
    to implement a "toggle flag on all visible items" (to solve a problem similar to Select only filtered data #214, it seems).

@onechiporenko
Copy link
Owner Author

Check new demo page for v.2 http://onechiporenko.github.io/ember-models-table/v.2/

@onechiporenko
Copy link
Owner Author

v2.0.0-beta.3 is released.

@GSakunthala
Copy link

I am using ember-model-table 2.0beta after the issue came up with "partials" in ember 2.15.I want to know if there is an option to customize the pagination in 2.0 such as "componentFooterTemplate" in 1.0? Pls help as it affects my app in production.

@onechiporenko
Copy link
Owner Author

@SakuDivya, sure. You may override models-table/footer or use block content like:

{{#models-table data=data columns=columns as |mt|}}
  {{#mt.footer as |footer|}}
    {{! custom markup here }}
  {{/mt.footer}}
{{/models-table}}

@onechiporenko
Copy link
Owner Author

onechiporenko commented Sep 28, 2017

Short diff-manual for migration from 1.x to 2.x is here - en/ru

@GSakunthala
Copy link

Thanks for the quick reply. But if want pagination functionalities and only need to change the UI lookup of page numbers,what needs to be done.Do i have to write a separate component and write all functionalities instead of {{footer.pagination-numeric}} ?

@onechiporenko
Copy link
Owner Author

@SakuDivya, pls create a separated issue. This one is like a "news-board" for 2.x.

@GSakunthala
Copy link

I have created.Pls take a look Thank u...

@onechiporenko
Copy link
Owner Author

v2.0.0-beta.4 is released. Check small theming guide en / ru

@steverhoades
Copy link
Contributor

Looking really good, thanks for all the hard work @onechiporenko !

@onechiporenko
Copy link
Owner Author

v2.0.0 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants