-
Notifications
You must be signed in to change notification settings - Fork 37
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
Bug when trying to use both 'href' and 'tooltip' #156
Conversation
@@ -1696,8 +1696,7 @@ var animint = function (to_select, json_file) { | |||
return d["clickSelects.variable"] + " " + d["clickSelects.value"]; | |||
}; | |||
} | |||
elements.text("") | |||
.append("svg:title") |
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.
What is elements.text("")
doing here? Removing it seems to solve the problem...
Edit: Got it. Need to think of some other approach. This won't do.
After this minor change, everything seems to work fine. Here is the example from #155 - Worldbank example But the wercker build is stuck for some reason. Maybe ignore it since the Travis build is passing? Edit: Found a bug in my approach. Will probably need to revert that. |
Thanks for working on this Faizan. Before starting to code various solutions, can you please add at least one test case that fails? |
Also please add a test case for the bug in your approach that you found. |
@tdhock Sorry about that. I found out about the bug just before I had to leave so I thought to put in a comment so that you people do not waste your time. So in the initial bug that we were trying to fix, Initially it works fine, but while interacting with the points, the code keeps appending Hence I currently remove Hopefully this explains the changes and tests that I made. Still the tooltip test gets stuck somewhere. I will see what is causing this. EDIT: Running tests with Firefox seems to work well locally. The tests get stuck at the same point with PhantomJS. I tried a lot of things including increasing Sleep time to 10 secs, but its not working. Even added a pause between each |
phantomjs has problems when there are several elements with the same ID -- is that the problem? |
@tdhock I don't think so. The HTML is quite straight-forward and there are no ID clashes. I specify the IDs to be clicked here. I tried to find out where the execution gets stuck, and I found out it gets stuck here, at the first getHTML() call. Should I write a different test if this doesn't work? |
try removing non-alphanumeric characters from the ids (or convert them to underscores). I have a feeling that |
@tdhock Great observation! Once I filtered out the non-alphanumeric chars, the tests pass locally using But the bad news is that they get stuck when running I separated the tests which are causing the problem. Probably ignore these for now? We could check this separately using firefox locally... |
Try renaming that test file to |
travis seems fine with the changes but looks like wercker is still stuck with the new tests. |
i restarted the wercker build so let's hope it magically fixes itself otherwise i would recommend double-checking the id's rendered on that page |
@tdhock Could you please restart again. It failed before starting the tests... |
looks like there are still problems. can you double-check everything on that page to make sure there are no duplicate id values, and no id values with non-alphanumeric characters? you may even want to try deleting |
@tdhock Looks like wecker build failed again without starting the tests.. I cut the region names to the first three letters. So these are the html id's we are working with now https://travis-ci.org/tdhock/animint/jobs/142332160#L2663 I will remove these once we complete the wercker build. Should I try and remove the rest of the underscores too? I would probably need to change the JS code, which may cause unexpected problems in the other tests. Also there are no conflicts whatsoever in the rendered HTML. The only point worth noting is that the But that should not be problem since there are no clashes. EDIT: We are now using Label IDs instead, but I don't know if that will work with wercker since the build failed before starting the tests again. |
@cpsievert can you please give @faizan-khan-iit permissions to restart your wercker build? faizan I don't understand why the wercker tests fail... can you try simplifying the test or using a different data set? also while we debug this, feel free to start working on something else in another branch... |
@cpsievert Thanks! @tdhock Looks like the new tests work well with wercker. As for the older tests, I have not deleted those yet, but removed them from the test suites. If you approve of this, I could update the NEWS and DESCRIPTION. A minor note: I had to install ggplot2 separately for wercker. Don't know why but it was not installing ggplot2 from our PR... |
+1 looks good to me, go ahead and increase the version in NEWS and DESCRIPTION, then you can merge with master |
This PR covers Animint issues #100 and #155