Badget
Badget copied to clipboard
Improvement: Centralized Default Position for Handle Panel:
Title
Currently, the right handle panel is locked to the right side. The default position should be centered.
Improvement Description
The panel should be split, something like this picture on default.
Proposed Solution
We need to look at the documentation code to see what we can find. I think the picture down should guide is in the right direction.
Additional Context
Under you is screenshot from Shadcn and our project
Shadcn:
Our application:
Under you can see the diffrence from Shadcn code and our. Im getting a error message for this:
Was this what we where talking about @JamesSingleton 👀
@meglerhagen yea, the error you're getting on the onCollapse
is because this project is using the 1.x of the react resizable library whereas ShadCN expects you to use 0.55. But someone closed the original issue: https://github.com/meglerhagen/projectx/issues/24
But also the direct middle is going to be different for every screen size, so it might be better to just determine how wide you want them. https://github.com/bvaughn/react-resizable-panels/blob/main/packages/react-resizable-panels/README.md#panel
Also, it looks like there is a defaultSizePercentage
prop that can be passed to the panel according to the docs.
I have tried, and tried @JamesSingleton . Maybe im dumb, but cant get this to work 🍅
I would like to work on this
Go insane @miralsuthar ✨ 😄
Hey @meglerhagen,
Just a doubt, like on what basis this deafaultLayout
are given for the default size of Resizable panels ?
I saw the documentation and there it says that value should be between 1 - 100
.
The values is from a project that was before, i think this is changed. You can just experiment and see if it works. Thats my main concern right now. Thanks for the comment.