Join GitHub today
Add a bit of padding to Dropdown to make room for the arrow #2052
Right now, if the content goes to the edge of the dropdown, the arrow and the content are on top of each other:
from ipywidgets import * Dropdown(options=['very very very very very very very very very very very very very very long option', 'another option'])
referenced this issue
Apr 16, 2018
It's most likely not related to that commit because my comment is way after that commit removed the code. Perhaps it's the browser caching your code so it's not showing up? Can you open the browser developer tools and verify that your CSS is showing up on the page?
Ah, so glad I asked! Indeed my source code/CSS wasn't showing up, so I switched from jupyter lab to jupyter notebook and it worked. Makes sense in hindsight since I only have the developer release of the notebook and not the lab. I have some questions that might help others:
I started wondering why we needed the latest jupyter lab to do dev work on widgets:
But before asking, I wanted to check, and found another guide for developing ipywidgets which doesn't mention jupyter lab but seems to be a bit outdated:
Other than that, I'll submit a patch and look forward to any feedback!
It might not be strictly needed, but (a) it's a good idea to develop against the most recent software, and (b) it might be needed, depending on changes that might be only compatible with the latest release of jlab.
Regardless, it's possible your dev setup for lab wasn't giving you what you thought it was giving you.
Thanks for the PR!