Skip to content

Commit ec58b91

Browse files
authored
version bump (#2955)
* version bump * tweak toast style, release post * snapshots
1 parent 256e8ad commit ec58b91

File tree

5 files changed

+272
-180
lines changed

5 files changed

+272
-180
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8-
## Unreleased
8+
## [0.30.0] - 2023-07-17
99

1010
### Added
1111

1212
- Added `DataTable.remove_column` method https://github.com/Textualize/textual/pull/2899
1313
- Added notifications https://github.com/Textualize/textual/pull/2866
14+
- Added `on_complete` callback to scroll methods https://github.com/Textualize/textual/pull/2903
1415

1516
### Fixed
1617

@@ -1117,6 +1118,7 @@ https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
11171118
- New handler system for messages that doesn't require inheritance
11181119
- Improved traceback handling
11191120

1121+
[0.30.0]: https://github.com/Textualize/textual/compare/v0.29.0...v0.30.0
11201122
[0.29.0]: https://github.com/Textualize/textual/compare/v0.28.1...v0.29.0
11211123
[0.28.1]: https://github.com/Textualize/textual/compare/v0.28.0...v0.28.1
11221124
[0.28.0]: https://github.com/Textualize/textual/compare/v0.27.0...v0.28.0

docs/blog/posts/release0-30-0.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
draft: false
3+
date: 2023-07-17
4+
categories:
5+
- Release
6+
title: "Textual 0.30.0 adds desktop-style notifications"
7+
authors:
8+
- willmcgugan
9+
---
10+
11+
# Textual 0.30.0 adds desktop-style notifications
12+
13+
We have a new release of Textual to talk about, but before that I'd like to cover a little Textual news.
14+
15+
<!-- more -->
16+
17+
By sheer coincidence we reached [20,000 stars on GitHub](https://github.com/Textualize/textual) today.
18+
Now stars don't mean all that much (at least until we can spend them on coffee), but its nice to know that twenty thousand developers thought Textual was interesting enough to hit the ★ button.
19+
Thank you!
20+
21+
In other news: we moved office.
22+
We are now a stone's throw away from Edinburgh Castle.
23+
The office is around three times as big as the old place, which means we have room for wide standup desks and dual monitors.
24+
But more importantly we have room for new employees.
25+
Don't send your CVs just yet, but we hope to grow the team before the end of the year.
26+
27+
Exciting times.
28+
29+
## New Release
30+
31+
And now, for the main feature.
32+
Version 0.30 adds a new notification system.
33+
Similar to desktop notifications, it displays a small window with a title and message (called a *toast*) for a pre-defined number of seconds.
34+
35+
Notifications are great for short timely messages to add supplementary information for the user.
36+
Here it is in action:
37+
38+
<div class="video-wrapper">
39+
<iframe
40+
width="560" height="315"
41+
src="https://www.youtube.com/embed/HIHRefjfcVc"
42+
title="YouTube video player"
43+
frameborder="0"
44+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
45+
allowfullscreen>
46+
</iframe>
47+
</div>
48+
49+
The API is super simple.
50+
To display a notification, call `notify()` with a message and an optional title.
51+
52+
```python
53+
def on_mount(self) -> None:
54+
self.notify("Hello, from Textual!", title="Welcome")
55+
```
56+
57+
## Textualize Video Channel
58+
59+
In case you missed it; Textualize now has a [YouTube](https://www.youtube.com/channel/UCo4nHAZv_cIlAiCSP2IyiOA) channel.
60+
Our very own [Rodrigo](https://twitter.com/mathsppblog) has recorded a video tutorial series on how to build Textual apps.
61+
Check it out!
62+
63+
<div class="video-wrapper">
64+
<iframe
65+
width="560" height="315"
66+
src="https://www.youtube.com/embed/kpOBRI56GXM"
67+
title="YouTube video player"
68+
frameborder="0"
69+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
70+
allowfullscreen>
71+
</iframe>
72+
</div>
73+
74+
We will be adding more videos in the near future, covering anything from beginner to advanced topics.
75+
76+
Don't worry if you prefer reading to watching videos.
77+
We will be adding plenty more content to the [Textual docs](https://textual.textualize.io/) in the near future.
78+
Watch this space.
79+
80+
As always, if you want to discuss anything with the Textual developers, join us on the [Discord server](https://discord.gg/Enf6Z3qhVr).

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "textual"
3-
version = "0.29.0"
3+
version = "0.30.0"
44
homepage = "https://github.com/Textualize/textual"
55
description = "Modern Text User Interface framework"
66
authors = ["Will McGugan <[email protected]>"]

src/textual/widgets/_toast.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Toast(Static, inherit_css=False):
4040
height: auto;
4141
visibility: visible;
4242
margin-top: 1;
43-
padding: 1 2;
43+
padding: 1 1;
4444
background: $panel;
4545
tint: white 5%;
4646
}
@@ -49,24 +49,28 @@ class Toast(Static, inherit_css=False):
4949
text-style: bold;
5050
}
5151
52+
Toast {
53+
border-right: wide $background;
54+
}
55+
5256
Toast.-information {
53-
border-left: tall $success;
57+
border-left: wide $success;
5458
}
5559
5660
Toast.-information .toast--title {
5761
color: $success-darken-1;
5862
}
5963
6064
Toast.-warning {
61-
border-left: tall $warning;
65+
border-left: wide $warning;
6266
}
6367
6468
Toast.-warning .toast--title {
6569
color: $warning-darken-1;
6670
}
6771
6872
Toast.-error {
69-
border-left: tall $error;
73+
border-left: wide $error;
7074
}
7175
7276
Toast.-error .toast--title {
@@ -139,6 +143,7 @@ class ToastRack(Container, inherit_css=False):
139143
layout: vertical;
140144
overflow-y: scroll;
141145
margin-bottom: 1;
146+
margin-right: 1;
142147
}
143148
"""
144149

0 commit comments

Comments
 (0)