junsikshim / react-pane-system

A declarative, flexible pane layout system for React projects.
MIT License
6 stars 1 forks source link

Multiple auto width/height #14

Closed hchangjae closed 5 months ago

hchangjae commented 6 months ago

Shouldn't we allow multiple children to have 'auto' sizes?

Vscode exmpale

https://github.com/junsikshim/react-pane-system/assets/52942171/50c53aa6-4d8f-411e-99c2-e9dee58aec45

junsikshim commented 6 months ago

Having 'auto' size means it will expand when the browser expands.

When we have 4 columns,

| 300px | 200px | 400px | auto |
        ^A      ^B

It will look pretty similar like the video above.

However, I made a design choice that when I move the splitter A, only the enclosing panes(300px and 200px) will adjust. And, when I move the splitter B, only the 200px and 400px ones resize. VSCode seems to let other panes be affected by other splitters as well, but I'm not sure that's a good idea. What do you think?

hchangjae commented 5 months ago

However, I made a design choice that when I move the splitter A, only the enclosing panes(300px and 200px) will adjust. And, when I move the splitter B, only the 200px and 400px ones resize.

I think current implement is better.

hchangjae commented 5 months ago

I think I misunderstood the meaning of 'auto' size, so I'll this close the issue.