Commit Graph

1088 Commits

Author SHA1 Message Date
Kim van Wyk
dea21a00ca minor typo (#2515) 2023-05-08 20:01:45 +01:00
Will McGugan
cf7e8a9cb1 update roadmap 2023-05-08 18:10:40 +01:00
Will McGugan
dc102563e9 changelog and release post (#2513)
* changelog and release post

* fix version

* link Select

* remove superfluous css

* Update docs/blog/posts/release2-24-0.md

Co-authored-by: darrenburns <darrenburns@users.noreply.github.com>

* Update docs/blog/posts/release2-24-0.md

Co-authored-by: darrenburns <darrenburns@users.noreply.github.com>

---------

Co-authored-by: darrenburns <darrenburns@users.noreply.github.com>
2023-05-08 17:45: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
Rodrigo Girão Serrão
8059e5c1a7 Merge branch 'main' into messages-control 2023-05-08 11:18:43 +01:00
Will McGugan
7db7139bb8 Select widget (#2501)
* overlay rule

* select WIP

* select control, made binding description optional

* changelog

* style tweak

* Added constrain

* changelog

* test fix

* drop markup, tidy

* tidy

* select namespace

* tests

* docs

* Added changed event

* changelog

* expanded

* tests and snapshits

* examples and docs

* simplify

* update reactive attributes

* type fix

* docstrings

* allow renderables

* superfluous init

* typing fix

* optimization

* revert optimizations

* fixed words

* changelog

* docstrings

* don't need this

* changelog

* comment

* Update docs/widgets/select.md

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

* review changes

* review updates

---------

Co-authored-by: Dave Pearson <davep@davep.org>
2023-05-08 10:55:39 +01:00
Dave Pearson
8be87d5931 Merge branch 'main' into add-options 2023-05-07 18:06:57 +01:00
Dave Pearson
630f59dbd4 Remove unnecessary imports from example in docs
Perhaps a hangover from a previous take on this, or just a copy/paste-o.
Either way I just noticed this so thought I'd roll it in here.
2023-05-07 17:52:55 +01:00
Rodrigo Girão Serrão
14b70b0819 Add control to option list messages. 2023-05-04 18:53:29 +01:00
Rodrigo Girão Serrão
c4eda48a0a Tweaks to DataTable docs. (#2481)
* Tweaks to DataTable docs.

Related PRs: #2479.

* Fix link.
2023-05-04 14:55:14 +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
aedac6a9b9 update roadmap 2023-05-02 16:20:16 +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
Rodrigo Girão Serrão
914e50a70f Export types & doc improvements (#2329)
* Export types used in app.py

* Export more linked types/errors/classes.

* Remove custom template.

* Address review comments.

We need to have explicit 'Returns:' sections in properties if we want to link to the return type while https://github.com/mkdocstrings/python/issues/65 is open.

* Improve docs.
2023-05-02 15:12:53 +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
Will McGugan
55e198767f Add progress bar to gallery (#2399)
* Add progress bar to gallery

* table fix
2023-04-27 11:37:53 +01:00
Rodrigo Girão Serrão
4148b1d450 Implement a Progress Bar widget. (#2333)
* First prototype of PB.

* Repurpose UnderlineBar.

* Factor out 'Bar' widget.

* Revert "Factor out 'Bar' widget."

This reverts commit 0bb4871adf.

* Add Bar widget.

* Cap progress at 100%.

* Add skeleton for the ETA label.

[skip ci]

* Add ETA display.

* Improve docstrings.

* Directly compute percentage.

* Watch percentage changes directly.

[skip ci]

* Documentation.

* Make reactive percentage private.

Instead, we create a public read-only percentage property.

* Update griffe to fix documentation issue.

Related issues: #1572, https://github.com/mkdocstrings/griffe/issues/128.
Related PRs: https://github.com/mkdocstrings/griffe/pull/135.

* Add example and docs.

* Address review feedback.

[skip ci]

* More documentation.

* Add tests.

* Changelog.

* More tests.

* Fix/fake tests.

* Final tweaks.
2023-04-26 15:25:39 +01:00
Will McGugan
f53c3cd589 container refactor (#2377)
* container refactor

* Rearrange css

* changelog

* try timer updates

* force update

* sleep idle

* Restore updates
2023-04-26 13:36:08 +01:00
Dave Pearson
c45f9358ee Change RadioSet so it's less a container of widgets and more a widget
Initially we went with a RadioSet being a simple container of RadioButtons,
with the user navigating the RadioButtons like you would any other set of
widgets. This was fine but it became pretty clear pretty quickly that having
to tab through a non-trivial collection of buttons in a set to get to the
next widget wasn't ideal.

This commit, satisfying #2368, takes over the navigation of the buttons
within the container, makes the container itself a focusable widget, and
sets up some new bindings to allow a more natural and efficient interaction
with the set.
2023-04-25 15:00:44 +01:00
Dave Pearson
b14b3b9e39 Expand the builtin action list in the docs 2023-04-24 15:12:51 +01:00
Dave Pearson
2055a8996f Move the tutorial over to using ScrollableContainer 2023-04-24 13:13:11 +01:00
Dave Pearson
ca94c5eed0 Merge branch 'main' into no-container-scroll 2023-04-24 11:35:47 +01:00
Rodrigo Girão Serrão
e5033d7d23 Remove hanging lines from docstrings. (#2349)
* Remove hanging lines from docstrings.

Deleted hanging blank lines at the end of docstrings.

Regex pattern:
 - find `\n\n( *)"""`
 - replace with `\n$1"""`
2023-04-24 11:21:38 +01:00
Dave Pearson
b896e9d7f9 Update tests to handle scroll changes to Container
See #2361.
2023-04-24 11:10:37 +01:00
Will McGugan
0509cf8948 Border style (#2292)
* border styles

* docs for border styles

* fix tests

* tests

* tests and docs

* changelog

* implement auto

* style information fix
2023-04-16 12:31:39 +01:00
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
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
Will McGugan
7c25402c5d comment 2023-04-12 11:37:47 +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
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
d7781d1da1 fix doc 2023-04-08 17:51:21 +01:00
Will McGugan
2244b1161e api docs (#2240)
* api docs

* more docstrings

* logs

* docs shakeup

* fix notes, added intro to all apis

* Remove defaults to

* add note to events

* note

* use fira code
2023-04-08 15:35:49 +01:00
Will McGugan
6c958a1140 docs update (#2239)
* docs update

* class template

* no annotations in sig
2023-04-07 18:57:56 +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
Will McGugan
44367a7422 Expanding fr (#2221)
* forced fr to expand

* margin size

* remove comment

* missing snapshot

* snapshot tests

* changelog

* optimize

* snapshot fix

* snapshot update

* snapshot and fixes

* docstrings [skip ci]
2023-04-06 17:30:32 +01:00
Jackomatrus
c76667be5f Fixed a wrong reference (#2226)
The new line referred to in line 177 was added to the StopwatchApp class, not the Stopwatch class.
2023-04-06 11:14:30 +01:00
Dave Pearson
7477624507 Merge branch 'main' into dirtree-filter 2023-04-05 20:48:36 +01:00
Dave Pearson
23263c45f1 Document the filtering support of DirectoryTree 2023-04-05 20:47:35 +01:00
Alex
f3f065d147 docs: Fix some typo (#2216) 2023-04-05 10:11:27 +01:00
Will McGugan
380114489d docs fix 2023-04-04 15:43:10 +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
2094d6b18c titltes on tutorial 2023-03-30 12:15:09 +01:00
Will McGugan
e35a8ade16 fix svg css 2023-03-30 12:07:44 +01:00
Will McGugan
2cd8295325 Release0170 (#2165)
* blog post

* blog post

* options list

* snapshot

* words

* fix flicker
2023-03-29 16:29:28 +01:00