DimitarChristoff / slickgrid-es6

SlickGrid fork rewrites for ES6 for use under npm and Babel / Rollup builds
https://dimitarchristoff.github.io/slickgrid-es6/
101 stars 42 forks source link

merge frozen row/col features back to main grid? #7

Open antonycourtney opened 7 years ago

antonycourtney commented 7 years ago

I am using slickgrid-es6 for a new project; working great so far -- many thanks for the work to modernize and package this up!

For my specific project, I'd really like to freeze the first column. After reading through docs / examples I attempted to simply change new Slick.Grid(...) to new Slick.FrozenGrid(...) in my code. The code ran without exceptions, but the grid was no longer rendered. A bit of digging suggested this is because I am using grid.resizeCanvas(). It looks like FrozenGrid is based on a fork of an older version of SlickGrid that didn't support canvas resizing in the same way...

Before I invest too much time into adapting to this older grid style, two quick questions:

  1. Is it known / documented anywhere at what point FrozenGrid / X-SlickGrid forked from SlickGrid and what features will be missing? I'm a bit concerned that better resizing won't be the only missing feature / bug fix if I use FrozenGrid instead of Grid...
  2. Any plan / hope / interest in merging the frozen row / columns features back in to the main Slick.Grid? The repository for X-Slickgrid credits JLynch's earlier fork for this feature, so maybe this could be merged in independently of the rest of X-SlickGrid?

I am potentially up for helping with this if there's interest and depending on what's involved.

Thanks

DimitarChristoff commented 7 years ago

I did look at that, but it's too diverged. As you point out, some difficulties etc.

I am going to be working on the grid all of next week in the hope of making it more stable and trimming the build but may look at the use case.

In so far as trying to suport both 6pac and frozen and being able to switch, at some point I will have to pick one over the other - in my experimentation and use, frozen seemed to work fine and to my knowledge, only has one big issue: reordering columns when using frozen columns breaks due to my implementation of column reorder not being aware of the frozen canvas. this is actually going to need some fixing... Will keep you posted but if you want to show me a grid config or something that does not work with frozen grid, i can certainly have a go.

antonycourtney commented 7 years ago

Thanks for getting back to me. All makes sense. I will try to create a minimal example that demonstrates the issues I had when I tried to switch to FrozenGrid.

antonycourtney commented 7 years ago

I spent some time trying to create a minimal example to demonstrate differences in behavior I observed between 6pac and frozen. It took some work to isolate, but it seems the grids behave differently in the presence of box-sizing: border-box. I've created a repo with screenshots of the difference in resize behavior and runnable isolated example here: https://github.com/antonycourtney/FrozenGridTest.

Hope that's helpful. I'm super appreciative of the work to maintain this, so please let me know if there is anything I can do to help with your work on this next week. Thanks!

antonycourtney commented 7 years ago

A bit of Google'ing turned up a relevant issue in the original slickgrid repo, including some comments from 6pac and a link to a blog post on the issue. Perhaps the solutions employed there could be applied to frozen?