Skip to content

Commit

Permalink
version bump (#2955)
Browse files Browse the repository at this point in the history
* version bump

* tweak toast style, release post

* snapshots
  • Loading branch information
willmcgugan authored Jul 17, 2023
1 parent 256e8ad commit ec58b91
Show file tree
Hide file tree
Showing 5 changed files with 272 additions and 180 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased
## [0.30.0] - 2023-07-17

### Added

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

### Fixed

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

[0.30.0]: https://github.com/Textualize/textual/compare/v0.29.0...v0.30.0
[0.29.0]: https://github.com/Textualize/textual/compare/v0.28.1...v0.29.0
[0.28.1]: https://github.com/Textualize/textual/compare/v0.28.0...v0.28.1
[0.28.0]: https://github.com/Textualize/textual/compare/v0.27.0...v0.28.0
Expand Down
80 changes: 80 additions & 0 deletions docs/blog/posts/release0-30-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
draft: false
date: 2023-07-17
categories:
- Release
title: "Textual 0.30.0 adds desktop-style notifications"
authors:
- willmcgugan
---

# Textual 0.30.0 adds desktop-style notifications

We have a new release of Textual to talk about, but before that I'd like to cover a little Textual news.

<!-- more -->

By sheer coincidence we reached [20,000 stars on GitHub](https://github.com/Textualize/textual) today.
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.
Thank you!

In other news: we moved office.
We are now a stone's throw away from Edinburgh Castle.
The office is around three times as big as the old place, which means we have room for wide standup desks and dual monitors.
But more importantly we have room for new employees.
Don't send your CVs just yet, but we hope to grow the team before the end of the year.

Exciting times.

## New Release

And now, for the main feature.
Version 0.30 adds a new notification system.
Similar to desktop notifications, it displays a small window with a title and message (called a *toast*) for a pre-defined number of seconds.

Notifications are great for short timely messages to add supplementary information for the user.
Here it is in action:

<div class="video-wrapper">
<iframe
width="560" height="315"
src="https://www.youtube.com/embed/HIHRefjfcVc"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
</div>

The API is super simple.
To display a notification, call `notify()` with a message and an optional title.

```python
def on_mount(self) -> None:
self.notify("Hello, from Textual!", title="Welcome")
```

## Textualize Video Channel

In case you missed it; Textualize now has a [YouTube](https://www.youtube.com/channel/UCo4nHAZv_cIlAiCSP2IyiOA) channel.
Our very own [Rodrigo](https://twitter.com/mathsppblog) has recorded a video tutorial series on how to build Textual apps.
Check it out!

<div class="video-wrapper">
<iframe
width="560" height="315"
src="https://www.youtube.com/embed/kpOBRI56GXM"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
</div>

We will be adding more videos in the near future, covering anything from beginner to advanced topics.

Don't worry if you prefer reading to watching videos.
We will be adding plenty more content to the [Textual docs](https://textual.textualize.io/) in the near future.
Watch this space.

As always, if you want to discuss anything with the Textual developers, join us on the [Discord server](https://discord.gg/Enf6Z3qhVr).
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "textual"
version = "0.29.0"
version = "0.30.0"
homepage = "https://github.com/Textualize/textual"
description = "Modern Text User Interface framework"
authors = ["Will McGugan <[email protected]>"]
Expand Down
13 changes: 9 additions & 4 deletions src/textual/widgets/_toast.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Toast(Static, inherit_css=False):
height: auto;
visibility: visible;
margin-top: 1;
padding: 1 2;
padding: 1 1;
background: $panel;
tint: white 5%;
}
Expand All @@ -49,24 +49,28 @@ class Toast(Static, inherit_css=False):
text-style: bold;
}
Toast {
border-right: wide $background;
}
Toast.-information {
border-left: tall $success;
border-left: wide $success;
}
Toast.-information .toast--title {
color: $success-darken-1;
}
Toast.-warning {
border-left: tall $warning;
border-left: wide $warning;
}
Toast.-warning .toast--title {
color: $warning-darken-1;
}
Toast.-error {
border-left: tall $error;
border-left: wide $error;
}
Toast.-error .toast--title {
Expand Down Expand Up @@ -139,6 +143,7 @@ class ToastRack(Container, inherit_css=False):
layout: vertical;
overflow-y: scroll;
margin-bottom: 1;
margin-right: 1;
}
"""

Expand Down
Loading

0 comments on commit ec58b91

Please sign in to comment.