You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Log messages could be written to stdout when there was no app, which could happen when using run_async or threads. Now they will be suppressed, unless the env var `TEXTUAL_DEBUG` is set https://github.com/Textualize/textual/pull/5782
22
+
23
+
### Added
24
+
25
+
- Added `:first-child` and `:last-child` pseudo classes https://github.com/Textualize/textual/pull/5776
26
+
- Added `toggle_class` parameter to reactives https://github.com/Textualize/textual/pull/5778
27
+
- Added `compact` parameter and reactive to `Button`, `Input`, `ToggleButton`, `RadioSet`, `OptionList`, `TextArea`https://github.com/Textualize/textual/pull/5778
28
+
- Added `HORIZONTAL_BREAKPOINTS` and `VERTICAL_BREAKPOINTS` to `App` and `Screen`https://github.com/Textualize/textual/pull/5779
29
+
30
+
### Changed
31
+
32
+
-`RadioSet` now has a default width of `1fr`https://github.com/Textualize/textual/pull/5778
Copy file name to clipboardExpand all lines: docs/guide/reactivity.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ You may want to add explicit type hints if the attribute type is a superset of t
65
65
66
66
## Smart refresh
67
67
68
-
The first superpower we will look at is "smart refresh". When you modify a reactive attribute, Textual will make note of the fact that it has changed and refresh automatically.
68
+
The first superpower we will look at is "smart refresh". When you modify a reactive attribute, Textual will make note of the fact that it has changed and refresh automatically by calling the widget's [`render()`][textual.widget.Widget.render] method to get updated content.
Copy file name to clipboardExpand all lines: docs/tutorial.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ Let's examine `stopwatch01.py` in more detail.
118
118
```
119
119
120
120
The first line imports `App` class, which is the base class for all Textual apps.
121
-
The second line imports two builtin widgets: [`Footer`](widgets/footer.md) which shows a bar at the bottom of the screen with bound keys, and [`Header`](widgets/header) which shows a title at the top of the screen.
121
+
The second line imports two builtin widgets: [`Footer`](widgets/footer.md) which shows a bar at the bottom of the screen with bound keys, and [`Header`](widgets/header.md) which shows a title at the top of the screen.
122
122
Widgets are re-usable components responsible for managing a part of the screen.
123
123
We will cover how to build widgets in this tutorial.
"""List of horizontal breakpoints for responsive classes.
484
+
485
+
This allows for styles to be responsive to the dimensions of the terminal.
486
+
For instance, you might want to show less information, or fewer columns on a narrow displays -- or more information when the terminal is sized wider than usual.
487
+
488
+
A breakpoint consists of a tuple containing the minimum width where the class should applied, and the name of the class to set.
489
+
490
+
Note that only one class name is set, and if you should avoid having more than one breakpoint set for the same size.
491
+
492
+
Example:
493
+
```python
494
+
# Up to 80 cells wide, the app has the class "-normal"
495
+
# 80 - 119 cells wide, the app has the class "-wide"
496
+
# 120 cells or wider, the app has the class "-very-wide"
"""List of vertical breakpoints for responsive classes.
503
+
504
+
Contents are the same as [`HORIZONTAL_BREAKPOINTS`][textual.app.App.HORIZONTAL_BREAKPOINTS], but the integer is compared to the height, rather than the width.
0 commit comments