-
-
Notifications
You must be signed in to change notification settings - Fork 112
Menupanel does not trigger section visibility by default #99
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
Menupanel does not trigger section visibility by default #99
Conversation
} else { | ||
plotProps = {isVisible: true}; | ||
// custom UI currently forces section visibility. | ||
newProps = {key: i, 'data-section-child-visible': true}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a use case in mind for this right now? I'm trying to figure out whether it seems more like <Info>
or more like an attr
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example if you want to add a business logic component that isn't tied to the editor. A data importer component or a component that adds buttons and range sliders but doesn't have an attr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add your own stuff to a Section the section will be visible. At that point it's up to the developer to add their own visibility handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I guess the last resort clause should be to make it visible. So I guess in the most generic case you'd add plotProps
with isVisible
for your own custom handling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep that is exactly what CanvasSize and AxesRange and friends use by defining a modifyPlotProps
function that overrides plotProps.isVisible
💃 I like it. |
closes #58
@alexcjohnson this PR addressed earlier conversations linked in #58 we had about
<Section>
visibility. Now neither<Info>
or<MenuPanel>
trigger automatic<Section>
visibility but will be hidden along with the<Section>
if noattr
components are defined.