Repository: napari/napari

Issue:
Change name of clims
From @jni in #172

> Side note, clims needs a name change

Can you elaborate here / do you have ideas on what name should be?
Expand button
# Description
This PR resolves #321 by adding a button to explicitly expand the layer properties. As requested by @jni it preserves the option to doubleclick elsewhere inside the the layer properties to toggle the expansion.

Right now the PR is still in progress as I need help from our style and icon guru @freeman-lab to improve the icon. I have a "sandwhich bar" in there right now but I think I might switch to up / down triangles. Open to other suggestions too if people have them.

![image](https://user-images.githubusercontent.com/6531703/59044000-214dcd00-8832-11e9-9590-dbf48d965705.png)

## Type of change
<!-- Please delete options that are not relevant. -->
- [ ] New feature (non-breaking change which adds functionality)

# How has this been tested?
<!-- Please describe the tests that you ran to verify your changes. -->
- [x] run examples and toggle button

## Final checklist:
- [x] My PR is the minimum possible work for the desired functionality
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] I have added tests that prove my fix is effective or that my feature works



Discussion:
clim means literally nothing to someone not already familiar with the terminology and/or our software.

Not sure what the best option is, but something along the lines of `brightness_range` or `displayed_data_range`.
Agreed we should have a more intuitive name. `look_up_table_range` is something some communities might understand, but maybe is a little jargony. How about `display_range`?
Looking into this more - the same functionality in matplotlib is called `clim` - see [here](https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.clim.html#matplotlib.pyplot.clim) which makes me lean towards keeping. If we are going to change though, I'd like to do it now so that things on the repo can be more stable as we move forward. Thoughts @jni @royerloic?  
I think #310 is more urgent, but anyway. =P

matplotlib itself has a lot of historical baggage, so in terms of API it's not necessarily the best model to move forward with. It's unclear that they would keep it if they were starting anew.

Currently I'm thinking that the middle road is the best one: use `clim` but being more explicit: `contrast_limits`.
I think explicit is better, I thought that clim meant 'color-limits' and I thought it was bad.
'contrast-limits' is a bit better, but technically it is wrong, since both brightness (offset) and contrast(slope) are affected by changing any of the two clim values...  So unless we find 
something better than 'contrast-limits' that's fine. Any ideas?
"saturation_range", "saturation_limits", "saturation_points"? But I think "contrast_limits" is clear enough, despite your reservations...
I'm think `contrast_limits` is fine, agreed it's not strictly correct, but it is clear enough not to be confusing for most people (beginners in particular, whom might have heard of `clim` before in matplotlib and can recognize the similarity)
I've updated the style of the icon based on a design from @freeman-lab. See below in the gif. This PR is now ready for review.

![expand_button](https://user-images.githubusercontent.com/6531703/59059699-74387c00-8854-11e9-9d5c-638ef983e3de.gif)

Hello @sofroniewn! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:







There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2019-06-07 02:55:49 UTC
Line length issue with black has been fixed by replacing `max-line-length` with `line-length` in the `pyproject.toml` and the python 3.7 compatibility mentioned in #328 by using `python3` in our `pre-commit-config.yaml`. This is already to go and I will merge once the tests pass

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -102,6 +102,7 @@
     "secondary_sidebar_items": ["page-toc"],
     "pygment_light_style": "napari",
     "pygment_dark_style": "napari",
+    "announcement": "https://napari.org/dev/_static/announcement.html",
 }
 
 # Add any paths that contain custom static files (such as style sheets) here,


Test patch: