v5.0.0
Textualize/textualv5.0.0Jul 25, 2025by willmcgugan
AI Summary
A major release focusing on Markdown improvements including tables, text selection, and streaming support, plus the auto-import of speedups.
Key Highlights
- Improved Markdown rendering with full text selection and tables.
- Added Markdown streaming support and extension mechanism.
- Textual speedups library now imports automatically if installed.
Breaking Changes
- `Visual.render_strips` has a new signature (if building Visuals).
- Component classes on Markdown moved to MarkdownBlock (if customizing CSS).
New Features
- `get_minimal_width` to Visual protocol
- `expand` and `shrink` to GridLayout
- `Markdown.get_stream`
- `textual.highlight` module
- `MessagePump.wait_for_refresh`
- `Widget.container_scroll_offset`
- `Markdown.source` attribute
- Markdown extension mechanism
- `index` to `ListView.Selected` event
- `layout` switch to `Static.update`
Full Release Notes
This is quite a large release! Fueled in part by my work on [Toad](https://willmcgugan.github.io/announcing-toad/) Markdown rendering has been improved, with full text selection, prettier code blocks and tables. Plus streaming support. <img width="1626" height="1310" alt="Screenshot 2025-07-25 at 08 37 30" src="https://github.com/user-attachments/assets/896886c1-d960-499a-a455-6e992231ee1c" /> Plenty of other fixes and additions. Thats to everyone who contributed code and issues! There are two breaking changes (see below). These are unlikely to affect anyone, but [Semver](https://semver.org/) requires bumping the major version number. ## [5.0.0] - 2025-07-25 ### Added - Added get_minimal_width to Visual protocol https://github.com/Textualize/textual/pull/5962 - Added `expand` and `shrink` attributes to GridLayout https://github.com/Textualize/textual/pull/5962 - Added `Markdown.get_stream` https://github.com/Textualize/textual/pull/5966 - Added `textual.highlight` module for syntax highlighting https://github.com/Textualize/textual/pull/5966 - Added `MessagePump.wait_for_refresh` method https://github.com/Textualize/textual/pull/5966 - Added `Widget.container_scroll_offset` https://github.com/Textualize/textual/commit/e84600cfb31630f8b5493bf1043a4a1e7c212f7c - Added `Markdown.source` attribute to MarkdownBlocks https://github.com/Textualize/textual/commit/e84600cfb31630f8b5493bf1043a4a1e7c212f7c - Added extension mechanism to Markdown https://github.com/Textualize/textual/commit/e84600cfb31630f8b5493bf1043a4a1e7c212f7c - Added `index` to `ListView.Selected` event https://github.com/Textualize/textual/pull/5973 - Added `layout` switch to Static.update https://github.com/Textualize/textual/pull/5973 ### Fixed - Fixed `TextArea` issue with the `css` theme, where the background color was stuck from the previous theme https://github.com/Textualize/textual/issues/5964 ### Changed - Improved rendering of Markdown tables (replace Rich table with grid) which allows text selection https://github.com/Textualize/textual/pull/5962 - Change look of command palette, to drop accented borders https://github.com/Textualize/textual/pull/5966 - Some style tweaks to Markdown https://github.com/Textualize/textual/commit/e84600cfb31630f8b5493bf1043a4a1e7c212f7c - Content markup can now accept component classes when preceded by a dot, e.g. "Hello [.my_custo_style]World[/]!" https://github.com/Textualize/textual/pull/5981 - Breaking change: `Visual.render_strips` has a new signature. If you aren't explicitly building Visuals then this won't effect you. https://github.com/Textualize/textual/pull/5981 - Breaking change: The component classes on Markdown have been moved to MarkdownBlock. This won't affect you unless you have customize the Markdown CSS https://github.com/Textualize/textual/pull/5981 - The textual-speedups library will now be imported automatically if it is installed. Set `TEXTUAL_SPEEDUPS=0` to disable.