Commit graph

516 commits

Author SHA1 Message Date
Will McGugan
5e898baa1b bindings 2024-05-17 19:18:54 +01:00
Will McGugan
c9828e5c2e snapshots 2024-05-17 17:55:32 +01:00
Will McGugan
ce93741ff6 typos 2024-05-17 17:44:02 +01:00
Will McGugan
e0942cf499 dynamic actions docs 2024-05-17 17:33:00 +01:00
Darren Burns
fdfe104dc4 Add note about inline-mode to the docs 2024-05-10 16:14:59 +01:00
Will McGugan
e4c57557f8 extra words 2024-05-08 17:08:13 +01:00
Dave Pearson
508cba63ce
Typo fix (s/are/is/) 2024-05-07 21:41:43 +01:00
Will McGugan
a9e87b59c0 query_one docs 2024-05-07 21:09:33 +01:00
TomJGooding
d788bcf771 docs: update TabActivated on decorator selector 2024-04-17 18:15:48 +01:00
Will McGugan
762bc36179 link to tqs 2024-04-09 10:12:16 +01:00
TomJGooding
bca7ea7eac docs(app): fix version inline mode was added 2024-04-01 13:44:35 +01:00
Will McGugan
2396905ac0
Merge pull request #4343 from Textualize/inline
inline driver
2024-03-30 13:34:15 +00:00
Will McGugan
18a556b605 tweak 2024-03-30 13:25:41 +00:00
Will McGugan
cc19158a9a inline docs 2024-03-30 13:21:29 +00:00
Will McGugan
95de754cd3 docs 2024-03-30 09:42:27 +00:00
Will McGugan
5606a40f07 don't make demo inline 2024-03-30 09:00:18 +00:00
Will McGugan
ea63e8e0b4 Note about run inline 2024-03-29 16:36:44 +00:00
Valentin Grégoire
f05d727c01
fix: Fix the fix to fix the typo 😵. 2024-03-28 09:22:55 +01:00
Valentin Grégoire
2a06e288ea
fix: Typo fixed. 2024-03-28 09:22:27 +01:00
TomJGooding
1060790470 docs(devtools): add worker to log groups 2024-02-27 21:26:11 +00:00
Darren Burns
e22f081876
Animation docs fix (#4226)
* Docstring fixes

* Hardcoding the animation steps to fix animation docs example

* Calling ease correctly
2024-02-27 16:38:18 +00:00
Will McGugan
f8be478ccb
Update docs/guide/reactivity.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2024-02-26 14:24:05 +00:00
Will McGugan
ba13c3c390
Update docs/guide/reactivity.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2024-02-26 14:23:55 +00:00
Will McGugan
14c5ac8dea redundant 2024-02-26 13:34:03 +00:00
Will McGugan
45e9cd6062 comma 2024-02-26 13:33:24 +00:00
Will McGugan
274c0f6c08 words 2024-02-25 18:30:42 +00:00
Will McGugan
3093d5297c recompose docs 2024-02-25 18:24:45 +00:00
Will McGugan
e701a8fad3 docs 2024-02-25 17:07:12 +00:00
TomJGooding
5aaa6b539c
docs: fix tcss syntax highlighting (#4176)
Sorry but I spotted that the syntax highlighting was wrong in my last PR to
add tcss to the docs (#4171) where I had blindly copy pasted the code.

A quick grep found a few other places in the docs where the syntax
highlighting was wrong. This PR corrects the language to css.
2024-02-21 08:37:56 +00:00
TomJGooding
c680bd7905 docs(events): add tcss to on decorator examples 2024-02-16 17:41:55 +00:00
Dave Pearson
3971449c16
Tidy up a suggested edit to the discover docs 2024-02-15 09:37:47 +00:00
Dave Pearson
efb8b48347
Tweak the layout of the discover description
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2024-02-15 09:28:45 +00:00
Dave Pearson
66c19fab01
Make it clear we're talking about discovery hits 2024-02-14 10:20:46 +00:00
Dave Pearson
4f6f15a066
Add a note about best practice of the user of discover 2024-02-14 10:08:54 +00:00
Dave Pearson
cbb44bb50c
Mention the discover method in the docs 2024-02-14 10:06:00 +00:00
Dave Pearson
a705c34965
Fix a case typo that already existed in the document 2024-02-14 10:05:38 +00:00
Will McGugan
f39a7c96d3
Update docs/guide/reactivity.md
Co-authored-by: Darren Burns <darrenburns@users.noreply.github.com>
2024-02-06 16:26:39 +00:00
Will McGugan
a817ecb999 docs 2024-02-06 14:58:07 +00:00
Will McGugan
f20515d4ae reactive docs 2024-02-06 14:30:27 +00:00
Will McGugan
fa8c0e8f95 fix refresh lines 2024-02-05 21:16:26 +00:00
TomJGooding
7c5f291704 docs(suspend): fix example highlighted lines 2024-02-01 17:06:58 +00:00
Dave Pearson
025ac85bb1
Add action_suspend_process to the list of builtin actions 2024-01-31 12:48:21 +00:00
Dave Pearson
1cd64f974f
Add a full app to show off action_suspend_process binding 2024-01-31 12:47:10 +00:00
Dave Pearson
c916a82934
Include the output of the suspend example in the docs 2024-01-31 11:36:14 +00:00
Dave Pearson
0003b52dcf
Celebrate vim in the docs
Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2024-01-31 11:09:44 +00:00
Dave Pearson
7fb59d1831
Docs wording tweak
Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2024-01-31 11:08:29 +00:00
Dave Pearson
d94c2f9da1
Improve a heading in the docs
Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2024-01-31 11:08:03 +00:00
Dave Pearson
3914215636
Simplify a caveat in the docs
Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2024-01-31 11:07:37 +00:00
Dave Pearson
dca798f574
Improve documentation
Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2024-01-31 11:06:55 +00:00
Dave Pearson
b73523ab8a
Remove Ctrl+Z as the default binding for suspending
While this is the convention/standard on Unix and Unix-like systems; adding
this as a default binding on App means that we sort of rob other
environments for this key combination. It also means that it's not so easy
for the developer to decide they *don't* want this enabled in their
application.

So here we swap to providing the action without providing a default binding
for it; while also suggesting and encouraging the appropriate binding.
2024-01-30 14:04:35 +00:00
Dave Pearson
e5accb2d4e
Start an App Basics section about suspending an app 2024-01-24 11:24:55 +00:00
Jose Riha
2983d6140a
Fix Pong's Paddle property in docs. (#4053)
Fixes #4033
2024-01-23 13:48:20 +00:00
Dave Pearson
f44f144bba
Fix a typo (#4025) 2024-01-15 16:45:47 +00:00
Rodrigo Girão Serrão
b848dbf7c0
Fix broken highlights. 2024-01-09 15:32:09 +00:00
Will McGugan
1e1b02398f words 2024-01-04 17:10:18 +00:00
Will McGugan
b2fe0a76c2
nested (#3946)
* nested

* remove debug

* patch scope

* fix nested

* docs

* clarification

* docstring

* fix test

* remove debug

* copy

* fix example

* wording

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
Co-authored-by: Dave Pearson <davep@davep.org>

* highlighting

* wording

* wording

* check errors

* type checking:

* extra errors

* extra test [skip ci]

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
Co-authored-by: Dave Pearson <davep@davep.org>
2024-01-04 15:07:43 +00:00
Will McGugan
e5f223156f
screen docs (#3955)
* screen docs

* Added push_screen_wait

* words and test

* overload typing

* docstring

* style tweak

* ws

* Update docs/guide/screens.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update docs/guide/screens.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update src/textual/app.py

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* merge fix

* wording

* wording [skipci]

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2024-01-04 13:52:41 +00:00
Rodrigo Girão Serrão
0e6769721b
Show TCSS as css instead of sass. 2023-12-20 17:11:30 +00:00
Jerry Wu
d6780f71cd
Update queries.md 2023-12-19 08:51:47 +08:00
Rodrigo Girão Serrão
bf7b70c456
Add note about . (#3873) 2023-12-15 10:24:33 +00:00
Rodrigo Girão Serrão
0099e496df
Update highlighted lines. (#3875) 2023-12-14 16:36:21 +00:00
Daniel Cook
bac7119539
resolves #3833 - change wording/grammar in the documentation for box-sizing (#3850) 2023-12-12 09:37:38 +00:00
Will McGugan
17726b6b77
docs (#3812) 2023-12-05 12:13:18 +00:00
Rodrigo Girão Serrão
9a9d534b6d
Document DOMNode.watch (#3724)
* Document DOMNode.watch

* Create standalone example.

Addresses review comment: https://github.com/Textualize/textual/pull/3724#pullrequestreview-1744357054.

* Create standalone example.

Addresses review comment: https://github.com/Textualize/textual/pull/3724#pullrequestreview-1744357054.
2023-11-27 13:44:26 +00:00
Will McGugan
c667c86107
Blur (#3645)
* added blur

* add blur pseudo class

* added blur psuedo class

* added test
2023-11-07 16:22:40 +00:00
Mark Olson
a9704fddfa
fix typo 'that' -> 'than' 2023-10-28 09:16:24 +02:00
Rodrigo Girão Serrão
32fc617803
Merge pull request #3511 from Textualize/action-docs-fixes
Minor fixes on the actions guide.
2023-10-24 11:52:37 +01:00
Will McGugan
0f0c4c020c doc tweak 2023-10-24 09:44:17 +01:00
Will McGugan
859cff3be3
CSS initial special value (#3566)
* CSS unset

* no need for panicked flag

* initial token

* initial token

* simplify initial token

* docstring

* defaults

* reset initial default

* typing hacks

* typing fix

* tests and docs

* Added xfail

* doc update

* changelog

* cache css

* fix for initial defaults

* Update src/textual/css/stylesheet.py

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update src/textual/css/stylesheet.py

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* restore arrange

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-10-23 13:38:18 +01:00
Will McGugan
e68e6e37b5 fix highlighted lines 2023-10-19 12:15:32 +01:00
Will McGugan
47af5e0402
Add loading reactive (#3509)
* Add loading reactive

* loading indicator example

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* into

* changelog

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-10-11 16:53:49 +01:00
Rodrigo Girão Serrão
924ff5fbd9
Minor fixes on the actions guide.
Thanks to #3456.

Co-authored-by: Steve Holden <steve@holdenweb.com>
2023-10-11 14:57:25 +01:00
Dave Pearson
d7b48c5f76
Remove an unnecessary a
Saw this in passing.
2023-10-03 10:27:32 +01:00
Adam K
89991025e9
Update widgets.md (#3433)
typo fix, missing "as" before "a".
2023-09-30 16:25:44 +01:00
Will McGugan
64703c04dd
interactive examples (#3418)
* interactive examples

* words

* remove log
2023-09-29 15:23:42 +01:00
Will McGugan
c8b388cd3d corrections pointed out by Darren 2023-09-22 18:41:32 +01:00
Will McGugan
c6bda703c2 testing words 2023-09-22 15:33:46 +01:00
Darren Burns
9c8a8df028
Snapshot testing guide (#3357)
* Snapshot testing guide

* Typo fixes

* Some more typo fixes

* Typo fixes

* Update docs/guide/testing.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Add clarifications, PR feedback

* Add clarifications, PR feedback

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-09-21 11:16:11 +01:00
Will McGugan
d204ba86b5
Scoped css (#3358)
* Scoped css

* snapshot tests

* selector

* Update docs/guide/widgets.md

Co-authored-by: Dave Pearson <davep@davep.org>

---------

Co-authored-by: Dave Pearson <davep@davep.org>
2023-09-21 09:58:59 +01:00
Will McGugan
b1dfd11568 fixed line numbers 2023-09-19 12:03:44 +01:00
Will McGugan
b99da2d6b9
Testing guide (#3329)
* testing docs

* words

* words

* testing doc

* Apply suggestions from code review

Co-authored-by: Gobion <1312216+brokenshield@users.noreply.github.com>

---------

Co-authored-by: Gobion <1312216+brokenshield@users.noreply.github.com>
2023-09-17 10:34:32 +01:00
Will McGugan
ea6bf766e7
Cp shutdown (#3303)
* change hotkey

* binding

* rename Source to Provider

* name change

* name changes

* words

* docstring

* system commands

* add icon click

* replace dim with muted

* log shutdown errors

* Update src/textual/screen.py

Co-authored-by: Dave Pearson <davep@davep.org>

* fix tests

* Wee bit more source->provider rewording

---------

Co-authored-by: Dave Pearson <davep@davep.org>
2023-09-14 15:21:51 +01:00
Will McGugan
5d6a95dec5
Command Palette tweaks and docs (#3289)
* renames to command palette and docs

* docs

* simplifyt

* note

* docstring

* Update src/textual/command.py

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update docs/examples/guide/command_palette/command01.py

Co-authored-by: Dave Pearson <davep@davep.org>

* populate text

* screen commands

* Update docs/guide/command_palette.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/guide/command_palette.md

Co-authored-by: Dave Pearson <davep@davep.org>

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
Co-authored-by: Dave Pearson <davep@davep.org>
2023-09-13 15:03:25 +01:00
Will McGugan
cbed79c7eb
Modes docs (#3233)
* Modes docs

* Added current mode

* fix docstring

* diagrams

* Update docs/guide/screens.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update docs/guide/screens.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* words

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-09-04 17:40:40 +01:00
Will McGugan
c63d8e05fa
return code docs (#3231)
* return code docs

* words

* words

* Update docs/guide/app.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/guide/app.md

Co-authored-by: Dave Pearson <davep@davep.org>

---------

Co-authored-by: Dave Pearson <davep@davep.org>
2023-09-04 14:03:25 +01:00
Will McGugan
d89871b045
update docs for tcss (#3179)
* update docs for tcss

* letter
2023-08-26 10:49:18 +01:00
Rodrigo Girão Serrão
5ee0ebfef4
Rename CSS files to TCSS.
Related issue: #3137.
2023-08-22 13:21:17 +01:00
Will McGugan
dda2cb2be2 auto grid docs and test 2023-08-17 10:46:57 +01:00
Will McGugan
a0be460921
border classvars (#3097)
* border classvars

* changelog

* copy

* remove whitespace

* copy
2023-08-15 10:34:24 +01:00
dmunozv04
52d0586f5d Fix doc links 2023-08-08 13:27:13 +02:00
Will McGugan
ba91b42215 ifix highlight line 2023-08-07 10:17:10 +01:00
Will McGugan
879c985296
Rich log (#3046)
* log

* tests

* snapshot tests

* change to richlog

* keep raw lines

* disable highlighting by default

* simplify

* superfluous test

* optimization

* update cell length

* add refresh

* write method

* version bump

* doc fix link

* makes lines private

* docstring

* relax dev dependancy

* remove superfluous code [skip ci]

* added FAQ [skipci]

* fix code in faq [skipci]

* fix typo

* max lines fix
2023-08-03 10:11:17 +01:00
Will McGugan
080437ce03 fix code highlight 2023-07-31 17:58:09 +01:00
Sepehr Shirkhanlu
5153fe6c92
Fix docs (#2932)
* Fix line highlighting in docs

* fix docs: remove duplicated code
2023-07-23 16:49:59 +01:00
Will McGugan
ed4eb2c7a7 copy 2023-07-23 16:14:29 +01:00
Will McGugan
381fde7212 update copy 2023-07-23 16:08:13 +01:00
Dave Pearson
17ae7175a5
Reword the text relating to the creation of thread workers 2023-07-13 14:08:56 +01:00
Dave Pearson
3b85382cb2
Add missing the (#2929)
Credit to ThatOtherAndrew on Discord.
2023-07-12 12:32:48 +01:00
Will McGugan
26573b9cff wrong package 2023-07-11 11:37:32 +01:00
Will McGugan
65e81c58be
Textual dev (#2884)
* WiP: Move the devtools and related code to `textual-dev` (#2834)

* Remove the textual script from the project file

This is moving into the textual-dev package.

* Remove the textual CLI code from Textual

This has all gone to live in textual-dev.

* Remove the devtools testing from Textual's unit tests

They've moved over to textual-dev instead.

* Remove the devtools server from Textual itself

The start of the process to remove as much of the core devtools as possible
from Textual.

* Switch the console docs example screenshot over to textual_dev

* Remove rednerables.py from Textual

* Remove the last parts of devtools from Textual

This is the last step. It remains to be seen if this is sustainable, but for
testing purposes this is the extreme case we're aiming for. I *think* this
will work though.

Hereon we'll be needing to do an editable install of textual-dev into
textual, and more generally and once this is "live" we'll be needing to make
sure that textual[dev] is installed when doing development work on textual
apps.

The thing that remains to be seen however is how this all works
with *developing* Textual itself. Will I always need to do an editable
install? Still got to figure that one out.

* Start to whittle down the pyproject file

The next step is to try and work out what can come out of the pyproject
file.

* Remove aiohttp from Textual

* Remove some more development dependencies we don't need any more

* Relock

* Remove the pointer to the previews directory

* Reintroduce the border preview snapshot test

* Reintroduce the color preview snapshot test

* Reinstate the key press for the border preview snapshot test

* Reintroduce the easing preview snapshot test

* Reintroduce the keys tool snapshot test

* Add pytest-asyncio as a development dependency

* Relock

* Pin the textual-dev version to 0.1.0 or later

Mostly to try and get the tests kicked off properly.

* Relock dependencies

* Further `textual-dev` changes (#2850)

* Remove the textual script from the project file

This is moving into the textual-dev package.

* Remove the textual CLI code from Textual

This has all gone to live in textual-dev.

* Remove the devtools testing from Textual's unit tests

They've moved over to textual-dev instead.

* Remove the devtools server from Textual itself

The start of the process to remove as much of the core devtools as possible
from Textual.

* Switch the console docs example screenshot over to textual_dev

* Remove rednerables.py from Textual

* Remove the last parts of devtools from Textual

This is the last step. It remains to be seen if this is sustainable, but for
testing purposes this is the extreme case we're aiming for. I *think* this
will work though.

Hereon we'll be needing to do an editable install of textual-dev into
textual, and more generally and once this is "live" we'll be needing to make
sure that textual[dev] is installed when doing development work on textual
apps.

The thing that remains to be seen however is how this all works
with *developing* Textual itself. Will I always need to do an editable
install? Still got to figure that one out.

* Start to whittle down the pyproject file

The next step is to try and work out what can come out of the pyproject
file.

* Remove aiohttp from Textual

* Remove some more development dependencies we don't need any more

* Relock

* Remove the pointer to the previews directory

* Reintroduce the border preview snapshot test

* Reintroduce the color preview snapshot test

* Reinstate the key press for the border preview snapshot test

* Reintroduce the easing preview snapshot test

* Reintroduce the keys tool snapshot test

* Add pytest-asyncio as a development dependency

* Relock

* Pin the textual-dev version to 0.1.0 or later

Mostly to try and get the tests kicked off properly.

* Relock dependencies

* Whitespace cleaning

* Swap mentions of textual[dev] to textual-dev

* Remove the dev extra

* Tweak README.md in response to PR review

* Tweak animation.md in response to PR review

* Tweak getting_started.md in response to PR review

* bump version

* lock

* drop dev

* more

* version bump

---------

Co-authored-by: Dave Pearson <davep@davep.org>
2023-07-03 15:37:40 +01:00
Dave Pearson
8c105fb373
Fix a broken link to the Worker class (#2816) 2023-06-21 10:44:59 +01:00
Dave Pearson
755da5e969
Merge pull request #2722 from davep/docs-auto-focus-borkage-fix
Fix various screenshots in the docs, broken by the addition of `AUTO_FOCUS`
2023-06-06 11:55:05 +01:00
claws
bfef40a806
Fix typo (#2729) 2023-06-04 12:56:20 +01:00
Dave Pearson
269f2446be
Remove tab presses from compound widgets examples post-AUTO_FOCUS
See #2720.
2023-06-02 07:14:22 +01:00
Dave Pearson
2f1422049f
Remove tab presses from input focus guide post-AUTO_FOCUS
See #2720. I'm not 100% sure about this one; I don't think it's been
modified since the AUTO_FOCUS change was made, so I believe this will be
restoring the example to its intended state.
2023-06-02 07:11:04 +01:00
Dave Pearson
955fb7363a
Remove tab presses from reactivity guide post-AUTO_FOCUS
See #2720. While there wasn't a problem here, there's no point in having
those there any more as the fields will have focus to start with.
2023-06-02 07:00:50 +01:00
Will McGugan
149c39c86c
Tooltips (#2670)
* inflect

* diagram

* tooltip render

* tooltip property

* add guard

* tooltip docs

* docs

* tidy, fix horizontal

* words, removed comment

* fix screenshot render

* simplify

* simfplify

* changelog

* simplify optimize

* inflect tests

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* docstring

* disable auto focus

* should be fraction

* optimization

* snapshot update

* Update tests/snapshot_tests/snapshot_apps/scroll_to_center.py

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-05-30 16:14:31 +01:00
Will McGugan
1ea892b062
handler name in classvar (#2675)
* handler name in classvar

* fix for worker handler name

* fix custom templates, event docs

* doc tweak

* doc tweak

* restore signature
2023-05-28 14:56:18 +01:00
Dave Pearson
718760dcb1
Fix some assorted documentation cross-references
Couple or so things I noticed while working on docs.
2023-05-24 15:53:56 +01:00
Will McGugan
faa67a8293
Screen docs (#2579)
* screen docs

* docstrings

* modal example

* docstring

* docstrings

* Apply suggestions from code review

Co-authored-by: Dave Pearson <davep@davep.org>

---------

Co-authored-by: Dave Pearson <davep@davep.org>
2023-05-16 13:44:06 +01:00
Rodrigo Girão Serrão
855c90d4f0
Extend @on decorator to filter matchable attributes (#2498)
* Add tests for #2484.

* Implement @on extension.

[skip ci]
Related issues: #2484.

* Changelog.

* Add missing @on test.

* Remove debug prints.

* Document changes.

* Update tests.

Test now fully works, as of #2490.

* Cache parsed selectors.

* Streamline exit condition.

* Fix typing.

* More succint wording.

* Document 'on' kwargs.

* Update src/textual/_on.py

Co-authored-by: Will McGugan <willmcgugan@gmail.com>

* Update docs/guide/events.md

Co-authored-by: Will McGugan <willmcgugan@gmail.com>

* Change 'on' API.

* Remove example code.

* Address feedback.

* Update src/textual/_on.py

Co-authored-by: Will McGugan <willmcgugan@gmail.com>

* Address review feedback.

* Fix #2499.

* don't require control to be manually specified

* update docstring

* deleted words

---------

Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2023-05-08 17:30:07 +01:00
Will McGugan
e5c54a3683
blog post (#2465)
* blog posts

* fix typo

* word

* version bump

* changelog

* update words
2023-05-03 13:22:22 +01:00
Will McGugan
91a9d570a4
On decorator (#2453)
* Add on decorator

* decorator code

* docs for on decorator

* Examples

* test errors

* simplify listing

* words

* changelog

* Update docs/guide/events.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/guide/events.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/examples/events/on_decorator.css

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update docs/guide/events.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* rewording

* comment

* clarification

* Added note

---------

Co-authored-by: Dave Pearson <davep@davep.org>
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-05-02 16:17:40 +01:00
Will McGugan
e1a8f28f8d
update to log docs (#2451) 2023-05-02 10:09:32 +01:00
Will McGugan
7c696ce378
Updated docs for app.run (#2414)
* fix run app from python

* updated run

* remove function

* update help

* doc update
2023-04-28 10:47:24 +01:00
Dave Pearson
b14b3b9e39
Expand the builtin action list in the docs 2023-04-24 15:12:51 +01:00
Rodrigo Girão Serrão
bb2c31ba35
Add --port option to textual console. (#2258)
* Add --port option to textual console.

* Changelog.

* Address review feedback.

* Mark unpredictable test as xfail.

This test gets an xfail mark until #2254 is open.

* Make DEVTOOLS_PORT a constant.

Related review: https://github.com/Textualize/textual/pull/2258\#discussion_r1165210395

* Factor logic into function.

Related review: https://github.com/Textualize/textual/pull/2258\#discussion_r1165298259

* Remove dead import.
2023-04-13 11:57:35 +01:00
Will McGugan
79ebbff933 typo 2023-04-07 12:58:58 +01:00
Will McGugan
074bfd7e2f Headings 2023-04-07 11:56:00 +01:00
Will McGugan
94279ae1f9 docs fix 2023-04-07 11:35:59 +01:00
Will McGugan
e4b45ba63f
docs on await mount (#2235) 2023-04-07 09:46:27 +01:00
Alex
f3f065d147
docs: Fix some typo (#2216) 2023-04-05 10:11:27 +01:00
Will McGugan
b5689b1f69
Worker API (#2182)
* worker class

* worker API tests

* tidy

* Decorator and more tests

* type fix

* error order

* more tests

* remove active message

* move worker manager to app

* cancel nodes

* typing fix

* revert change

* typing fixes and cleanup

* revert typing

* test fix

* cancel group

* Added test for worker

* comment

* workers docs

* Added exit_on_error

* changelog

* svg

* refactor test

* remove debug tweaks

* docstrings

* worker test

* fix typing in run

* fix 3.7 tests

* blog post

* fix deadlock test

* words

* words

* words

* workers docs

* blog post

* Apply suggestions from code review

Co-authored-by: Dave Pearson <davep@davep.org>

* docstring

* fix and docstring

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update src/textual/widgets/_markdown.py

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update src/textual/worker.py

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Fix black

* docstring

* merge

* changelog

---------

Co-authored-by: Dave Pearson <davep@davep.org>
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-04-04 13:12:51 +01:00
Will McGugan
a75b7cd088 verbosity doc paragraph 2023-03-29 10:22:38 +01:00
Dave Tapley
1dc24222ff
Document log groups and console -x (#2161) (#2162)
https://github.com/Textualize/textual/discussions/2161

Groups as of:
ab0de0139c/src/textual/_log.py (L4-L15)
2023-03-29 10:20:21 +01:00
Will McGugan
73f065bbbd
Logging handler (#2151)
* logging handler

* changelog

* remove logging experiment

* handler

* fix

* docs for logging handler
2023-03-28 11:50:28 +01:00
Will McGugan
0940546aab
compositor refactor and transparent screens (#2139)
* compositor refactor and trasparent screens

* multuple layers

* catch screen stack error

* refinement

* error messages

* capture screen stack

* new border type

* Background screen

* borders and bindings

* snapshot

* screen docs

* fix for missing screens

* screens docs

* fix for non updating transparent screens

* fix background resize

* changelog

* copy

* superfluous function

* update diagram

* inline code

* Update CHANGELOG.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update docs/guide/screens.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* superfluous file

* Explicit None

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* docstring

* update docstring

* docstring make property private

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* docstring

* update docstring

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* docstrings

* remove comment, add docstring

* Apply suggestions from code review

Co-authored-by: Dave Pearson <davep@davep.org>

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
Co-authored-by: Dave Pearson <davep@davep.org>
2023-03-27 16:44:58 +01:00
Rodrigo Girão Serrão
2a810f8c87
Implement border (sub)title. (#2064)
* Add Widget.border_title and border_subtitle.

Related issues: #1864

* Test setting border_(sub)title.

* Add border (sub)title references to StylesCache.

These internal references will make it easier for the instance of 'StylesCache' to know which border (sub)title to use, if/when needed.

* Add method to render border label.

* Add styles to align border (sub)title.

* Render border labels.

* Update styles template.

* Make new 'render_row' parameters optional.

* Add (sub)title border snapshot tests.

* Document border (sub)title and styles.

* Pass (sub)title directly as arguments.

Get rid of the watchers to make data flow easier to follow.
Related comment: https://github.com/Textualize/textual/pull/2064/files\#r1137746697

* Tweak example.

* Fix render_border_label.

This was wrong because border labels can be composed of multiple segments if they contain multiple styles. Additionally, we want to render a single blank space of padding around the title.

* Ensure we get no label when there's no space.

* Add tests for border label rendering.

* 'render_border_label' now returns iterable of segments.

* Add label to render_row.

* Fix calling signature in tests.

* Add padding to snapshot tests.

* Fix changelog.

* Update snapshot tests.

* Update snapshot tests.

* Border labels expand if there's no corners.

* Update CHANGELOG.md

* Fix docs.

* Remove irrelevant line.

* Fix snapshot tests.

* Don't share Console among tests.

* Simplify example in styles guide.

* Avoid expensive function call when possible.

* rewording

* positive branch first

* remove wasteful indirection

* fix changelog

---------

Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2023-03-22 11:07:38 +00:00
Will McGugan
04340bd0ba
new post (#2069)
* new post

* Update docs/blog/posts/await-me-maybe.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update docs/blog/posts/await-me-maybe.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update docs/blog/posts/await-me-maybe.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/blog/posts/await-me-maybe.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* words

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
Co-authored-by: Dave Pearson <davep@davep.org>
2023-03-15 16:49:12 +00:00
Rodrigo Girão Serrão
f9a1e27c6f Merge branch 'main' into add-containers
[skip ci]
2023-03-13 16:21:46 +00:00
Will McGugan
b0f5c35782
tabs widget (#2020)
* tabs widget

* click underline

* color tweak

* docs

* docs update

* expose Tab

* added remove_tab and clear

* fix cycling

* add animation

* docs

* changelog

* remove recompose

* docstrings

* Update docs/guide/actions.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Rodrigoed the tabs

* Update docs/widgets/tabs.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update docs/widgets/tabs.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* copy

* docstrings

* docstring

* docstring

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* stop click

* docstring

* auto assign consistent IDs

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Document bindings

* document bindings

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-03-13 14:39:15 +00:00
Rodrigo Girão Serrão
cc8f65259e Merge branch 'main' into add-containers 2023-03-13 12:00:08 +00:00
Rodrigo Girão Serrão
0e51520a2c Make docs comply with new containers. 2023-03-13 11:44:47 +00:00
Dave Pearson
e6f620db44
Remove underscore pauses from (hopefully) all snapshots
This seeks to remove the "_" from the key presses of snapshots and inline
runs in the documentation. The "_" no longer does anything, but got legacy
reasons at the moment we can't actually allow "_" to be an input to a
"faked" keypress in the docs and snapshots.

Removing these clears the way to letting "_" have the same status as any
other character.

See #1994.
2023-03-09 20:32:27 +00:00
Rodrigo Girão Serrão
8565d3cef6 Renamed 'Vertical' to 'VerticalScroll'.
Related issues: #1957.
2023-03-08 18:31:24 +00:00
Will McGugan
864931e94b
Compound docs (#1952)
* compound example

* update bit switch

* prevent

* no css

* compound widget example

* more diagrams

* more diagrams

* diagrams

* words

* words

* remove sender

* removed priority post

* timer fix

* test fixes

* drop async version of post_message

* extended docs

* fix no app

* Added control properties

* changelog

* changelog

* changelog

* fix for stopping timers

* changelog

* docs update

* last byte example

* new section

* update of byte03

* updae to docs

* Added compound examples

* Rewording

* Use set sender

* don't need this

* hyphens

* Update docs/guide/widgets.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/guide/widgets.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/guide/widgets.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/guide/widgets.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/guide/widgets.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/guide/widgets.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/guide/widgets.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update docs/guide/widgets.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update docs/guide/widgets.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update docs/guide/widgets.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* parenthesis

* stack diagram

---------

Co-authored-by: Dave Pearson <davep@davep.org>
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-03-06 16:56:24 +00:00
Will McGugan
373fc95fc1
Drop explicit sender attribute from messages (#1940)
* remove sender

* removed priority post

* timer fix

* test fixes

* drop async version of post_message

* extended docs

* fix no app

* Added control properties

* changelog

* changelog

* changelog

* fix for stopping timers

* changelog

* added aliases to radio and checkbox

* Drop sender from Message init

* drop time

* drop cast

* Added aliases
2023-03-06 10:52:34 +00:00
Dave Pearson
f9e7c80256
Highlight that the label acquires an id in the example code
While the code here isn't exactly written as a play-along tutorial, it's
reasonable to expect that some one can and will. This commit has been
written because exactly that situation happened.

The problem here is without the ID on the label the layout will end up
looking very different from that shown in the docs; which will halt the
reader's flow as they try and figure out what they did wrong.

Counterpoint: this is a guide, not a tutorial, so it seemed reasonable to
only highlight the important thing that's changing. Personally I think I'd
argue in favour of highlighting all the changes from question01 to
question02.

Addresses #1905.
2023-03-01 09:05:07 +00:00
Will McGugan
5b1cba1d85 update to copy 2023-02-26 12:31:50 +00:00
Will McGugan
bc620fd46f remove highlighted line 2023-02-26 12:24:39 +00:00
Will McGugan
da1a820565 highlight lines 2023-02-26 12:08:18 +00:00
Will McGugan
b23fbd9be8 words 2023-02-26 10:36:17 +00:00
Will McGugan
9c1f6f7fad Added docs for the new compose method 2023-02-26 10:34:30 +00:00
Will McGugan
0999114811
Update docs/guide/events.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-02-24 12:02:20 +00:00
Will McGugan
b2ab5b6886 docs 2023-02-23 21:36:33 +00:00
Will McGugan
2ee61f95db Docs 2023-02-23 14:37:47 +00:00
Dave Pearson
257fe7b30a
Add enabled and disabled pseudo-classes
Note that this doesn't touch the application of stylesheets yet, in terms of
things like specificity; this just makes sure that the classes exist and can
be seen.
2023-02-13 12:56:52 +00:00
Dave Pearson
ddb2579168
Merge branch 'main' into package-docs 2023-02-08 11:40:15 +00:00
Will McGugan
1b050ea8b7
Merge pull request #1738 from Textualize/emit-start-with-self
Change emit to post to self.
2023-02-08 11:37:43 +00:00
Rodrigo Girão Serrão
e5e7c08afe Update docs accordingly. 2023-02-08 10:53:51 +00:00