Add placeholder attribute to text widgets #5652

Merged
merged 6 commits into from Apr 18, 2014

Projects

None yet

3 participants

@jhamrick
Contributor

This fixes #5642

Should I try to write a test for this? Can someone point me to a resource on writing tests for javascript?

@jhamrick
Contributor

Updated this to work with text areas as well. I also updated the Widget Basics example notebook -- is this the appropriate place to mention placeholders, or should I move the example somewhere else?

@jdfreder
Member

Looks good to me. 👍

The HTML tests for the string widgets are in ipython/IPython/html/tests/widgets/widget_string.js and all of the utility functions (and base class) can be found in ipython/IPython/html/tests/util.js. Programming tests for the JS stuff is a little wonky because you have to deal with two execution contexts. I think @ivanov wrote a nice excerpt about this here.

I also updated the Widget Basics example notebook -- is this the appropriate place to mention placeholders, or should I move the example somewhere else?

Sounds good.

@jhamrick
Contributor

Cool, thanks, I'll look into writing a test then.

@jhamrick
Contributor

Ok, wrote a javascript test for checking whether the placeholder is properly set.

@jdfreder jdfreder added this to the 3.0 milestone Apr 17, 2014
@jdfreder
Member

Awesome, looks great! I'll pull it and test locally. Once Travis accepts it, I'll merge if no one objects.

@minrk
Member
minrk commented Apr 18, 2014

Looks good to me, go ahead and merge @jdfreder.

@jdfreder jdfreder merged commit 04f4cf1 into ipython:master Apr 18, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@jdfreder
Member

Thanks @jhamrick

@jhamrick jhamrick deleted the jhamrick:placeholder branch Apr 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment