reactabular / treetabular

Tree utilities (MIT)
MIT License
11 stars 6 forks source link

Expand / collapse animations #1

Open pzmudzinski opened 7 years ago

pzmudzinski commented 7 years ago

I am wondering if there's any way to add animations when rows are toggled. Also great work with reactabular! Best grid library I've seen in React and tried many of them.

bebraw commented 7 years ago

Hi,

I am wondering if there's any way to add animations when rows are toggled.

That's a tough question. I wonder if CSS animation (literally toggling a class) would do the trick. That would be the neatest option I can think of. You can also look into solutions like react-motion.

I think the architecture should allow different directions. I haven't played with animation yet, though.

Also great work with reactabular! Best grid library I've seen in React and tried many of them.

Thanks. 👍

Can I use that as a testimonial at the readme?

pzmudzinski commented 7 years ago

Sure :-)

My suggestions:

  1. Explicitly say that treetabular allows to create expandable rows in a table. It wasn't clear for me that tree structure means the same in that context.
  2. I was wondering about opening PR for automatically fixing an issue when children isn't put right after a parent. Meaning that:
    [ objectA, objectB, objectC, objectA-children1, objectA-children2 ] 

    would be transformed to:

    [ objectA, objectA-children1, objectA-children2, objectB, objectC ]

    Any thoughts here?

  3. I've started using library that way I took simple example from main page and right after that I wanted to check if it supports expandable cells by checking this plugin. Example from readme in that repository assumes you know how sorting/filtering/other tweaks are working so I had to spend some time on removing them from example code first so I can actually play with expandable feature. I could open PR for minimalistic example if you want.
bebraw commented 7 years ago

Explicitly say that treetabular allows to create expandable rows in a table. It wasn't clear for me that tree structure means the same in that context.

Done.

I was wondering about opening PR for automatically fixing an issue when children isn't put right after a parent. Meaning that: ...

Maybe that could become a transformation to perform against the data? I know each extra step eats some performance so I guess over longer term it would be a good idea to do some kind of fusion (pipeline). But a function to perform what you want feels like a starting point.

  1. I've started using library that way I took simple example from main page and right after that I wanted to check if it supports expandable cells by checking this plugin. Example from readme in that repository assumes you know how sorting/filtering/other tweaks are working so I had to spend some time on removing them from example code first so I can actually play with expandable feature. I could open PR for minimalistic example if you want.

Yeah, that would be great.

There should be a simple example before the complex one with the features. It would be a good chance to hook up styleguidist and to generate a little standalone site. I have a minimal setup here to copy over.

pzmudzinski commented 7 years ago

@bebraw Opened PR for issue 2. Will look at minimalistic example later.