jupyterlab-contrib/rise

Odd sizing of dataframe outputs

Opened this issue · 5 comments

Description

When I output a pandas dataframe, the table with the data has a widely different font size than the one line below the table indicating how many rows and columns there are.

image

Reproduce

Output any pandas data frame

Expected behavior

The sizing would be more similar to how this looks outside of rise:

image

Context

  • Python package version: 0.40.0
  • Extension version:
JupyterLab v4.0.5
/opt/conda/share/jupyter/labextensions
        jupyterlab_pygments v0.2.2 enabled  X (python, jupyterlab_pygments)
        jupyterlab-rise v0.40.0 enabled OK (python, jupyterlab_rise)
        nbgrader v0.9.1 enabled OK (python, nbgrader)
        jupyter-matplotlib v0.11.3 enabled OK
        nbdime-jupyterlab v2.2.0 enabled  X
        @jupyter-notebook/lab-extension v7.0.3 enabled OK
        @jupyter-widgets/jupyterlab-manager v5.0.8 enabled OK (python, jupyterlab_widgets)
        @jupyterlab/git v0.41.0 enabled  X (python, jupyterlab-git)


   The following extensions are outdated:
        jupyterlab_pygments
        nbdime-jupyterlab
        @jupyterlab/git
        
   Consider checking if an update is available for these packages.

Other labextensions (built into JupyterLab)
   app dir: /opt/conda/share/jupyter/lab


Disabled extensions:
    @jupyterlab/cell-toolbar-extension (all plugins)
Config dir: /home/jovyan/.jupyter

Config dir: /opt/conda/etc/jupyter
    jupyter_lsp enabled
    - Validating jupyter_lsp...
Package jupyter_lsp took 0.0055s to import
A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
      jupyter_lsp 2.2.0 OK
    jupyter_server_mathjax enabled
    - Validating jupyter_server_mathjax...
Package jupyter_server_mathjax took 0.0006s to import
      jupyter_server_mathjax  OK
    jupyter_server_terminals enabled
    - Validating jupyter_server_terminals...
Package jupyter_server_terminals took 0.0026s to import
      jupyter_server_terminals 0.4.4 OK
    jupyterlab enabled
    - Validating jupyterlab...
Package jupyterlab took 0.0403s to import
      jupyterlab 4.0.5 OK
    jupyterlab_git enabled
    - Validating jupyterlab_git...
Package jupyterlab_git took 0.0136s to import
      jupyterlab_git 0.41.0 OK
    jupyterlab_rise enabled
    - Validating jupyterlab_rise...
Package jupyterlab_rise took 0.0010s to import
      jupyterlab_rise 0.40.0 OK
    nbclassic enabled
    - Validating nbclassic...
Package nbclassic took 0.0010s to import
A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
      nbclassic 1.0.0 OK
    nbdime enabled
    - Validating nbdime...
Package nbdime took 0.0000s to import
      nbdime 3.2.1 OK
    nbgitpuller enabled
    - Validating nbgitpuller...
Package nbgitpuller took 0.0005s to import
      nbgitpuller 1.2.0 OK
    nbgrader.server_extensions.formgrader enabled
    - Validating nbgrader.server_extensions.formgrader...
Package nbgrader.server_extensions.formgrader took 0.3730s to import
      nbgrader.server_extensions.formgrader  OK
    nbgrader.server_extensions.validate_assignment enabled
    - Validating nbgrader.server_extensions.validate_assignment...
Package nbgrader.server_extensions.validate_assignment took 0.0000s to import
      nbgrader.server_extensions.validate_assignment  OK
    nbgrader.server_extensions.assignment_list enabled
    - Validating nbgrader.server_extensions.assignment_list...
Package nbgrader.server_extensions.assignment_list took 0.0000s to import
      nbgrader.server_extensions.assignment_list  OK
    nbgrader.server_extensions.course_list enabled
    - Validating nbgrader.server_extensions.course_list...
Package nbgrader.server_extensions.course_list took 0.0000s to import
      nbgrader.server_extensions.course_list  OK
    notebook enabled
    - Validating notebook...
Package notebook took 0.0000s to import
      notebook 7.0.3 OK
    notebook_shim enabled
    - Validating notebook_shim...
Package notebook_shim took 0.0000s to import
A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
      notebook_shim  OK

Config dir: /usr/local/etc/jupyter
  • Operating System and its version: PopOS 22.04
  • Browser and its version: Firfox 116.0
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Web Browser Output
Paste the output from your browser web console here.

I think it is tables in general that are styled incorrectly. It seems like their size is not scaled the same as the text. Here is an example of a markdown table and regular text next to it

jupyterlab-rise:
image

in the notebook:
image

Input code cells are also not scaled as the surrounding text which makes it difficult to zoom in on code:

image

+1 -- I have also run into this same issue. In older versions of RISE the scaling of code inputs/outputs was a bit more reasonable.

Actually it's not just de the dataframe. The text box is rendered much bigger than the code size:
image

I don't see a reason to have markdown so big, if the code size is unreadable in comparison on a projected screen

Sorry I just see this comment is the same as @joelostblom . So has anybody found a solution? Even a hardcoded one...

Additionally, (this is font-sizes.ipynb from examples)

  1. changing font size for code cells in jupyterlab (as done here by settings->themes->increase code font size) does not affect font size in slideshow at all. Ok, I would expect this.
    rise-fontsize

  2. changing e.g. font-size: 200% in the samename-as-notebook.css does not make a difference as well.

  3. providing a rise.css does not help either.

Instead of tables, issue seems to be: code font is rendered too small.