-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
First attempt at a click anywhere #5416
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
@nicolaskruchten Any idea why the following happens when running python setup.py updateplotlyjsdev --devbranch pull/5416
ERROR in ./node_modules/plotly.js/dist/plotly.js
Module build failed: SyntaxError: Unexpected character '�' (5879:32)
It looks like the build artifact has a weird encoding? (I am on Windows 10)
Build: https://app.circleci.com/pipelines/github/plotly/plotly.js/2698/workflows/3daf50ac-fa3d-4b15-a0c5-838e0c413153/jobs/100591/artifacts
Build artifact: https://circle-production-customer-artifacts.s3.amazonaws.com/picard/forks/563cd04efc59890b023f9049/294228550/6002d8598642f6317705773f-0-build/artifacts/dist/plotly.js?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210116T124221Z&X-Amz-SignedHeaders=host&X-Amz-Expires=60&X-Amz-Credential=AKIAJR3Q6CR467H7Z55A%2F20210116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=d6b6df51575fa6c84b2108412c10d5770aae5f369dc0c161de3e9bff3ce17e21
And when running npm run test-jasmine -- test\jasmine\tests\click_test.js --FF --nowatch
in the plotly.js
repo 18 tests fail if I select the latest commit (without my changes).
Also, is there a good place to add a demo?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="../plotly.js/dist/plotly.js"></script> </head> <body> <div id="tester" style="width:600px;height:250px;"></div> <script> var TESTER = document.getElementById('tester'); Plotly.newPlot(TESTER, [{ x: [1, 2, 3, 4], y: [4, 1, 3, 5], mode: "lines+markers", marker: {size: 12}, }], { margin: { t: 0 }, clickmode: "event+anywhere" }); TESTER.on('plotly_click', function(clickData) { var x = clickData["points"][0]["x"]; Plotly.relayout(TESTER, { shapes: [ { type: "line", x0: x, y0: 0, x1: x, y1: 1, yref: "paper", line: {color: "RoyalBlue", width:3}, } ] }); }); </script> </body> </html>
@nicolaskruchten Any idea why the following happens when running
python setup.py updateplotlyjsdev --devbranch pull/5416
ERROR in ./node_modules/plotly.js/dist/plotly.js Module build failed: SyntaxError: Unexpected character '�' (5879:32)
It looks like the build artifact has a weird encoding? (I am on Windows 10)
Similar to #5382
Possibly would be fixed by d3-geo cc: #5112
I unfortunately messed up the repository and had to recreate my PR.
Thanks for the new PR.
In order to be able to sync the master branch of your fork with upstream master, next time I suggest you open PRs from another branch on your fork (not the master).
src/components/fx/click.js
Outdated
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.
Please add a new line to the end of this file.
To catch syntax errors you could run
npm run test-syntax && npm run lint
And when running
npm run test-jasmine -- test\jasmine\tests\click_test.js --FF --nowatch
in theplotly.js
repo 18 tests fail if I select the latest commit (without my changes).
Thanks for running them locally.
Some tests are not stable and fail locally; but they all passed on the CI.
I unfortunately messed up the repository and had to recreate my PR.
Thanks for the new PR.
In order to be able to sync the master branch of your fork with upstream master, next time I suggest you open PRs from another branch on your fork (not the master).
Thanks for pointing that out. I have been in a hurry and must have missed that... again. Should I open another new PR to be able to stay in sync with the plotly:master? I guess I've to wait for your geo fix to pass to be able to run python setup.py updateplotlyjsdev
The bundles are fixed on master after #5426.
So you don't have to wait for the geo PR.
Moved code to a new branch on my end to keep up with changes in master: PR is now at #5443
c259002
to
8d7db15
Compare
I unfortunately messed up the repository and had to recreate my PR.
This is a reference to #5138