Skip to content

Commit 56b8dbe

Browse files
committed
words
1 parent 14c6874 commit 56b8dbe

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

docs/blog/posts/release1.0.0.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ draft: true
33
date: 2024-12-05
44
categories:
55
- Release
6-
title: "There can be only one (point zero)"
6+
title: "Three algorithms for a high performance terminal apps"
77
authors:
88
- willmcgugan
99
---
@@ -19,9 +19,8 @@ I've had the fortune of being able to work fulltime on a FOSS project for the la
1919

2020
Textual has been a constant source of programming challenges.
2121
Often frustrating but never boring, the challenges arise because the terminal "specification" says nothing about how to build a modern User Interface.
22-
The building blocks are there.
23-
After some effort you can move the cursor, write colored text, read keys and mouse coordinates, but that's about it.
24-
Everything else we had to build from scratch: from the most basic [button](https://textual.textualize.io/widget_gallery/#button) to a syntax highlighted [TextArea](https://textual.textualize.io/widget_gallery/#textarea), and everything along the way.
22+
The building blocks are there: after some effort you can move the cursor, write colored text, read keys and mouse movements, but that's about it.
23+
Everything else we had to build from scratch, from the most basic [button](https://textual.textualize.io/widget_gallery/#button) to a syntax highlighted [TextArea](https://textual.textualize.io/widget_gallery/#textarea), and everything along the way.
2524

2625
I wanted to write-up some of the more interesting solutions we came up with for a while.
2726
The 1.0 milestone we just passed makes this the perfect time.
@@ -62,7 +61,7 @@ If that were the case, we could use [painter's algorithm](https://en.wikipedia.o
6261
In other words, sort them back to front and render them as though they were bitmaps.
6362

6463
Unfortunately the terminal is *not* a true grid.
65-
Some characters such as CJK (Chinese, Japanese, and Korean) and many emoji are double the width of latin alphabet characters — which complicates things (to put it mildly).
64+
Some characters such as those in Asian languages and many emoji are double the width of latin alphabet characters — which complicates things (to put it mildly).
6665

6766
Textual's way of handling this is inherited from [Rich](https://github.com/Textualize/rich).
6867
Anything you print in Rich, first generates a list of [Segments](https://github.com/Textualize/rich/blob/master/rich/segment.py) which consist of a string and associated style.
@@ -168,7 +167,7 @@ Not all of which widgets may be visible in the final view (if they are within a
168167

169168
While it is possible to have a widget as small as a single character, I've never found a need for one.
170169
The closest we get in Textual is a [scrollbar corner](https://textual.textualize.io/api/scrollbar/#textual.scrollbar.ScrollBarCorner);
171-
a widget which exists to fil the space made when a vertical scrollbar and a horizontal scrollbar meet.
170+
a widget which exists to fill the space made when a vertical scrollbar and a horizontal scrollbar meet.
172171
It does nothing because it doesn't need to, but it is powered by an async task like all widgets and can receive input.
173172
I have often wondered if there could be something useful in there.
174173
A game perhaps?
@@ -219,7 +218,7 @@ At the end of that process we have a dict that maps every grid coordinate on to
219218
```
220219

221220
This data is cacheable.
222-
If the widgets don't change position or size, such as the user is *scrolling*, then we can reuse the information.
221+
If the widgets don't change their position or size such as when user is *scrolling*, then we can reuse the information.
223222

224223
### Search the grid
225224

0 commit comments

Comments
 (0)