-
Notifications
You must be signed in to change notification settings - Fork 7
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
improve split panel #852
Comments
I prefer that we use this typical react pattern:
SGTM
SGTM, as also proposed above. Would use
Maybe explain exactly what is not working in the current implementation and create a separate issue for that. |
@hamed-musallam Do you plan to work on this? Seemed like a good idea in the first place. |
interactionKind
PropertyCurrent issue:
When a user interacts with the splitter (e.g., clicks the "..." button), the closed property no longer controls the panel's open/close state.
Proposed solution:
Introduce an optional property called
interactionKind
, which can take one of two values:1- forced: Ensures the panel behavior is fully controlled programmatically.
2- undefined: Allows default behavior without restrictions.
closed
property:Current issue:
The closed property is overloaded with two types of values:
Boolean: Directly controls whether the panel is open or closed.
String: Represents a size threshold for automatic closing.
Proposed solution:
The closed property should only accept a boolean value for controlling the open/close state.
Introduce a new property
closeThreshold
to handle automatic closure based on panel size.onClose
Callback:Current issue:
When using the size threshold for automatic closing, there’s no way to track whether the panel is currently closed.
Proposed solution:
Add an
onClose
callback function that triggers whenever the panel is closed, regardless of whether it was closed manually or automatically.The automatic closing feature should always be active, based on the
closeThreshold
. I think we need to differentiate between two scenarios:1- User Interaction: When the user changes the panel size using the "..." button.
2- Container Resizing: If the container size causes the panel to shrink below the threshold, it should automatically close.
feat: implement right-side panels bar cheminfo/nmrium#3318
The text was updated successfully, but these errors were encountered: