-
-
Notifications
You must be signed in to change notification settings - Fork 112
Empty panels #692
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
Empty panels #692
Conversation
Behaviour looks good! checking code now. Two mods:
|
heading: _("Looks like there aren't any traces defined yet."), | ||
message: _("Go to the 'Create' tab to define traces."), | ||
}; | ||
if (!this.props.visible || !showPanel) { |
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.
Nice refactoring! Please do one more pass here though... you can get rid of showPanel
I think, and inline the "Looks like there aren't any traces defined yet" heading and so on :)
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.
yeah, that was a bit uncooked
TraceRequiredPanel.propTypes = { | ||
children: PropTypes.node, | ||
visible: PropTypes.bool, | ||
extraConditions: PropTypes.array, |
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.
ah nice.
{content ? content : null} | ||
</TraceRequiredPanel> | ||
); | ||
return <TraceRequiredPanel>{content ? content : null}</TraceRequiredPanel>; |
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.
Hmm ok once we tackle #562 this can just be a Panel :)
} from '../components'; | ||
|
||
class StyleAxesPanel extends Component { | ||
constructor(props, context) { |
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.
very nice
return this.context.fullData.some( | ||
d => | ||
(d.marker && d.marker.showscale !== undefined) || // eslint-disable-line no-undefined | ||
d.showscale !== undefined // eslint-disable-line no-undefined |
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.
This is good. I know the panel still appears even when all traces are in constant-color mode, but that's ok. at least this panel never appears when there's nothing you can do in it :)
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.
once you saw that panel appear, you don't wanna loose it again right? :)
I'm loving this |
💃 nice one! |
closes #688
closes #689