-
-
Notifications
You must be signed in to change notification settings - Fork 112
Transforms #437
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
Transforms #437
Conversation
@@ -59,7 +59,7 @@ class Section extends Component { | |||
} | |||
return ( | |||
<div className="section"> | |||
<SectionHeader name={this.props.name} /> | |||
{this.props.name && <SectionHeader name={this.props.name} />} |
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 turns Section into a slim container if no name is provided.
icon={icon} | ||
label={addAction.label} | ||
/>{' '} | ||
/> |
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 allows for dropdowns on +... needs better styling!
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.
Can you make an issue for this with a screenshot so @aulneau can apply his magic?
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.
yes once merged
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.
) | ||
const mockName = this.state.mocks[mockIndex]; | ||
const prefix = | ||
mockName[0] === '/' |
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 allows us to add local mocks on top of the remote ones.
'jagged ints': [2, 1, 3, 5, 4], // eslint-disable-line no-magic-numbers | ||
ints: [1, 2, 3, 4, 5, 6], // eslint-disable-line no-magic-numbers | ||
'jagged ints': [2, 1, 3, 5, 4, 6], // eslint-disable-line no-magic-numbers | ||
'toggle ints': [1, -1, 1, -1, 1, -1], // eslint-disable-line no-magic-numbers |
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.
helpful for aggregations and splits
@@ -4,9 +4,10 @@ import classnames from 'classnames'; | |||
|
|||
export default class ModalBox extends Component { | |||
render() { | |||
const {backgroundDark, children, onClose} = this.props; | |||
const {backgroundDark, children, onClose, relative} = this.props; |
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.
hack for PanelHeader modal styling
} else { | ||
this.fullValue = this.props.fullValue; | ||
} | ||
this.srcAttr = props.attr + 'src'; |
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.
@bpostlethwaite please think on this part of the change... I'm not sure why the if
was there before but I need to be able to write to srcAttr
:)
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.
Sorry @nicolaskruchten I can't remember for the life of me. It could have been necessary in some permutation of DataSelector but become unnecessary at some point.
We'll probably figure out why in a couple weeks...
} | ||
|
||
return aggregations.map(({target}, i) => ( | ||
<AggregationSection show key={i} aggregationIndex={i}> |
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.
NB this is a 'slim section' because it has no header!
@@ -31,7 +31,7 @@ export default function connectTraceToPlot(WrappedComponent) { | |||
|
|||
let fullTrace = {}; | |||
for (let i = 0; i < fullData.length; i++) { | |||
if (trace.uid === fullData[i]._fullInput.uid) { | |||
if (trace.uid === fullData[i]._fullInput._input.uid) { |
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.
NB this allows us to get at the real input even if _fullInput
doesn't have the same uid
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.
should we put a comment in the code for that..?
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.
@etpinard any issues you many be aware of with this type of check?
src/EditorControls.js
Outdated
if (isNumeric(payload.transformIndex)) { | ||
for (let i = 0; i < graphDiv.data.length; i++) { | ||
if ((graphDiv.data[i].uid === payload.traceUid) !== -1) { | ||
graphDiv.data[i].transforms.splice(payload.transformIndex, 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.
!== -1
....
I don't get 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.
whoops, nice catch, that's me refactoring badly
{label: _('Min'), value: 'min'}, | ||
{label: _('Max'), value: 'max'}, | ||
{label: _('First'), value: 'first'}, | ||
{label: _('Last'), value: 'last'}, |
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.
worth mapping over Plotly transform attributes so it is always in sync? Not a big deal I don't forsee them being updated often.
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.
That's not compatible with localization...
ok, well, so this doesn't stale, I vote that we can merge it in as its in Dev panels, and continue building on this feature to finish it off, @bpostlethwaite ? |
Yep looks great! 💃 |
This PR roughs in the Aggregations UI but leaves the Panel in the Dev section of the app, as there are some issues in
Plotly.react
that will need to be resolved before it's usable. Partial fix for #306