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

Too much padding in terminal #4288

Open
glycerine opened this issue Mar 31, 2018 · 6 comments
Open

Too much padding in terminal #4288

glycerine opened this issue Mar 31, 2018 · 6 comments
Milestone

Comments

@glycerine
Copy link

glycerine commented Mar 31, 2018

Version:

Running jupyterlab docker image (repro with docker pull jaten/jupyterlab:2018march30
) i.e. this is 50892c430b16 tagged to mark the exact image from parent dockerhub image mikebirdgeneau/jupyterlab:latest / 50892c430b16 which was updated on 2018 March 28.

In trying to determine the exact version of jupyterlab that Mike installed in his docker image, I'm browsing the installed file directory, and I see

./lib/python3.6/site-packages/folium-0.5.0.dist-info/INSTALLER
./lib/python3.6/site-packages/jupyterlab-0.31.12.dist-info
./lib/python3.6/site-packages/jupyterlab-0.31.12.dist-info/top_level.txt
./lib/python3.6/site-packages/jupyterlab-0.31.12.dist-info/RECORD
./lib/python3.6/site-packages/jupyterlab-0.31.12.dist-info/WHEEL
./lib/python3.6/site-packages/jupyterlab-0.31.12.dist-info/metadata.json
./lib/python3.6/site-packages/jupyterlab-0.31.12.dist-info/DESCRIPTION.rst
./lib/python3.6/site-packages/jupyterlab-0.31.12.dist-info/METADATA
./lib/python3.6/site-packages/jupyterlab-0.31.12.dist-info/entry_points.txt
./lib/python3.6/site-packages/jupyterlab-0.31.12.dist-info/INSTALLER
./lib/python3.6/site-packages/jupyterlab
./lib/python3.6/site-packages/jupyterlab/__init__.py
./lib/python3.6/site-packages/jupyterlab/process_app.py
...

So perhaps this is v0.31.12? You can probably tell more precisely than I can by inspecting the docker image file tree.

On to the bugs:

On my mac, OSX 10.12.5, running browser Chrome 65.0.3325.181 (Official Build) (64-bit), when using the (jupyterlab's xterm.js) terminal, I see jagged edges on the outlined boxes, something seems proportionately spaced (rather than fix width font?)... (Notice this by looking down the vertical center-line of the terminal, for the right side of the 'Table' box.

https://www.dropbox.com/s/g0czb4ksewmm6yg/Screenshot%202018-03-30%2019.43.19.png?dl=0

For comparison, firefox looks fine, version 58.0.2

https://www.dropbox.com/s/2mptymdcp8xdfwq/Screenshot%202018-03-30%2019.46.28.png?dl=0

Additionally, Safari is quite bad, not passing the correct size to the terminal on initiation.

https://www.dropbox.com/s/0fxkhrfgswd55fa/Screenshot%202018-03-30%2019.47.53.png?dl=0
https://www.dropbox.com/s/erv01c713a0x312/Screenshot%202018-03-30%2019.48.21.png?dl=0

upon manual resize, this is correctable, but the jagged borders are also
visible in Safari. I'm running Safari Version 10.1.1 (12603.2.4)
https://www.dropbox.com/s/2m2u4hkwv08cgjh/Screenshot%202018-03-30%2019.49.16.png?dl=0

The application being run here is https://github.com/rivo/tview/tree/master/demos/presentation as built with go version go1.10 darwin/amd64, cross compiled to linux with env GOOS=linux GOARCH=amd64 go build. Press ctrl-n in the presentation app 7-times to get to the table demo page. Then down-arrow 2x, then enter-once to select the 'Table with borders' demo which most visually accents the annoyance.

If it helps, here's a closeup (rightside) with a hover over in chrome dev tools of the character being used: 'span.xterm-normal-char' seems to be the class applied.

https://www.dropbox.com/s/3zwnthwnycajcya/Screenshot%202018-03-30%2020.30.26.png?dl=0

@glycerine
Copy link
Author

glycerine commented Mar 31, 2018

https://github.com/xtermjs/xterm.js is now at version 3.2.0. They have monthly releases. The last update in jupyterlab seems to come from 11 months ago, v2.6.0 (according to

// Project: https://github.com/sourcelair/xterm.js/
). I wonder if this has been fixed in xterm.js in the meantime. I somebody could advise on how to upgrade (and does it need patching to work under jupyterlab?), I would try the latest xterm.js.

@glycerine
Copy link
Author

glycerine commented Mar 31, 2018

ah. I see an open PR that will upgrade xterm.js to 3.0.0. #3553. I'll try that.

@glycerine
Copy link
Author

glycerine commented Mar 31, 2018

Tried https://github.com/blink1073/jupyterlab:xterm3.0, visually its a mixed bag:

a) the overlapping bricks alignment problem is gone; but

b) the padding is overdone,

The excess padding means the lines that the terminal UI has drawn at the borders of the big boxes no longer connect with each other. The result is visually jarring: disconnected or dashed lines, instead of a continuous box border. Not horrible, but still a nit. See the next comment for what it is intended to look like.

image

@glycerine
Copy link
Author

glycerine commented Mar 31, 2018

For contrast to the above, here is what the connected, continuous box borders that I expected look like. This is the same application (presentation) in the OSX Terminal.

image

@glycerine
Copy link
Author

Ugh. Another bigger-than-a-nit problem. Under the xterm-3.0 branch as above, with JupyterLab in dark theme, the graphics output in R terminal is well-nigh unreadable. Look very carefully, there's a histogram hiding in the dark on the right...

image

@saulshanabrook saulshanabrook changed the title terminal emulator visual nits on chrome/safari, and failure to pass correct init to Safari terminal Too much padding in terminal Sep 10, 2018
@saulshanabrook saulshanabrook added this to the Future milestone Sep 10, 2018
@saulshanabrook
Copy link
Member

OK so from what I gather, the final issue is that the padding is too large and disrupts tables. Feel free to correct me if I have that wrong.

#5232 recently fixed matplotlib rendering with the dark theme. Maybe something similar would have to be done in R kernels?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants