-
-
Notifications
You must be signed in to change notification settings - Fork 112
subplots panel initial #610
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
Conversation
Dude this is sweet! |
:) |
0ff1eb6
to
3b728af
Compare
So cool! non-cartesian appears broken, and dragging is broken in snap mode, but so cool! |
653ff58
to
40c5e1a
Compare
In |
src/components/fields/derived.js
Outdated
plotProps.fullContainer._subplot && | ||
plotProps.fullContainer._subplot.includes('xaxis') | ||
) { | ||
if (props.attr.startsWith('x')) { |
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 seems a little fragile, is there a way to make it more precise?
what if there's other axes related attributes that start with x or y..
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.
good call, i'll make it more precise
but generally, this guys get attr supplied to them
src/DefaultEditor.js
Outdated
import { | ||
GraphCreatePanel, | ||
GraphTransformsPanel, | ||
StyleSubplotsPanel, |
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.
rename?
<ColorPicker label={_('Font Color')} attr="titlefont.color" /> | ||
</AxesFold> | ||
|
||
<AxesFold |
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! goodbye Layout
Panel! You won't be missed :)
041aeec
to
90abf62
Compare
"react-resizable-rotatable-draggable": "^0.1.8", | ||
"react-select": "^1.2.0", | ||
"react-tabs": "^2.2.1", | ||
"styled-components": "^3.3.3", |
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.
are we actually using 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.
it's a peer dep of the draggy thing.
)) | ||
); | ||
|
||
Object.keys(layout).forEach(layoutKey => { |
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.
I found it confusing here as to why we were looping through layout, not fullLayout.
And why we were using data.findIndex instead of maybe filter to find all indexes that could meet the condition.
If you could maybe comment above on those 2 questions, I think it may help in a few months time, when revisiting that code.
key={i} | ||
className="rect-grid" | ||
style={{ | ||
width: fieldWidthPx / gridRes - 1, |
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.
could we move this to a style sheet for the ones we can?
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.
not really, if you see the math we're doing here, it doesn't really map well onto a stylesheet
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.
I suppose we could create classes for the various grid-box-types but there are 9 of them (4 corners, 4 faces, inside) which would be messier than just building them up from stratch like this IMO. Although with faaaancy CSS3 selectors you might be able to do it ;)
awesome job guys !! 👍 |
💃 |
Subplots panel - in dev
Known issues / TODO:
addresses #580