Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make radio and check buttons visible #7861

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
Jan 19, 2017
Merged

Conversation

naoyak
Copy link
Contributor

@naoyak naoyak commented Jan 17, 2017

Fixes #7860.

Add black edge color to radio and check buttons so they are visible.
img1
img2

Copy link
Contributor

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

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

The fix looks good. It would be good to add an image test to make sure this doesn't break in the future. If we had this before, 2.0 might not have broken it.

@dopplershift
Copy link
Contributor

Fixes #7860.

@naoyak
Copy link
Contributor Author

naoyak commented Jan 17, 2017

@dopplershift I haven't written an image comparison test before, but I guess it would mean:

  • Produce a simple plot example with check/radio buttons
  • Generate the plot PNGs locally and commit them
  • Add the image comparison test somewhere (say, test_widgets.py)

Does that sound about right?

@dopplershift
Copy link
Contributor

That's it exactly.

@naoyak
Copy link
Contributor Author

naoyak commented Jan 18, 2017

Thanks for the input, added an image comparison test.

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Jan 18, 2017
@QuLogic
Copy link
Member

QuLogic commented Jan 18, 2017

Since these are a) new tests and b) only broken on the new style, you will need to add style='default' to the image_comparison decorator or else you won't really be testing that the new style isn't broken.

Also, please amend the last commit so that we don't have an extra copy of the test images.

@naoyak
Copy link
Contributor Author

naoyak commented Jan 18, 2017

@QuLogic Ah, gotcha. Didn't realize the image_comparison decorator defaults to style='classic' - might be why it's failing.

@naoyak
Copy link
Contributor Author

naoyak commented Jan 18, 2017

btw, is there a way to display both sets of buttons (Radio and Check) and relocate them so they don't overlap?

@naoyak naoyak force-pushed the widget-edges branch 3 times, most recently from 81f7c50 to 508bd68 Compare January 18, 2017 05:22
@codecov-io
Copy link

codecov-io commented Jan 18, 2017

Current coverage is 62.16% (diff: 100%)

Merging #7861 into master will increase coverage by 0.04%

@@             master      #7861   diff @@
==========================================
  Files           174        174          
  Lines         56072      56072          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          34831      34859    +28   
+ Misses        21241      21213    -28   
  Partials          0          0          

Powered by Codecov. Last update 7c16415...dedcac3

@naoyak naoyak force-pushed the widget-edges branch 3 times, most recently from cbeb40d to 661e45d Compare January 18, 2017 06:27
@naoyak naoyak force-pushed the widget-edges branch 3 times, most recently from 531bf7e to 404ad92 Compare January 18, 2017 07:34
@naoyak
Copy link
Contributor Author

naoyak commented Jan 18, 2017

There is some general test flakiness (connectivity?) but it looks unrelated to this PR.

@jenshnielsen
Copy link
Member

I have restarted the relevant tests but yes they look like network issues. Failing to install nose from github and failing some url based tests

@naoyak naoyak changed the title Make radio and check buttons visible [MRG] Make radio and check buttons visible Jan 18, 2017
Copy link
Member

@NelleV NelleV left a comment

Choose a reason for hiding this comment

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

Thanks @naoyak !

@NelleV NelleV changed the title [MRG] Make radio and check buttons visible [MRG+1] Make radio and check buttons visible Jan 18, 2017
@QuLogic
Copy link
Member

QuLogic commented Jan 18, 2017

btw, is there a way to display both sets of buttons (Radio and Check) and relocate them so they don't overlap?

Do you mean on the same figure? Use different values for rax; the widgets are placed within that Axes.

Copy link
Contributor

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

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

Great. Thanks for adding the tests!

@naoyak
Copy link
Contributor Author

naoyak commented Jan 18, 2017

Thanks - actually can you hold off on merge for one sec? Seeing if I can combine the tests into 1 test instead of 2.

@naoyak
Copy link
Contributor Author

naoyak commented Jan 18, 2017

OK, I think this is good to merge now. Thanks!

@phobson phobson merged commit 4c5fca7 into matplotlib:master Jan 19, 2017
@phobson phobson changed the title [MRG+1] Make radio and check buttons visible Make radio and check buttons visible Jan 19, 2017
@naoyak naoyak deleted the widget-edges branch January 19, 2017 05:23
phobson added a commit that referenced this pull request Jan 19, 2017
Make radio and check buttons visible
@phobson
Copy link
Member

phobson commented Jan 19, 2017

Thanks @naoyak!

Backported to v2.0.x as 8beb59a

@QuLogic
Copy link
Member

QuLogic commented Jan 21, 2017

The backport of this seems to have broken CI somehow.

@QuLogic
Copy link
Member

QuLogic commented Jan 21, 2017

get_status was added to CheckButton in #6018 which is only in 2.1. If it's required for this patch, it might have to be reverted on v2.0.x.

@naoyak
Copy link
Contributor Author

naoyak commented Jan 21, 2017

@QuLogic the failing test is also from #6018. I'm not sure why only the test made it into v2.0.x.

@QuLogic
Copy link
Member

QuLogic commented Jan 21, 2017

Oh yes, you're right. Looks like it's just a merge error on backport then. Should be a bit easier to fix then.

QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Jan 21, 2017
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Jan 21, 2017
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.

8 participants