Skip to content

Commit

Permalink
Merge branch 'main' into command-markup
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan authored Nov 27, 2024
2 parents abcd550 + 4e4b4ed commit 8e4ba84
Show file tree
Hide file tree
Showing 7 changed files with 245 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Fixed infinite loop in `Widget.anchor` https://github.com/Textualize/textual/pull/5290
- Restores the ability to supply console markup to command list https://github.com/Textualize/textual/pull/5294
- Fixed delayed App Resize event https://github.com/Textualize/textual/pull/5296

## [0.87.1] - 2024-11-24

Expand Down
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,49 @@ Try the [textual demo](https://github.com/textualize/textual-demo) *without* ins

Textual adds interactivity to [Rich](https://github.com/Textualize/rich) with an API inspired by modern web development.

Textual apps can use **16.7 million** colors with mouse support and smooth flicker-free animation.
A powerful layout engine, theming system, and re-usable [widgets](https://textual.textualize.io/widget_gallery/) makes it possible to build apps that rival the desktop and web experience. Here are just a few examples:

<table>

<tr>

<td>

![buttons](https://github.com/user-attachments/assets/2ac26387-aaa3-41ed-bc00-7d488600343c)

</td>

<td>

![tree](https://github.com/user-attachments/assets/61ccd6e9-97ea-4918-8eda-3ee0f0d3770e)

</td>

</tr>

<tr>

<td>

![datatables](https://github.com/user-attachments/assets/3e1f9f7a-f965-4901-a114-3c188bd17695)

</td>

<td>

![inputs](https://github.com/user-attachments/assets/b02aa203-7c37-42da-a1bb-2cb244b7d0d3)

</td>

</tr>

</table>

A powerful layout engine, theming system, and re-usable [widgets](https://textual.textualize.io/widget_gallery/) makes it possible to build apps that rival the desktop and web experience.

Great [documentation](https://textual.textualize.io/) and a [builtin testing framework](https://textual.textualize.io/guide/testing/) means that Textual apps can be maintained indefinitely.



## Installing

Install Textual via pip:
Expand All @@ -66,9 +102,11 @@ python -m textual
```


<!--
<img width="1348" alt="Screenshot of the Textual demo" src="https://github.com/user-attachments/assets/d30bc738-10ed-48c9-ac9d-8eac84b2da4a">
-->

## Documentation

Expand Down
6 changes: 3 additions & 3 deletions docs/widgets/markdown_viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ The following example displays Markdown from a string and a Table of Contents.

## Reactive Attributes

| Name | Type | Default | Description |
| ------------------------ | ---- | ------- | ----------------------------------------------------------------- |
| `show_table_of_contents` | bool | True | Wether a Table of Contents should be displayed with the Markdown. |
| Name | Type | Default | Description |
| ------------------------ | ---- | ------- | ------------------------------------------------------------------ |
| `show_table_of_contents` | bool | True | Whether a Table of Contents should be displayed with the Markdown. |

## Messages

Expand Down
3 changes: 3 additions & 0 deletions src/textual/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3067,6 +3067,9 @@ async def invoke_ready_callback() -> None:
try:
try:
await self._dispatch_message(events.Compose())
await self._dispatch_message(
events.Resize.from_dimensions(self.size, None)
)
default_screen = self.screen
self.stylesheet.apply(self)
await self._dispatch_message(events.Mount())
Expand Down
5 changes: 2 additions & 3 deletions src/textual/drivers/linux_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ def _stop_again(*_) -> None:
loop = asyncio.get_running_loop()

def send_size_event() -> None:
if self._in_band_window_resize:
return
terminal_size = self._get_terminal_size()
width, height = terminal_size
textual_size = Size(width, height)
Expand All @@ -231,7 +229,8 @@ def send_size_event() -> None:
self._writer_thread.start()

def on_terminal_resize(signum, stack) -> None:
send_size_event()
if not self._in_band_window_resize:
send_size_event()

signal.signal(signal.SIGWINCH, on_terminal_resize)

Expand Down
Loading

0 comments on commit 8e4ba84

Please sign in to comment.