New Column text box not editable in PerspectiveWidget
Bug Report
Clicking on New Column unhides the text box but the text box is not editable, by which I mean clicking in the text box does not place a cursor there and writing is not possible.
Steps to Reproduce:
- Open empty notebook in JupyterLab 3.0
- Paste following to a cell:
import perspective
schema = {'id': int, 'text': str}
data = [{'id': 1, 'text': 'text1'}, {'id': 2, 'text': 'text2'}]
t = perspective.Table(data, index='id')
w = perspective.PerspectiveWidget(t, editable=True)
w
- Run the cell
- Click on the New Column text in the widget.
- Click in the text box that appears.
Expected Result:
Based on the documentation, the text box should be editable.
Actual Result:
The text box is not editable. No error message.
Environment:
MacOS 11.2.3 Safari 14.0.3
jupyter labextension list
/Volumes/LaCie/miniconda3/envs/py38/lib/python3.8/site-packages/jupyter_server/transutils.py:13: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
warnings.warn(warn_msg, FutureWarning)
JupyterLab v3.0.12
/Volumes/LaCie/miniconda3/envs/py38/share/jupyter/labextensions
@jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
Other labextensions (built into JupyterLab)
app dir: /Volumes/LaCie/miniconda3/envs/py38/share/jupyter/lab
@finos/perspective-jupyterlab v0.6.2 enabled OK
The following conda environment is newly created.
conda list
# packages in environment at /Volumes/LaCie/miniconda3/envs/py38:
#
# Name Version Build Channel
abseil-cpp 20200923.3 h046ec9c_0 conda-forge
aiohttp 3.7.4 py38h96a0964_0 conda-forge
alpha_vantage 2.3.1 pyhd8ed1ab_0 conda-forge
anyio 2.2.0 py38h50d1736_0 conda-forge
appnope 0.1.2 py38h50d1736_1 conda-forge
argon2-cffi 20.1.0 py38h5406a74_2 conda-forge
arrow-cpp 3.0.0 py38h554edd7_9_cpu conda-forge
async-timeout 3.0.1 py_1000 conda-forge
async_generator 1.10 py_0 conda-forge
attrs 20.3.0 pyhd3deb0d_0 conda-forge
aws-c-cal 0.4.5 h07979c6_8 conda-forge
aws-c-common 0.5.2 h0d85af4_0 conda-forge
aws-c-event-stream 0.2.7 h7899ccf_1 conda-forge
aws-c-io 0.9.1 h511c4bf_1 conda-forge
aws-checksums 0.1.11 h511c4bf_3 conda-forge
aws-sdk-cpp 1.8.151 h7784011_1 conda-forge
babel 2.9.0 pyhd3deb0d_0 conda-forge
backcall 0.2.0 pyh9f0ad1d_0 conda-forge
backports 1.0 py_2 conda-forge
backports.functools_lru_cache 1.6.3 pyhd8ed1ab_0 conda-forge
bleach 3.3.0 pyh44b312d_0 conda-forge
brotli 1.0.9 h046ec9c_4 conda-forge
brotlipy 0.7.0 py38h5406a74_1001 conda-forge
bzip2 1.0.8 hc929b4f_4 conda-forge
c-ares 1.17.1 h0d85af4_1 conda-forge
ca-certificates 2020.12.5 h033912b_0 conda-forge
certifi 2020.12.5 py38h50d1736_1 conda-forge
cffi 1.14.5 py38ha97d567_0 conda-forge
chardet 4.0.0 py38h50d1736_1 conda-forge
cryptography 3.4.7 py38h1fa4640_0 conda-forge
decorator 4.4.2 py_0 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
entrypoints 0.3 pyhd8ed1ab_1003 conda-forge
gflags 2.2.2 hb1e8313_1004 conda-forge
glog 0.4.0 hb7f4fc5_3 conda-forge
grpc-cpp 1.36.4 h0cc1461_0 conda-forge
icu 68.1 h74dc148_0 conda-forge
idna 2.10 pyh9f0ad1d_0 conda-forge
importlib-metadata 3.8.0 py38h50d1736_0 conda-forge
ipykernel 5.5.0 py38h9bb44b7_1 conda-forge
ipython 7.22.0 py38h6c79ece_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
ipywidgets 7.6.3 pyhd3deb0d_0 conda-forge
jedi 0.18.0 py38h50d1736_2 conda-forge
jinja2 2.11.3 pyh44b312d_0 conda-forge
json5 0.9.5 pyh9f0ad1d_0 conda-forge
jsonschema 3.2.0 pyhd8ed1ab_3 conda-forge
jupyter-packaging 0.7.12 pyhd8ed1ab_0 conda-forge
jupyter_client 6.1.12 pyhd8ed1ab_0 conda-forge
jupyter_core 4.7.1 py38h50d1736_0 conda-forge
jupyter_server 1.5.1 py38h50d1736_0 conda-forge
jupyterlab 3.0.12 pyhd8ed1ab_0 conda-forge
jupyterlab_pygments 0.1.2 pyh9f0ad1d_0 conda-forge
jupyterlab_server 2.3.0 pyhd8ed1ab_0 conda-forge
jupyterlab_widgets 1.0.0 pyhd8ed1ab_1 conda-forge
krb5 1.17.2 h60d9502_0 conda-forge
libblas 3.9.0 8_openblas conda-forge
libcblas 3.9.0 8_openblas conda-forge
libcurl 7.75.0 h8ef9fac_0 conda-forge
libcxx 11.1.0 habf9029_0 conda-forge
libedit 3.1.20191231 h0678c8f_2 conda-forge
libev 4.33 haf1e3a3_1 conda-forge
libevent 2.1.10 hddc9c9b_3 conda-forge
libffi 3.3 h046ec9c_2 conda-forge
libgfortran 5.0.0 9_3_0_h6c81a4c_20 conda-forge
libgfortran5 9.3.0 h6c81a4c_20 conda-forge
liblapack 3.9.0 8_openblas conda-forge
libnghttp2 1.43.0 h07e645a_0 conda-forge
libopenblas 0.3.12 openmp_h54245bb_1 conda-forge
libprotobuf 3.15.6 hcf210ce_0 conda-forge
libsodium 1.0.18 hbcb3906_1 conda-forge
libssh2 1.9.0 h52ee1ee_6 conda-forge
libthrift 0.14.1 hab56fdc_1 conda-forge
libutf8proc 2.6.1 h35c211d_0 conda-forge
libuv 1.41.0 hbcf498f_0 conda-forge
llvm-openmp 11.1.0 hda6cdc1_0 conda-forge
lz4-c 1.9.3 h046ec9c_0 conda-forge
markupsafe 1.1.1 py38h5406a74_3 conda-forge
mistune 0.8.4 py38h5406a74_1003 conda-forge
multidict 5.1.0 py38h5406a74_1 conda-forge
nbclassic 0.2.6 pyhd8ed1ab_0 conda-forge
nbclient 0.5.3 pyhd8ed1ab_0 conda-forge
nbconvert 6.0.7 py38h50d1736_3 conda-forge
nbformat 5.1.2 pyhd8ed1ab_1 conda-forge
ncurses 6.2 h2e338ed_4 conda-forge
nest-asyncio 1.4.3 pyhd8ed1ab_0 conda-forge
nodejs 15.12.0 hb529b34_0 conda-forge
notebook 6.3.0 py38h50d1736_0 conda-forge
numpy 1.20.1 py38h64deac9_0 conda-forge
openssl 1.1.1k h0d85af4_0 conda-forge
orc 1.6.7 hb8e0f11_1 conda-forge
packaging 20.9 pyh44b312d_0 conda-forge
pandas 1.2.3 py38h1588c1c_0 conda-forge
pandoc 2.13 h0d85af4_0 conda-forge
pandocfilters 1.4.2 py_1 conda-forge
parquet-cpp 1.5.1 2 conda-forge
parso 0.8.1 pyhd8ed1ab_0 conda-forge
perspective 0.6.2 py38h40e05ec_1 conda-forge
pexpect 4.8.0 pyh9f0ad1d_2 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pip 21.0.1 pyhd8ed1ab_0 conda-forge
prometheus_client 0.9.0 pyhd3deb0d_0 conda-forge
prompt-toolkit 3.0.18 pyha770c72_0 conda-forge
ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
pyarrow 3.0.0 py38h5def71b_9_cpu conda-forge
pycparser 2.20 pyh9f0ad1d_2 conda-forge
pygments 2.8.1 pyhd8ed1ab_0 conda-forge
pyopenssl 20.0.1 pyhd8ed1ab_0 conda-forge
pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge
pyrsistent 0.17.3 py38h5406a74_2 conda-forge
pysocks 1.7.1 py38h50d1736_3 conda-forge
python 3.8.8 h4e93d89_0_cpython conda-forge
python-dateutil 2.8.1 py_0 conda-forge
python_abi 3.8 1_cp38 conda-forge
pytz 2021.1 pyhd8ed1ab_0 conda-forge
pyzmq 22.0.3 py38hd3b92b6_1 conda-forge
re2 2020.11.01 h2e338ed_0 conda-forge
readline 8.1 h05e3726_0 conda-forge
requests 2.25.1 pyhd3deb0d_0 conda-forge
send2trash 1.5.0 py_0 conda-forge
setuptools 49.6.0 py38h50d1736_3 conda-forge
six 1.15.0 pyh9f0ad1d_0 conda-forge
snappy 1.1.8 hb1e8313_3 conda-forge
sniffio 1.2.0 py38h50d1736_1 conda-forge
sqlite 3.35.3 h44b9ce1_0 conda-forge
terminado 0.9.3 py38h50d1736_0 conda-forge
testpath 0.4.4 py_0 conda-forge
tk 8.6.10 h0419947_1 conda-forge
tornado 6.1 py38h5406a74_1 conda-forge
traitlets 5.0.5 py_0 conda-forge
typing-extensions 3.7.4.3 0 conda-forge
typing_extensions 3.7.4.3 py_0 conda-forge
urllib3 1.26.4 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge
webencodings 0.5.1 py_1 conda-forge
wheel 0.36.2 pyhd3deb0d_0 conda-forge
widgetsnbextension 3.5.1 py38h50d1736_4 conda-forge
xz 5.2.5 haf1e3a3_1 conda-forge
yarl 1.6.3 py38h5406a74_1 conda-forge
zeromq 4.3.4 h1c7c35f_0 conda-forge
zipp 3.4.1 pyhd8ed1ab_0 conda-forge
zlib 1.2.11 h7795811_1010 conda-forge
zstd 1.4.9 h582d3a0_0 conda-forge
Additional Context:
...add any other context about the problem here. If applicable, add screenshots to help explain...
To help us isolate the issue, would you be able to:
- Try the Jupyterlab window in Chrome, and see if the same error happens
- Try the examples in the README on Safari and see if the same error happens
I have a feeling it has to do with the custom text editor that I added for the expressions widget, which is being overhauled and ripped out in #1354 for the next major release.
Hi,
I can confirm the same issues in the README examples. In the meantime, I discovered more user interface glitches:
- not able to edit data, even if the widget created as editable (also in the Readme examples). Clicking selects a cell, but further clicking or double clicking does not enter an edit mode for a cell.
- changing order of columns is hit or miss. Dragging the name of a column is kind of jittery and sometimes the grab is lost halfway or the column returns to it's original position after release. Same issue in the readme examples. But dragging of column names to change their order is not described in documentation so not sure whether it is actually intended to work.
I'm sorry but can't help with testing in Chrome, don't want it near my computer anymore.
This is a bug in desktop Safari. If you'd like, for now you can fix this in released Perspective versions via CSS injection (see link for details).
While I'm down to fix any reported bugs that have reasonable fixes (e.g. this one), please note that in general I think Safari is always going to be a 2nd class citizen for Perspective, due to a litany of bugs in said browser coupled with our inability to run integration tests against it. Drag/drop support being a great example, which desktop Safari conflates with its OSX-specific touch and scroll events, fires events in the wrong order, etc.
Bit-rotted, closing