Skip to content

Commit

Permalink
Merge branch 'main' into widget-doc-sweep
Browse files Browse the repository at this point in the history
  • Loading branch information
davep committed Mar 1, 2023
2 parents af6d56c + a283689 commit cf34e5e
Show file tree
Hide file tree
Showing 6 changed files with 307 additions and 138 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Added `RadioButton` https://github.com/Textualize/textual/pull/1872
- Added `RadioSet` https://github.com/Textualize/textual/pull/1872

### Changed

- Widget scrolling methods (such as `Widget.scroll_home` and `Widget.scroll_end`) now perform the scroll after the next refresh https://github.com/Textualize/textual/issues/1774

### Fixed

- Scrolling with cursor keys now moves just one cell https://github.com/Textualize/textual/issues/1897

### Fixed

- Fix exceptions in watch methods being hidden on startup https://github.com/Textualize/textual/issues/1886
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@ setup:
.PHONY: update
update:
poetry update

.PHONY: install-pre-commit
install-pre-commit:
$(run) pre-commit install
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ So, thanks to this bit of code in my `Activity` widget...
self.save_activity_list()
```

!!! warning

The code above used `emit_no_wait`. Since this blog post was first
published that method has been removed from Textual. You should use
[`post_message_no_wait` or `post_message`](/guide/events/#sending-messages) instead now.

### Pain points

On top of the issues of getting to know terminal-based-CSS that I mentioned
Expand Down
6 changes: 5 additions & 1 deletion docs/guide/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,14 @@ The chapter on [Textual CSS](CSS.md) describes how to use CSS in detail. For now

The following example enables loading of CSS by adding a `CSS_PATH` class variable:

```python title="question02.py" hl_lines="6"
```python title="question02.py" hl_lines="6 9"
--8<-- "docs/examples/app/question02.py"
```

!!! note

We also added an `id` to the `Label`, because we want to style it in the CSS.

If the path is relative (as it is above) then it is taken as relative to where the app is defined. Hence this example references `"question01.css"` in the same directory as the Python code. Here is that CSS file:

```sass title="question02.css"
Expand Down
Loading

0 comments on commit cf34e5e

Please sign in to comment.