ember-light-table
ember-light-table copied to clipboard
Improve Documentation
- [ ] Annotate each available component property with a helpful description and maybe an example where possible
- [x] Cell Type and Column Type --> What they are and how they can be used (including their appropriate blueprint generators) #91
- [ ] Add overall examples in module homes
- [ ] Maybe rename the modules to make everything easier to read? I feel like the docs right now are really hard to follow IMHO
@offirgolan what sort of improvements are you thinking of? I could potentially help with this.
@rwwagner90 that would be fantastic! I added a list of tasks I think should be added to the docs. Feel free to take whichever one you are more comfortable with 😺
Hello 👋 First, I'm not sure if this is the right place to add my request. Please accept my apologies if a better place is available.
Second, I would like to request additional documentation on the creation of custom cellTypes. I'm using ember-light-table v1.13.2, with ember-cli 2.18.2. I'm relatively new to Ember, and Javascript development in general, and recently started using ember-light-table.
I asked this question on the Ember Discord Server: Regarding cellComponent and cellType when is it better to use one over the other? An answer was not supplied but that is/was OK since I was planning on experimenting with both. Unfortunately I was not able to make a custom cellType work, even an empty one. I was not able to find any documentation on how to create one. Silver lining: cellComponent worked like a champ; at a high-level I understand components so it was easy to create one and get it working.
Thank you for your time
@melriffe Welcome to Ember and JS and sorry you've had troubles getting productive with ELT.
Did you find http://offirgolan.github.io/ember-light-table/docs/classes/Column.html#property_cellType ? If so, what's unclear? Documentation is hard and we're always looking for ways to improve especially given the cycles.
The column.cellType
property gets passed in here https://github.com/offirgolan/ember-light-table/blob/61247e520522f965030326a2493bc5476a43ee09/addon/templates/components/lt-row.hbs#L2-L7
so the component class you generate will get all those properties passed in table, rawValue, tableActions, extra
@alexander-alvarez Thank you for the reply, and the welcome.
I did see the reference documentation, but it doesn't make sense to me. Sorry. It would be nice if there was an example on the demo site; for me, it's been the single most helpful bit of documentation.
I created a custom cell type, but it was empty, and I received an error trying to use it. I would welcome a simple sample implementation.
Sorry for the delay... life is kicking my butt right now. I understand you wanting an example and it being better, but I don't really have the time right now
I created a custom cell type, but it was empty, and I received an error trying to use it. I would welcome a simple sample implementation.
If you give me more details on the error I can help you work through it right now.
long story short is
{
// all the stuff for your column definition +
cellType: 'name-of-my-cell'
}
in templates/components/light-table/cells/name-of-my-cell.hbs
{{!-- I have access to all of these --}}
{{column}} {{row}} {{rawValue}} {{table}} {{tableActions}}
https://github.com/offirgolan/ember-light-table/blob/master/addon/components/cells/base.js
Alex, completely understand about life kicking some butt. :-)
I will try to capture the error I'm receiving soonish.
Thank you for your patience.
On Fri, Mar 15, 2019 at 3:15 PM Alex Alvarez [email protected] wrote:
Sorry for the delay... life is kicking my butt right now. I understand you wanting an example and it being better, but I don't really have the time right now
I created a custom cell type, but it was empty, and I received an error trying to use it. I would welcome a simple sample implementation.
If you give me more details on the error I can help you work through it right now.
long story short is
{ // all the stuff for your column definition + cellType: 'name-of-my-cell' }
in templates/components/light-table/cells/name-of-my-cell.hbs
{{!-- I have access to all of these --}}{{column}} {{row}} {{rawValue}} {{table}} {{tableActions}}
https://github.com/offirgolan/ember-light-table/blob/master/addon/components/cells/base.js
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/offirgolan/ember-light-table/issues/54#issuecomment-473410267, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAIwffa0n2RchOR_yv-9kDiEcBg3-hvks5vW_FkgaJpZM4I0tzu .
Alex,
Here's a bit of feedback:
$ ember generate cell-type light-table/total-error-count --pod installing cell-type create app/components/light-table/cells/light-table/total-error-count.js installing cell-type-test create tests/integration/components/light-table/cells/light-table/total-error-count-test.js
It appears no template is created when generating a new cell-type.
I'll manually create one, but I thought you should know since you referred to a HBS file in your comment.
On Thu, Apr 11, 2019 at 9:51 AM Mel Riffe [email protected] wrote:
Alex, completely understand about life kicking some butt. :-)
I will try to capture the error I'm receiving soonish.
Thank you for your patience.
On Fri, Mar 15, 2019 at 3:15 PM Alex Alvarez [email protected] wrote:
Sorry for the delay... life is kicking my butt right now. I understand you wanting an example and it being better, but I don't really have the time right now
I created a custom cell type, but it was empty, and I received an error trying to use it. I would welcome a simple sample implementation.
If you give me more details on the error I can help you work through it right now.
long story short is
{ // all the stuff for your column definition + cellType: 'name-of-my-cell' }
in templates/components/light-table/cells/name-of-my-cell.hbs
{{!-- I have access to all of these --}}{{column}} {{row}} {{rawValue}} {{table}} {{tableActions}}
https://github.com/offirgolan/ember-light-table/blob/master/addon/components/cells/base.js
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/offirgolan/ember-light-table/issues/54#issuecomment-473410267, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAIwffa0n2RchOR_yv-9kDiEcBg3-hvks5vW_FkgaJpZM4I0tzu .
Alex,
Even more feedback: I got it working and here's what I had to do:
- create app/components/light-table/cells/total-error-count/component.js
- create app/components/light-table/cells/total-error-count/template.hbs
Now to get it work with my app's requirements. :-D
On Thu, Apr 11, 2019 at 12:52 PM Mel Riffe [email protected] wrote:
Alex,
Here's a bit of feedback:
$ ember generate cell-type light-table/total-error-count --pod installing cell-type create app/components/light-table/cells/light-table/total-error-count.js installing cell-type-test create tests/integration/components/light-table/cells/light-table/total-error-count-test.js
It appears no template is created when generating a new cell-type.
I'll manually create one, but I thought you should know since you referred to a HBS file in your comment.
On Thu, Apr 11, 2019 at 9:51 AM Mel Riffe [email protected] wrote:
Alex, completely understand about life kicking some butt. :-)
I will try to capture the error I'm receiving soonish.
Thank you for your patience.
On Fri, Mar 15, 2019 at 3:15 PM Alex Alvarez [email protected] wrote:
Sorry for the delay... life is kicking my butt right now. I understand you wanting an example and it being better, but I don't really have the time right now
I created a custom cell type, but it was empty, and I received an error trying to use it. I would welcome a simple sample implementation.
If you give me more details on the error I can help you work through it right now.
long story short is
{ // all the stuff for your column definition + cellType: 'name-of-my-cell' }
in templates/components/light-table/cells/name-of-my-cell.hbs
{{!-- I have access to all of these --}}{{column}} {{row}} {{rawValue}} {{table}} {{tableActions}}
https://github.com/offirgolan/ember-light-table/blob/master/addon/components/cells/base.js
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/offirgolan/ember-light-table/issues/54#issuecomment-473410267, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAIwffa0n2RchOR_yv-9kDiEcBg3-hvks5vW_FkgaJpZM4I0tzu .