Skip to content
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

Tabs re-ordering hides internal widgets #1467

Open
DiegoF90 opened this issue May 2, 2024 · 3 comments
Open

Tabs re-ordering hides internal widgets #1467

DiegoF90 opened this issue May 2, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@DiegoF90
Copy link

DiegoF90 commented May 2, 2024

Description

When re ordering the children of a Tab widget (i.e. the tabs) any internal ipywidget is hidden. This behaviour does not happen in e.g. Jupyter Notebook.

Reproduce

The following is a minimal reproducible example:

from ipywidgets import Label, Output, Tab, Button
o1 = Output()
with o1:
    display(Label("1"))
o2 = Output()
with o2:
    display(Label("2"))
tabs = Tab(children=[o1, o2])
display(tabs)
btn = Button(description='switch')
def switch(_):
    tabs.children = [o2, o1]
btn.on_click(switch)
display(btn)

When clicking on button "switch" it can be seen that the Label "1" and "2" both disappear. This does not happen when doing the same in Jupyter Notebook.

Expected behavior

Labels should not disappear.

Context

  • voila version: 0.4.0
  • Operating System: Windows
  • Browser: Google Chrome
Troubleshoot Output
(env_local) PS C:\dev> jupyter troubleshoot

sys.executable:
~\env_local\scripts\python.exe

sys.version:
3.11.7 (main, Jan 11 2024, 15:05:28) [MSC v.1927 64 bit (AMD64)]

platform.platform():
Windows-10-10.0.19045-SP0

where jupyter:
~\env_local\Scripts\jupyter.exe

pip list:
Package Version
----------------------------- --------------
accessible-pygments 0.0.4
aiosqlite 0.19.0
alabaster 0.7.13
alembic 1.13.1
annotated-types 0.6.0
ansi2html 1.8.0
anyio 3.6.2
appdirs 1.4.4
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
astroid 3.1.0
asyncpg 0.28.0
attrs 23.1.0
Babel 2.12.1
backcall 0.2.0
backoff 2.2.1
beautifulsoup4 4.12.2
bleach 6.0.0
blinker 1.6.2
cachelib 0.9.0
cachetools 5.3.0
caf 1.1.4
caf-version 999.0
certifi 2023.5.7
cffi 1.16.0
cfgv 3.4.0
chardet 3.0.4
charset-normalizer 3.1.0
click 8.1.3
clr-loader 0.2.5
colorama 0.4.6
comtypes 1.1.14
ConfigArgParse 1.5.3
contourpy 1.0.7
coverage 7.4.4
cryptography 42.0.5
cssselect 1.2.0
cvxpy 1.3.1
cycler 0.11.0
dash 2.9.3
dash-ag-grid 2.3.0
dash-bootstrap-components 1.3.1
dash-core-components 2.0.0
dash-extensions 1.0.0
dash-html-components 2.0.0
dash-mantine-components 0.12.1
dash-table 5.0.0
databases 0.8.0
DateTime 5.1
debugpy 1.6.7
decorator 5.1.1
defusedxml 0.7.1
deprecation 2.1.0
dill 0.3.8
diskcache 5.6.1
distlib 0.3.6
docutils 0.20.1
ecos 2.0.12
EditorConfig 0.12.3
eikon 1.1.16
entrypoints 0.4
et-xmlfile 1.1.0
fastapi 0.103.0
fastjsonschema 2.16.3
filelock 3.12.0
Flask 2.3.2
Flask-Caching 2.0.2
Flask-Cors 3.0.10
fonttools 4.39.4
freetype-py 2.3.0
freezegun 1.2.2
graypy 2.1.0
greenlet 2.0.2
grpcio 1.54.2
grpcio-tools 1.54.2
h11 0.14.0
h2 3.2.0
hpack 3.0.0
httpcore 0.17.1
httpx 0.24.0
hyperframe 5.2.0
identify 2.5.35
idna 2.10
imagesize 1.4.1
importlib-metadata 6.6.0
importlib-resources 5.12.0
iniconfig 2.0.0
ipyaggrid 0.5.1
ipykernel 6.2.0
ipysheet 0.7.0
ipython 7.34.0
ipython-genutils 0.2.0
ipytree 0.2.2
ipywidgets 8.0.2
isort 5.13.2
itsdangerous 2.1.2
jedi 0.18.2
Jinja2 3.1.2
joblib 1.2.0
jsbeautifier 1.14.7
json5 0.9.14
jsonschema 4.17.3
jupyter 1.0.0
jupyter_client 7.4.1
jupyter-console 6.4.4
jupyter_core 5.3.0
jupyter-dash 0.4.2
jupyter-server 1.24.0
jupyterlab-pygments 0.2.2
jupyterlab_server 2.22.1
jupyterlab-widgets 3.0.7
jupytext 1.14.5
kaleido 0.2.1
kiwisolver 1.4.4
llvmlite 0.40.0
lxml 4.9.2
Mako 1.2.4
markdown-it-py 2.2.0
MarkupSafe 2.1.2
matplotlib 3.6.3
matplotlib-inline 0.1.6
mccabe 0.7.0
mdit-py-plugins 0.3.5
mdurl 0.1.2
mistune 2.0.5
mock 5.0.2
more-itertools 9.1.0
multidict 6.0.5
multiprocess 0.70.15
mypy 1.9.0
mypy-extensions 1.0.0
nbclassic 1.0.0
nbclient 0.7.4
nbconvert 7.4.0
nbformat 5.8.0
nest-asyncio 1.5.6
nodeenv 1.8.0
nose 1.3.7
notebook 6.5.4
notebook_shim 0.2.3
numba 0.57.0
numexpr 2.8.4
numpy 1.23.5
openpyxl 3.1.2
ordered-set 4.1.0
osqp 0.6.2.post9
packaging 24.0
pandas 1.5.3
pandocfilters 1.5.0
parameterized 0.9.0
parso 0.8.3
patsy 0.5.3
pdfrw 0.4
pickleshare 0.7.5
Pillow 9.5.0
pip 24.0
pip-system-certs 4.0
platformdirs 3.2.0
plotly 5.14.1
pluggy 1.4.0
pre-commit 3.6.2
pretty-html-table 0.9.16
prometheus-client 0.16.0
prompt-toolkit 3.0.38
protobuf 4.23.1
psutil 5.9.5
psycopg2-binary 2.9.6
pyasn1 0.5.0
pycairo 1.23.0
pycountry 22.3.5
pycparser 2.21
pydantic 2.5.3
pydantic_core 2.14.6
pydantic-settings 2.0.3
pydata-sphinx-theme 0.13.3
pydocstyle 6.3.0
pyee 11.1.0
Pygments 2.15.1
pyhumps 3.8.0
pyjnius 1.5.0
PyLaTeX 1.4.1
pylint 3.1.0
PyMySQL 1.1.0
pyparsing 3.0.9
pyrsistent 0.19.3
pysmb 1.2.9.1
pytest 8.1.1
pytest-asyncio 0.23.6
pytest-mock 3.14.0
pytest-recording 0.13.1
python-dateutil 2.8.2
python-dotenv 1.0.0
pythonnet 3.0.1
pytz 2023.3
pyvar 1.1.0
pywin32 306
pywinpty 2.0.10
PyYAML 6.0.1
pyzmq 25.0.2
qdldl 0.1.7
qPython3 1.0.1
qtconsole 5.4.3
QtPy 2.3.1
redis 4.5.5
refinitiv-data 1.6.1
reportlab 4.0.0
requests 2.30.0
retrying 1.3.4
rfc3986 1.5.0
rlPyCairo 0.2.0
schedule 1.2.0
scikit-learn 1.2.2
scipy 1.9.3
scs 3.2.3
seaborn 0.12.2
Send2Trash 1.8.2
setuptools 65.5.0
simplejson 3.19.1
six 1.16.0
sniffio 1.3.0
snowballstemmer 2.2.0
sobol-seq 0.2.0
soupsieve 2.4.1
Sphinx 7.0.1
sphinxcontrib-applehelp 1.0.4
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 2.0.1
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.5
SQLAlchemy 1.4.49
starlette 0.27.0
statsmodels 0.14.0
suds 1.1.2
svn 1.0.1
teamcity-messages 1.31
tenacity 8.2.2
terminado 0.17.1
threadpoolctl 3.1.0
tinycss2 1.2.1
toml 0.10.2
tomlkit 0.12.4
tornado 6.3.2
tqdm 4.65.0
traitlets 5.9.0
typeguard 4.2.1
types-beautifulsoup4 4.12.0.20240229
types-cachetools 5.3.0.7
types-decorator 5.1.8.20240310
types-html5lib 1.1.11.20240228
types-lxml 2024.4.14
types-protobuf 4.24.0.20240311
types-pyOpenSSL 24.0.0.20240311
types-python-dateutil 2.9.0.20240316
types-pytz 2024.1.0.20240203
types-PyYAML 6.0.12.20240311
types-redis 4.6.0.20240311
types-requests 2.31.0.6
types-setuptools 69.2.0.20240317
types-simplejson 3.19.0.20240310
types-urllib3 1.26.25.14
typing_extensions 4.10.0
tzdata 2024.1
urllib3 1.26.18
vcrpy 6.0.1
virtualenv 20.22.0
voila 0.4.0
watchdog 2.3.1
wcwidth 0.2.6
webencodings 0.5.1
websocket-client 1.5.1
websockets 11.0.3
Werkzeug 2.3.4
wheel 0.43.0
wheel-filename 1.4.1
widgetsnbextension 4.0.7
winshares 1.0.2
wrapt 1.16.0
xlrd 2.0.1
XlsxWriter 3.1.0
xlwings 0.11.5
yarl 1.9.4
zipp 3.15.0
zope.interface 6.0

@DiegoF90 DiegoF90 added the bug Something isn't working label May 2, 2024
@trungleduc
Copy link
Member

@martinRenou does it relate to your PR jupyter-widgets/ipywidgets#3931 ?

@martinRenou
Copy link
Member

@martinRenou does it relate to your PR jupyter-widgets/ipywidgets#3931 ?

I believe not, my PR was for ipywidgets 7.x and they are using 8.0.2

@trungleduc
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants