v0.85.0

Textualize/textualv0.85.0Oct 25, 2024by willmcgugan

AI Summary

Major update refreshing the demo app and introducing new widgets like Link, Markdown improvements, and various CSS/Widget enhancements.

Key Highlights

  • Refreshed demo app (`python -m textual`)
  • New Link widget and Markdown auto-link opening
  • New Container Groups and Grid sizing improvements

Breaking Changes

  • Renamed `Screen.can_view` and `Widget.can_view` to `Screen.can_view_entire` and `Widget.can_view_entire`

New Features

  • Link widget
  • Markdown auto-link opening
  • App.DEFAULT_MODE
  • Containers.HorizontalGroup and VerticalGroup
  • Button.action parameter
  • immediate parameter to scroll methods
  • Screen.can_view_partial and Widget.can_view_partial
  • App.is_web property

Full Release Notes

This versions updates the demo app. The previous demo was written quite a while ago and needed a refresh. It's not *quite* finished (there are plenty more widgets to cover), but it is still a bug improvement over the old one.

```
python -m textual
```

Give it a shot, we think it is pretty fun to play with.

https://github.com/user-attachments/assets/6a1742ba-bdb1-4d2b-ab5c-0f9abaf4b503



There are a number of other updates in this release, and some under-the-hood changes for even smoother updates and optimizations. See below for the full list...

Enjoy!


## [0.85.0] - 2024-10-25

### Changed

- Grid will now size children to the maximum height of a row https://github.com/Textualize/textual/pull/5113
- Markdown links will be opened with `App.open_url` automatically https://github.com/Textualize/textual/pull/5113
- The universal selector (`*`) will now not match widgets with the class `-textual-system` (scrollbars, notifications etc) https://github.com/Textualize/textual/pull/5113
- Renamed `Screen.can_view` and `Widget.can_view` to `Screen.can_view_entire` and `Widget.can_view_entire` https://github.com/Textualize/textual/pull/5174

### Added

- Added Link widget https://github.com/Textualize/textual/pull/5113
- Added `open_links` to `Markdown` and `MarkdownViewer` widgets https://github.com/Textualize/textual/pull/5113
- Added `App.DEFAULT_MODE` https://github.com/Textualize/textual/pull/5113
- Added `Containers.HorizontalGroup` and `Containers.VerticalGroup` https://github.com/Textualize/textual/pull/5113
- Added `$`, `£`, `€`, `(`, `)` symbols to Digits https://github.com/Textualize/textual/pull/5113
- Added `Button.action` parameter to invoke action when clicked https://github.com/Textualize/textual/pull/5113
- Added `immediate` parameter to scroll methods https://github.com/Textualize/textual/pull/5164
- Added `textual._loop.loop_from_index` https://github.com/Textualize/textual/pull/5164
- Added `min_color` and `max_color` to Sparklines constructor, which take precedence over CSS https://github.com/Textualize/textual/pull/5174
- Added new demo `python -m textual`, not *quite* finished but better than the old one https://github.com/Textualize/textual/pull/5174
- Added `Screen.can_view_partial` and `Widget.can_view_partial` https://github.com/Textualize/textual/pull/5174
- Added `App.is_web` property to indicate if the app is running via a web browser https://github.com/Textualize/textual/pull/5128
- `Enter` and `Leave` events can now be used with the `on` decorator https://github.com/Textualize/textual/pull/5159

### Fixed

- Fixed glitchy ListView https://github.com/Textualize/textual/issues/5163