Commit Graph

5990 Commits

Author SHA1 Message Date
Dave Pearson
3c1a311a67 Update the Button docs to mention ButtonVariant
I'm not 100% sure how to get this into the docs as I'd like, and it seems
we've moved the API docs around a lot in respect to widgets, recently (I'm
aware of this but aren't sure what the new layout is yet).

This at least starts to get things into the right place.
2023-04-14 13:08:26 +01:00
Dave Pearson
8fe14e44da Update the CHANGELOG 2023-04-14 12:19:24 +01:00
Dave Pearson
3ce910f764 Add textual.widgets.button to expose ButtonVariant
See #2264.
2023-04-14 12:17:53 +01:00
Dave Pearson
bec01e99d1 Rebuild the FAQ
Keep forgetting to do this!
2023-04-14 12:11:45 +01:00
Dave Pearson
ee8153c9ed Update the centring FAQ to reference Center
See #2263.
2023-04-14 12:09:25 +01:00
darrenburns
898de5a69c Fix for empty ListView bindings not firing (#2281)
* Fix bindings not firing when ListView is empty

* Regression test for empty ListView bindings not working

* Update changelog
2023-04-13 15:32:56 +01:00
Will McGugan
5e50b2e417 optimization 2023-04-13 14:33:01 +01:00
Will McGugan
58b8d22a3c remove bell 2023-04-13 14:23:06 +01:00
Will McGugan
04b994836c Strips render optimization (#2278)
* WIP optimization

* optimization

* simplify, add comments

* docstring

* Update src/textual/_compositor.py

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

* Update src/textual/_compositor.py

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

* Update src/textual/strip.py

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

* Update src/textual/_compositor.py

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

* driver bell

* optimize render

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-04-13 14:15:32 +01:00
darrenburns
5246282c22 Improving data table documentation (#2279)
* Improving data table documentation

* More info on DataTable

* Add note on retrieving cursor coordinate

* Add note on DataTable supporting more than just strings

* Add note on cell styling and justifying - common question

* Slight rewording

* Explaining what "row labels" are.

* Update docs/widgets/data_table.md

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

* Update docs/widgets/data_table.md

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

* Update docs/widgets/data_table.md

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

* Update docs/widgets/data_table.md

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

* Update docs/widgets/data_table.md

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

* Update docs/widgets/data_table.md

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

* Update docs/widgets/data_table.md

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

* Update docs/widgets/data_table.md

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

* Improve data table fixed rows/columns docs

* Update some examples

---------

Co-authored-by: Will McGugan <willmcgugan@gmail.com>
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-04-13 14:09:19 +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
Rodrigo Girão Serrão
e32cdbb390 Merge pull request #2276 from Textualize/tabs-scroll-to-center
Scroll to center when tab is clicked.
2023-04-13 10:48:15 +01:00
Rodrigo Girão Serrão
5104cbe501 changelog 2023-04-12 22:28:48 +01:00
Rodrigo Girão Serrão
663b09736e Scroll to center when tab is clicked.
Related comment: https://github.com/Textualize/textual/issues/2256#issuecomment-1505551728
2023-04-12 22:25:37 +01:00
Will McGugan
c249548c43 Move responsibility for writing in to driver (#2273)
* Move responsibility for writing in to driver

* remove driver property

* optimization for segments

* force terminal

* Update src/textual/drivers/_writer_thread.py

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

* no safe box

* safe box false

* force null file

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-04-12 17:10:21 +01:00
darrenburns
6369c37907 Ensure styles applied in correct order in DataTable (#2272)
* Ensure styles applied in correct order in DataTable

* Add snapshot regression test for datatable style ordering

* Update CHANGELOG
2023-04-12 14:45:24 +01:00
Will McGugan
03fa641be7 Simplify driver (#2252)
* Simplify driver

* remove debug flag

* added set_terminal_size to driver

* restore flush

* Restore debug mode

* docstring

* fix parser

* simplify windows driver

* driver update

* annotations

* docstrings
2023-04-12 13:44:22 +01:00
Will McGugan
71becfc090 make Timer.start private 2023-04-12 13:42:57 +01:00
Will McGugan
2aa59f1ff0 changelog 2023-04-12 12:12:47 +01:00
Will McGugan
3c1898edeb don't return task 2023-04-12 12:08:22 +01:00
Will McGugan
f239bc1aa4 docstring 2023-04-12 12:05:24 +01:00
Will McGugan
2852c41597 exception docstring 2023-04-12 11:55:16 +01:00
Will McGugan
f81d76fcf0 docs 2023-04-12 11:43:36 +01:00
Will McGugan
7c25402c5d comment 2023-04-12 11:37:47 +01:00
Will McGugan
4ef070df66 docs 2023-04-12 11:22:19 +01:00
darrenburns
2bfe7df524 Add docstring to action_check_bindings (#2266)
* Add docstring to action_check_bindings

* Use action docstring convention
2023-04-12 11:16:59 +01:00
darrenburns
f95e30870b Tabbed content activated message (#2260)
* Add a message for the tabbed content activated

* Add a docstring

* Testing tabbed content activated message

* Update changelog

* Add reference to the docs about TabbedContent.TabActivated
2023-04-12 10:55:14 +01:00
darrenburns
6352ceb61b Datatable remove row (#2253)
* Checking in remove_row progress

* Ensuring structures updated correctly when row deleted

* Clamping index

* Failed attempt

* Removing rows

* Update a type hint in DataTable

* Remove some code that wasnt required

* Use index syntax instead of get

* Add DataTable remove row test

* Snapshot tests for removing rows

* Add a docstring for DataTable.remove_row method

* Update changelog regarding DataTable.remove_row

* Add check_idle call to remove_row
2023-04-11 18:48:58 +01:00
Will McGugan
13939499d9 implement single line comments (#2248) 2023-04-11 15:21:41 +01:00
Rodrigo Girão Serrão
48e8b510ba Merge pull request #2255 from Textualize/scroll_to_center
Add scroll_to_center method.
2023-04-11 15:20:38 +01:00
Rodrigo Girão Serrão
349f414dac Use Offset operators. 2023-04-11 14:51:59 +01:00
Rodrigo Girão Serrão
8fe9e97fd7 Restore deleted snapshot tests. 2023-04-11 14:23:45 +01:00
Rodrigo Girão Serrão
2588cfdb0d Update snapshot test. 2023-04-11 13:39:24 +01:00
Rodrigo Girão Serrão
454254fab4 Implement scroll_to_center method. 2023-04-11 13:36:34 +01:00
Rodrigo Girão Serrão
e87edd79cb Add test for scroll_to_center method. 2023-04-11 13:29:56 +01:00
Will McGugan
3c8f2ec4e9 map geometry 2023-04-10 21:57:20 +01:00
Will McGugan
af93a82fb1 fix byte example 2023-04-10 17:25:13 +01:00
Will McGugan
3d642e1c71 comments, made update_timer private 2023-04-10 17:10:04 +01:00
Will McGugan
4f7b2d00bc fix arrangement cache (#2249)
* fix arrangement cache

* changelog
v0.19.1
2023-04-10 16:50:34 +01:00
darrenburns
40cc2db3b9 Fix for viewport units, remove DataTable max-height (#2247)
* Add viewport units snapshot test

* Fix snapshot app

* Update snapshots

* Update DataTable max-height to 100%

* Update CHANGELOG.md

* Remove max height from DataTable CSS
2023-04-10 16:13:48 +01:00
Will McGugan
b8468fff98 docstrings 2023-04-10 11:03:24 +01:00
Will McGugan
bd6ec2be48 widget API docs 2023-04-10 09:50:52 +01:00
Will McGugan
9a1e645ccd docstring 2023-04-09 20:23:14 +01:00
Will McGugan
5f7a0beba4 docstrings 2023-04-09 20:20:38 +01:00
Will McGugan
a729ee644c docstring and private 2023-04-09 20:13:53 +01:00
Will McGugan
02452c36bd link actions 2023-04-09 19:04:08 +01:00
Will McGugan
aceee9ff72 docstring 2023-04-09 18:59:36 +01:00
Will McGugan
a4b0c469ba docstrings 2023-04-09 18:39:29 +01:00
Will McGugan
c9de67f7df docstrings, remove unused Color._rich__ 2023-04-09 18:07:42 +01:00
Will McGugan
5fe69b05aa more doc strings 2023-04-09 15:09:20 +01:00