Repository navigation
flexablelib 3.3.1
Fixed
- Tabs no longer push tables and cards past their width. A tab measures
nothing, so a cell holding one was sized and wrapped as narrower than the
spaces it became: the table came out wider thanmax_width(or
render(width)), and in card mode the raw tab displaced the frame.
Cells are expanded before they are measured, headers are trimmed on their
expanded width withoverflow='truncate', andwrap_to_widthexpands
tabs itself, so cards, grids, widgets and components get it too. - A newline in a card title, or in a title set into a border
(title_position='border'), split the frame in two; the title now
goes on one line. Multi-line table titles and captions are aligned line
by line instead of only the first line. max_widthnow counts thepanel(two columns) andshadow
(one): squeezing,expand_to_windowandtoo_narrow_messagesized
the columns for the full width and then drew the panel outside it.from_csvandfrom_markdowndrop a leading UTF-8 byte-order mark
(Excel's "CSV UTF-8"): it was kept as the first character of the first
header, and a Markdown table gained an extra empty column.- A brace format template (
custom_format={'price': '{:,.2f}'},
float_format='$ {:,.2f}') no longer aborts the whole render on a text
cell in the column; the cell prints as it is, as it already did with a
plain spec. A template that needs more than one value raises a
ValueErrorthat says so.
Added
flexablelib.text_width.expand_tabs(text, tabsize=8): tab expansion
that counts terminal columns (wide characters two, escape sequences
none).
pip install -U flexablelib==3.3.1 (extras [tui,components,speed] in lockstep).