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

specify the minimum width for SplitPane #1570

Closed
hamed-musallam opened this issue Jun 7, 2022 · 5 comments · Fixed by #1580
Closed

specify the minimum width for SplitPane #1570

hamed-musallam opened this issue Jun 7, 2022 · 5 comments · Fixed by #1580
Assignees
Labels
enhancement New feature or request

Comments

@hamed-musallam
Copy link
Member

@lpatiny
What is the minimum width for SplitPane if there is no room for the panels to close the side panel?

@hamed-musallam hamed-musallam added the enhancement New feature or request label Jun 7, 2022
@hamed-musallam hamed-musallam self-assigned this Jun 7, 2022
@lpatiny
Copy link
Member

lpatiny commented Jun 7, 2022

Not sure I understand the question.

The component that displays the spectrum should be at least 600px and if it is smaller the panels should close.

@hamed-musallam
Copy link
Member Author

@lpatiny

in SplitPane we have to set a value to minimunWidth property to make it work, i mean close dynamically if the panel is less than the specified width, would you like to hardcoded the value or it could be changed by the component preferences

@lpatiny
Copy link
Member

lpatiny commented Jun 7, 2022

It is not the panel that should have a minimal size because it has a fixed size.

It is the space left for the spectrum that should have a minimum size of 600px

@hamed-musallam
Copy link
Member Author

@lpatiny

the initialSeparation and minimumSize depend on the sideSeparation in our case the end means the right panel will be closed if it is smaller than 600px, this is the behavior of the SplitPane component, i think we can enhance it by specifying which side to check for minimum width (minimumSizePaneCheck = "start"| "end")or be default take always the opposite of the sideSeparation (if sideSeparation == end takes the start panel and vice versa )

image

currently if we set minimumSize= 600px will closed the right panel because the initalSpearation is 560px

    <SplitPane
      initialSeparation={general?.initialPanelWidth || '560px'}
      orientation="horizontal"
      sideSeparation="end"
      initialClosed={general?.hidePanelOnLoad || false}
      minimumSize={600}
    >
      {children}
    </SplitPane>

@lpatiny
Copy link
Member

lpatiny commented Jun 7, 2022

It does not seems that have any application to check the minimumSize of the same size as the initialSeparation.

This is a bug in analysis-ui-component and the side that should have the minimumSize is the one that is not forced. @hamed-musallam please could you make a PR to fix this problem ?

zakodium-oss/react-science#151

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

Successfully merging a pull request may close this issue.

2 participants