Following on from a conversation on Discord with @Aran-Fey yesterday, since v0.7.5 was released (which fixed rio.Table not resizing vertically when updated with new data) all rio.Tables now seem to use a much greater horizontal column padding to push the columns apart, sometimes to the edges of the browser window.
Expected Behavior
When building a rio.Table, a sensible horizontal padding between table columns should be chosen to not spread the table over the entire width of its container, as was the case in v0.7.4.
Steps to Reproduce
On Rio v0.7.4, create a project with the following __init__.py:
from __future__ import annotations
from pathlib import Path
from typing import * # type: ignore s
import rio
class RootPage(rio.Component):
def build(self) -> rio.Component:
return rio.Column(
rio.Table(
{f'Col{i}': [i+1, i+2, i+3] for i in range(10)},
show_row_numbers=False
),
spacing=2,
width=60,
margin_bottom=4,
align_x=0.5,
align_y=0,
)
app = rio.App(
name='Table_MWE',
pages=[
rio.Page(
name="Home",
page_url='',
build=RootPage,
)
]
)
Use rio run to visualise the built site. The table will sensibly space out its columns, as in the first screenshot (rio_mwe_074)
Update Rio to v0.75 or newer (I'm now on v0.7.7) and visualise the site with rio run. The columns of the table will now be pushed apart as in the second screenshot (rio_mwe_077), resulting in a stretched table that becomes difficult to read with longer string values in its fields.
Describe the bug
Following on from a conversation on Discord with @Aran-Fey yesterday, since v0.7.5 was released (which fixed
rio.Table
not resizing vertically when updated with new data) allrio.Table
s now seem to use a much greater horizontal column padding to push the columns apart, sometimes to the edges of the browser window.Expected Behavior
When building a
rio.Table
, a sensible horizontal padding between table columns should be chosen to not spread the table over the entire width of its container, as was the case in v0.7.4.Steps to Reproduce
On Rio v0.7.4, create a project with the following
__init__.py
:Use
rio run
to visualise the built site. The table will sensibly space out its columns, as in the first screenshot (rio_mwe_074)Update Rio to v0.75 or newer (I'm now on v0.7.7) and visualise the site with
rio run
. The columns of the table will now be pushed apart as in the second screenshot (rio_mwe_077), resulting in a stretched table that becomes difficult to read with longer string values in its fields.Screenshots/Videos
Operating System
Linux
What browsers are you seeing the problem on?
Chrome
Browser version
124.0.6367.201
What device are you using?
Desktop
Additional context
No response