ember-light-table icon indicating copy to clipboard operation
ember-light-table copied to clipboard

Improve Documentation

Open offirgolan opened this issue 8 years ago • 9 comments

  • [ ] 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 avatar Jun 13 '16 20:06 offirgolan

@offirgolan what sort of improvements are you thinking of? I could potentially help with this.

RobbieTheWagner avatar Jun 24 '16 13:06 RobbieTheWagner

@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 😺

offirgolan avatar Jun 24 '16 17:06 offirgolan

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 avatar Feb 26 '19 16:02 melriffe

@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 avatar Feb 27 '19 04:02 alexander-alvarez

@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.

melriffe avatar Feb 28 '19 02:02 melriffe

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

alexander-alvarez avatar Mar 15 '19 19:03 alexander-alvarez

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 .

melriffe avatar Apr 11 '19 13:04 melriffe

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 .

melriffe avatar Apr 11 '19 16:04 melriffe

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 .

melriffe avatar Apr 11 '19 17:04 melriffe