Skip to content

Conversation

@VeraZab
Copy link
Contributor

@VeraZab VeraZab commented Jun 18, 2018

No description provided.

if (this.props.beforeAddTrace) {
this.props.beforeAddTrace(payload);
}
graphDiv.data.push({type: 'scatter', mode: 'markers'});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the reasoning for this change?

Copy link
Contributor Author

@VeraZab VeraZab Jun 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a fit is a new trace in the data array, so I need to be able to have the new trace be something other than 'scatter', to do something like:

const addAction = {
          label: _('Fit'),
          handler: (context) => {
              const value = {
                  transforms: [{
                      inputUid,
                      type: 'fit',
                      fitfunction: 'm*x + b'
                  }]
              };

              if (context.onUpdate) {
                  context.onUpdate({
                      type: EDITOR_ACTIONS.ADD_TRACE,
                      payload: value
                  });
              }
          },
      };

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're actually not using this, let's revert it :)

@nicolaskruchten
Copy link
Contributor

💃

@VeraZab VeraZab force-pushed the fit-transform-adjustments branch 8 times, most recently from b150881 to 29e768f Compare June 22, 2018 20:41
@VeraZab VeraZab force-pushed the fit-transform-adjustments branch 3 times, most recently from d15b9d6 to ab0c24a Compare June 27, 2018 15:07
@VeraZab
Copy link
Contributor Author

VeraZab commented Jun 27, 2018

ok @nicolaskruchten this is ready for another review

.numeric-input__wrapper {
line-height: 20px;
max-width: 100%;
width: 100%;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this causes some visual diffs in Percy that don't seem awesome...

@nicolaskruchten
Copy link
Contributor

You'll have to walk me through some of these changes :)

render() {
const {data = [], localize: _} = this.context;
const {canAdd, canGroup, children, messageIfEmptyFold} = this.props;
const {canAdd, canGroup, children, messageIfEmptyFold, panel} = this.props;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend changing panel to excludeFits or something as a boolean, just to match canAdd and canGroup

@VeraZab VeraZab force-pushed the fit-transform-adjustments branch 3 times, most recently from ee5d420 to 1a70a03 Compare June 29, 2018 15:34
@VeraZab VeraZab force-pushed the fit-transform-adjustments branch from 1a70a03 to d860655 Compare June 29, 2018 15:47
@VeraZab VeraZab merged commit 33e2f7a into master Jun 29, 2018
@VeraZab VeraZab deleted the fit-transform-adjustments branch June 29, 2018 15:51
@VeraZab VeraZab restored the fit-transform-adjustments branch June 29, 2018 19:39
@nicolaskruchten nicolaskruchten deleted the fit-transform-adjustments branch July 5, 2018 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants