zhihanyue / qgridnext

Advancing QGrid, an interactive grid for exploring DataFrames in JupyterLab/Notebook
https://qgridnext.readthedocs.io
Apache License 2.0
24 stars 2 forks source link

The last row is partially cut off when using customized grid_options #8

Closed auriz24 closed 1 month ago

auriz24 commented 3 months ago

Environment

Description of Issue

The last row is partially cut off when using customized grid_options such as disabling column autofit, {'forceFitColumns': False}.

Examples:

image A large dataset (100 rows, 30 columns)

image A smaller dataset (100 rows, 3 columns)

Reproduction Steps

  1. Disable column autofit, qgrid.show_grid(..., grid_option={'forceFitColumns': False}).

What steps have you taken to resolve this already?

Not applicable.

Anything else?

Not applicable.

auriz24 commented 1 month ago

I'd like to post a few more examples showcasing the issue and comparing it to the old Qgrid package.

Qgrid

Environment: Jupyter Notebook 6.5.7, ipywidgets 7.8.5, qgrid 1.3.1

The last row is fully visible when using the old Qgrid package:

Screenshot 2024-10-25 143133

The grid canvas and the horizontal slider are stacked properly:

Screenshot 2024-10-25 143342

QgridNext

Environment: Jupyter Notebook 7.2.2, ipywidgets 8.1.5, qgridnext 2.0.1

The last row is partially visible when using the new QgridNext package:

Screenshot 2024-10-25 150841

The grid canvas and horizontal slider are not stacked. Instead, the slider is layered on top of the grid canvas:

Screenshot 2024-10-25 151053

Note: The environments are not identical because Qgrid 1.3.1 doesn't work with ipywidgets 8 and notebook 7.

zhihanyue commented 1 month ago

I'm investigating this issue. With notebook 7, qgridnext displays properly in macOS browsers (Safari & Chrome), but I was able to reproduce the problem in Windows browsers (Edge & Chrome). This should be related to the notebook version, as qgridnext also displays properly with notebook 6.

zhihanyue commented 1 month ago

I tracked down the issue to inconsistent scrollbar dimension measurements in newer Jupyter environments. The next release will fix this issue.