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

Getting started guidance and support for angle bracket syntax #688

Closed
mshirey opened this issue May 17, 2019 · 8 comments
Closed

Getting started guidance and support for angle bracket syntax #688

mshirey opened this issue May 17, 2019 · 8 comments
Labels

Comments

@mshirey
Copy link

mshirey commented May 17, 2019

Error: Assertion Failed: [ember-light-table] table must be an instance of Table

Getting this error while I've confirmed we are creating an instance of the Table. This is a seriously uninformative error that has left us at a brick wall. We've followed the documentation as best as we could and used supplimental materials such as (https://github.com/Stoiker/ember-light-table-hello-world) as well as digging through the dummy app code. At this point I'd beg for updated / clearer documentation. This table looks like it is very nice and has great potential, but right now, we cannot even get out of the starting gate.

@fran-worley
Copy link
Contributor

@mshirey without some idea of the code you've put together it'll be pretty hard for anyone to help! Can you post an extract or reproduction?

@alexander-alvarez
Copy link
Collaborator

@mshirey sorry about that. did you track through the other issues with the same problem and how we helped them fixed it?

#544 (and the ones referenced in that one)
this assertion means that you're not properly ivoking the addon which has been an issue others have come across also

@mshirey
Copy link
Author

mshirey commented May 20, 2019 via email

@alexander-alvarez
Copy link
Collaborator

Thanks @mshirey for debugging all that, and sorry you had the issues.

What I can do to help you is to explain how I encountered this error and how I resolved the issue. For me, I was trying to use angle brackets format instead of handlebars. We’ve converted all of our projects to angle brackets and prefer to not have mixed format in our templates. Once I converted my code back to using handlebars, the error was no longer present. This however is not the desired result as now I have a mixed format in my template. Will Ember Light Table work using angle brackets syntax? If so, could you provide any hints or tips on any issues you’re aware of?

Is very helpful for us to be able to answer your questions. If we new what you were experiencing we would have prevented it from happening. Generally speaking that assertion is hit when the table isn't passed in. I'd have to investigate more to give you a definite answer as to what happened.

The intent is to support angle bracket usage. If it doesn't, PRs with failing test cases are great ways to kick-start bugfixes from those with free time.

On a semi-related topic, I’d recommend the removal of the use of mix-ins from the provided examples. It looks like it’s a point of confusion for some developers, and at least in my opinion, isn’t needed to explain the use of the Table. Maybe leave these to an “advanced” section?

Definitely. It seems people are keen on copy-pasting and miss he common logic form the mix-in. The logic has been there to prevent copy pasta on our demo applications, but frequently enough people stumble on it that I believe it outweighs the maintenance burden related to it.

@fran-worley
Copy link
Contributor

fran-worley commented May 22, 2019

@mshirey @alexander-alvarez I'm just working through updating dependencies for ELT which includes emberjs and ember cli. Once I've done this we can turn our attention to 'officially' supporting angle bracket syntax.

I believe we can pull in the work started here for the docs #670 though we should probably add some tests too for good measure!

@mshirey
Copy link
Author

mshirey commented May 22, 2019

@mshirey @alexander-alvarez I'm just working through updating dependencies for ELT which includes emberjs and ember cli. Once I've done this we can turn our attention to 'officially' supporting angle bracket syntax.

I believe we can pull in the work started here for the docs #670 though we should probably add some tests too for good measure!

Thank you so much @fran-worley . I can confirm that I ran into the "Error: Assertion Failed: [ember-light-table] table must be an instance of Table" issue working through the ember-light-table-hello-world example. All I did was convert the handlebars to angle brackets. Once I encountered the error, on a hunch, I switched it back to handlebars and the error resolved itself. I don't have that code anymore, but I can reproduce it if it would be helpful.

@fran-worley
Copy link
Contributor

Thats really helpful @mshirey I think the answer is probably for us to add a getting started page into the cookbook https://offirgolan.github.io/ember-light-table/#/cookbook .

I think you've pointed us in the direction of how you hit this error so that should be enough to go on for now. As a side point if you're trying to use ember-light-table in a >3.1 ember project I would advise you to checkout the 2.x branch as that is where we're applying fixes for deprecations etc.

@fran-worley fran-worley changed the title Error: Assertion Failed: [ember-light-table] table must be an instance of Table Getting started guidance and support for angle bracket syntax May 22, 2019
@fran-worley
Copy link
Contributor

@mshirey I suspect you've moved on by now but I've got Angle Brackets working on the 2.x branch in our dummy app. Please see the following file for a simple example.
https://github.com/offirgolan/ember-light-table/blob/77a43766cf86c6f9058d83d1c519b9340a0ebb4a/tests/dummy/app/templates/components/simple-table.hbs

The docs will be updated in the next couple of weeks as we release v2.0.0 (see #739)

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

3 participants