Skip to content

Move group and filter transforms to main #536

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

Merged
merged 2 commits into from
Jul 4, 2018
Merged

Conversation

dmt0
Copy link
Contributor

@dmt0 dmt0 commented Jun 29, 2018

Closes #444

@dmt0 dmt0 requested a review from nicolaskruchten June 29, 2018 20:05
@dmt0 dmt0 self-assigned this Jun 29, 2018
if (['scatter', 'bar', 'scattergl'].indexOf(fullContainer.type) === -1) {
const transformableCharts = ['scatter', 'bar', 'scattergl'];

if (transformableCharts.indexOf(fullContainer.type) === -1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can use includes here

const transformBy =
container.transforms &&
container.transforms.map(tr => {
let retValue = '';
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be const with a ternary operator

Copy link
Contributor Author

@dmt0 dmt0 Jun 29, 2018

Choose a reason for hiding this comment

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

retValue? I don't see how - it can have 3 values, including ''

  • if groupsrc
  • if targetsrc
  • if neither

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

Copy link
Contributor

Choose a reason for hiding this comment

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

what is retValue, returnValue?
would you mind giving it a name that says more what it's used for,
I guess this one's for the label, so columnLabel?

@dmt0 dmt0 force-pushed the move-transforms-to=main branch 2 times, most recently from 852b11d to e4b328c Compare June 29, 2018 21:43
@dmt0
Copy link
Contributor Author

dmt0 commented Jun 29, 2018

I see some things are not displaying in the transforms panel. I blame Percy configuration at this point. Percy snapshot also prints a bunch of stuff into the console, such as:
plotly-basic.js:36143 WARN: Unrecognized transform type aggregate etc. for other transform types...
Things work OK when I run RCE locally.

Tried adding data sources to Percy test fixture - doesn't solve it.

@nicolaskruchten
Copy link
Contributor

nicolaskruchten commented Jun 29, 2018 via email

@dmt0
Copy link
Contributor Author

dmt0 commented Jun 29, 2018

Interesting indeed. When I use plotly or plotly-with-meta, I get
TypeError: window.URL.createObjectURL is not a function
Perhaps plotly-basic is the only one that doesn't assume that there's a browser window?

@nicolaskruchten
Copy link
Contributor

Perhaps. Worth talking to the plotly.js guys about approaches to testing. Perhaps there are or could be private methods that would allow us to populate _full* without depending on browser-provided infrastructure quite so much, or perhaps they already have shim code for testing.

@nicolaskruchten
Copy link
Contributor

nicolaskruchten commented Jul 1, 2018 via email

@VeraZab
Copy link
Contributor

VeraZab commented Jul 4, 2018

For the new traces tests you added (histogram, histogram2d, ..), would you mind adding them with data (x or y values).

There's more widgets that appear sometimes when the trace is drawn.

In this case, I would have just liked seing the default trace orientation be selected.

@dmt0
Copy link
Contributor Author

dmt0 commented Jul 4, 2018

@VeraZab is data missing? what do you mean?

@dmt0 dmt0 force-pushed the move-transforms-to=main branch 2 times, most recently from 74e9c3d to c49dfa7 Compare July 4, 2018 14:54
@dmt0 dmt0 force-pushed the move-transforms-to=main branch from c49dfa7 to 97ea7b4 Compare July 4, 2018 15:05
@VeraZab
Copy link
Contributor

VeraZab commented Jul 4, 2018

💃

@dmt0 dmt0 merged commit 53fb42e into master Jul 4, 2018
@dmt0 dmt0 deleted the move-transforms-to=main branch July 4, 2018 15:30
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