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

Feature request! Freezing columns / rows #145

Open
Mastermindzh opened this issue Jul 21, 2017 · 11 comments
Open

Feature request! Freezing columns / rows #145

Mastermindzh opened this issue Jul 21, 2017 · 11 comments

Comments

@Mastermindzh
Copy link

It would be awesome if you implemented a way for us to easily specify how many cells / rows to freeze.

For example

<tree-grid
freeze-rows = "1"
freeze-columns = "2"

If you don't want to support multiple frozen cells / rows you could always use booleans for the attributes.

@torsten-sauer
Copy link

What should that freeze actually do?

@Mastermindzh
Copy link
Author

A column or row freeze is a very common thing on a table. It basically means that the column or row won't scroll with the rest of the table. This essentially enables you to see the row/column at all times.

Take a look at: https://www.gcflearnfree.org/excel2013/freezing-panes-and-view-options/1/, especially the last figure is very clear as to what column/row freezing does.

@torsten-sauer
Copy link

Yeah, I know what it does with a table - but I don't see any usecase for a tree.

@Mastermindzh
Copy link
Author

Mastermindzh commented Jul 21, 2017

Imagine a tree with lots of columns, you would have to start scrolling horizontally to see the last few columns, it would be really handy if the first column would be sticky so you could see where in the tree you're at exactly.

Now imagine a HUGE tree, scrolling down the tree would cause the first row to disappear.

update: hang on, I'll upload a vid of my particular use case.

@torsten-sauer
Copy link

What's about expanding your big wide tree?
If you expand to level 4 or 5 for example, than the first column of this level is more in line with maybe the second or third column of level 1 - depending on the width of the content of each column.

But nevertheless I think you could solve this on your own, because you only need to define a complete new template for the tree and apply appropiate styling to it. No need to change the directive I think.

Side note:
Don't get me wrong, but I think that you maybe misuse a tree if you should better use a table/grid if you need row/column freezing ;-)

@Mastermindzh
Copy link
Author

You do realise the directive itself is called "tree-grid-directive" and the description states:

A grid to display data in tree structure by using Angular and Bootstrap.

So I don't think using this directive to display a "tree-grid" could be consider out-of-scope, like, at all.

Anyways, here's the video which shows the problem.

But nevertheless I think you could solve this on your own, because you only need to define a complete new template for the tree and apply appropiate styling to it. No need to change the directive I think.

Perhaps I could, but I imagine a feature such as this would be handy to include into the directive itself. Especially if you consider the alternative solutions out there (many of which feature similar freeze options, none of wich are as nice to work with as tree-grid-directive).

@torsten-sauer
Copy link

Feel free to contribute and make a PR than, if you think there are many people with tree structures and more than a dozen columns and need this.

@Mastermindzh
Copy link
Author

Dear @torsten-sauer,
I've tried my hardest to remain friendly and professional in my replies but I can't keep doing that. Especially since your replies are of very little value to the discussion at hand. Thank you for your replies and I wish you the best. If you do decide to reply again, however, I highly suggest you do so in a more constructive way. If not I'll be forced to ignore it.

Furthermore, I get the feeling that the word "issue" connotes negativity and wrongdoing in your mind. This is, however, not the case. Github has given us very few tools to suggest new features so frequent users, usually, agree that a suggestion should be done in form of an issue.

ps: I only use this component for work and I can't spend work hours on creating a pull-request for a feature such as this at the moment. Furthermore, I'm currently pre-occupied with other projects in my spare time so I don't have time to create a PR then either.

@torsten-sauer
Copy link

Dear @Mastermindzh,

you opened an issue with a feature request - yeah, that's the way github works. So I tried to question if this is a useful addition to this project. I even suggested, that you can solve this with a special template and styling for your use case.
But you insisted that this would be helpful for others and should be integrated. So I proposed that you make a PR and integrate it. But seems like you don't like this either.

Now I get the feeling what your real intend is: You try to find someone who does your job, don't you? Or what do you mean with:

I only use this component for work and I can't spend work hours on creating a pull-request for a feature such as this at the moment.

Does this mean you need this feature for your job, but you don't have the time to build this?

Maybe you can shed some light on this, so someone who think your feature request is viable can pick it up and integrate this for you?

@Mastermindzh
Copy link
Author

I will ignore all the rambling, and your lack of understanding Github as a platform, and get straight to the point as I'm really getting tired of talking to you now. And even though I don't owe you an explanation I feel that shedding some light on the situation might help you in the future if you ever end up working as a developer.

I only use this component for work and I can't spend work hours on creating a pull-request for a feature such as this at the moment.

This means that if I fix it during work hours, which is what I did, I can't share the code. Furthermore, it indicates that I can't justify working on creating a good PR (with a detailed explanation, documentation and unit tests) either.

So again, either reply with a constructive answer or let the developer of the product or others that use this directive judge the issue. Thanks in advance.

@torsten-sauer
Copy link

torsten-sauer commented Jul 21, 2017

if you ever end up working as a developer.

Doing so since 2007.

So again, either reply with a constructive answer

You can use a changed template with additional appropiate styling to fix the first N rows / M columns. The basic idea could be to provide fixed containers for the frozen rows / columns and scrollable ones for the rest.

Thanks in advance.

You're welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants