Commit Graph

6310 Commits

Author SHA1 Message Date
Dave Pearson
c16b32b52f Merge pull request #2656 from davep/private-validate-and-compute
Add (currently xfailing) tests for private reactive validation and compute methods
2023-05-25 15:53:24 +01:00
Dave Pearson
fa47d0bd41 Mark the public/private validate and compute tests as xfails 2023-05-25 15:27:27 +01:00
Dave Pearson
bd6717f3d5 Add a test for public and private computes
This fails for now.
2023-05-25 15:23:33 +01:00
Aaron Stephens
20d19d977d Refactor Message.control and Tree Messages (#2602)
* refactor(message): make control a property

* refactor(_tree): remove tree parameter on messages

* refactor(_directory_tree): remove tree parameter on message

* fix: tree message calls

* fix(_select): make Changed.control a property

* refactor(_on): control check

* refactor(_select): rename Changed.widget to select

* docs: changelog entry
2023-05-25 13:48:31 +01:00
Will McGugan
3ab315beb6 Anim screenshot fix (#2655)
* fix screenshots in docs

* fix anim

* added wait for animation switch

* remove comment
2023-05-25 13:46:14 +01:00
darrenburns
62fcefbd2d Validation (#2600)
* A few different types of validation

* Rename

* Fix test

* Updating validation framework

* Update lockfile

* Ensure validators can be None

* Reworking the API a little

* Convert Input.Changed to dataclass

* Add utility for getting failures as strings

* Update an example in Validator docstring

* Remove some redundant `pass`es

* Renaming variables

* Validating Input on submit, attaching result to Submitted event

* Testing various validation features

* Update snapshots and deps

* Styling unfocused -invalid Input differently

* Add snapshot test around input validation and associated styles

* Validation docs

* Tidying validation docs in Input widget reference

* Fix mypy issues

* Remove __bool__ from Failure, make validator field required

* Code review changes

* Improving error messages in Validators
2023-05-25 13:29:33 +01:00
Rodrigo Girão Serrão
5cb30b5ecc Merge pull request #2628 from Textualize/auto-focus-improv
Add auto focus to app.
2023-05-25 11:59:54 +01:00
Rodrigo Girão Serrão
afbf52d8f5 Merge pull request #2654 from Textualize/progressbar-docs
Fix progress bar docs issue.
2023-05-25 11:59:37 +01:00
Dave Pearson
abda34aa13 Add a test for private validation
Currently failing.
2023-05-25 11:48:04 +01:00
Rodrigo Girão Serrão
08eb1f1fab Remove invalid ref. 2023-05-25 11:01:47 +01:00
Will McGugan
8151946f38 add blur (#2645)
* add blur

* docstring

* blur on disabled

* snapshot test

* Add test
2023-05-24 20:16:11 +01:00
Dave Pearson
a89c199409 Merge pull request #2646 from davep/fix-broken-xrefs
Fix some assorted documentation cross-references
2023-05-24 16:37:01 +01:00
Dave Pearson
bad2a5a064 Merge pull request #2647 from davep/fix-set-classes-docstring
Fix docstring for `DOMNode.set_classes`
2023-05-24 16:24:20 +01:00
Dave Pearson
2c184caa2a Fix docstring for DOMNode.set_classes
The argument in the Args list was missing its name; also fixes a typo too.
2023-05-24 16:16:15 +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
Dave Pearson
fb82564858 Merge pull request #2643 from davep/include-more-option-stuff-in-docs
Include more missing things from the OptionList
2023-05-24 15:28:52 +01:00
Dave Pearson
09c6ea9911 Include more missing things from the OptionList
While working on the SelectionList documentation I've noticed that even more
things have got lost from the docs relating to OptionList, likely lost when
widgets were removed from the API section of the docs.

This drags more OptionList-related types into the docs, thus providing more
links.
2023-05-24 15:21:41 +01:00
Dave Pearson
78980670da Merge pull request #2640 from davep/include-option-in-docs
Include `widgets.option_list.Option` in the docs
2023-05-24 14:31:27 +01:00
Dave Pearson
7c9b3f4cd6 Include widgets.option_list.Option in the docs
Noticed this in passing; possibly dropped by accident when the widgets were
removed form the API section of the docs?
2023-05-24 14:13:17 +01:00
Dave Pearson
9459a4efd7 Merge pull request #2636 from davep/select-reactive-table-fix 2023-05-24 10:52:29 +01:00
Dave Pearson
ed0aa78f22 Merge pull request #2637 from davep/option-list-docs-typo-fix 2023-05-24 10:47:25 +01:00
Dave Pearson
7f3efcf6ed Fix a typo in the OptionList messages list 2023-05-24 10:41:55 +01:00
Dave Pearson
7d635915fa Fix Select reactives table layout
The escaped | wasn't being rendered correctly as it was inside back-ticks.
2023-05-24 10:31:34 +01:00
Rodrigo Girão Serrão
bc92cf57e7 Add auto focus to app.
Related issues: #2594.
2023-05-23 11:32:40 +01:00
Dave Pearson
607939e41d Merge pull request #2626 from davep/option-list-typo-fix
Fix a copy/pasteo in an option list docstring
2023-05-23 09:45:37 +01:00
Dave Pearson
10bccfd9ee Fix a copy/pasteo in an option list docstring 2023-05-23 09:27:40 +01:00
Will McGugan
be49aabefe remove markup, simplify repr (#2623)
* remove markup, simplify repr

* changelog

* remove rendundant repr (thanks Paul)

* changelog
2023-05-22 20:26:37 +01:00
Dave Pearson
55f887e66e Merge pull request #2610 from davep/directory-tree-alt-path
Let child classes of DirectoryTree override Path creation
2023-05-22 15:56:50 +01:00
Rodrigo Girão Serrão
724fedc442 Merge pull request #2621 from Textualize/leave-footer-push-modal-screen
Leave footer when pushing modal screen
2023-05-22 14:43:05 +01:00
Rodrigo Girão Serrão
d48a127ffe Merge pull request #2540 from Textualize/screen-modes
Implements screen modes
2023-05-22 14:27:35 +01:00
Rodrigo Girão Serrão
c64111bcb5 Add property alias.
Related comment: https://github.com/Textualize/textual/pull/2540\#discussion_r1196634789
2023-05-22 14:21:11 +01:00
Rodrigo Girão Serrão
c32d5d3c25 Add regression test for #2606. 2023-05-22 13:53:58 +01:00
Rodrigo Girão Serrão
33a470f569 Fix footer highlight when pushing modal. 2023-05-22 11:45:40 +01:00
Rodrigo Girão Serrão
5c1c62edd0 Merge pull request #2607 from Textualize/placeholder-cycle
Placeholder color cycle
2023-05-22 10:50:11 +01:00
Rodrigo Girão Serrão
4e86e655d6 Merge branch 'main' into placeholder-cycle 2023-05-22 10:43:12 +01:00
Rodrigo Girão Serrão
5e04a4d4de Add description to work decorator. (#2605)
* Add description to work decorator.

* Fix stutter.
2023-05-22 10:32:23 +01:00
Luper Rouch
33da5c1afc Fix App.BINDINGS type (#2620)
The implicit type was creating mypy errors when defining bindings with
tuples. For example:

    class MyApp(App):
        BINDINGS = [("q", "quit", "Quit")]

Would give the error:

    error: List item 0 has incompatible type "Tuple[str, str, str]"; expected "Binding"  [list-item]
2023-05-22 10:27:31 +01:00
Will McGugan
7d0d1ac5c8 Bump0260 (#2617)
* full map

* docstring changelog

* changelog

* simplify, add comment
v0.26.0
2023-05-20 11:30:42 +01:00
Dave Pearson
7dd05e3ec0 Let child classes of DirectoryTree override Path creation
With #1719 in mind, and as an alternative to #2608, this allows for a child
class of DirectoryTree to specify how a fresh `Path` should be created. The
idea here being that whatever is created should be of the `Path` type, but
can have other abilities.
2023-05-19 10:15:04 +01:00
Rodrigo Girão Serrão
6523fbaff1 Fix tests. 2023-05-18 16:27:09 +01:00
Rodrigo Girão Serrão
c85e428228 Fix placeholder color cycling. 2023-05-18 16:24:07 +01:00
Rodrigo Girão Serrão
ad986b127d Merge branch 'main' into screen-modes 2023-05-18 15:11:21 +01:00
Rodrigo Girão Serrão
d65daf81c0 Address review comments. 2023-05-18 15:07:52 +01:00
Will McGugan
49e1080279 update howto 2023-05-18 10:03:26 +01:00
Will McGugan
8fd5aec454 fix layout 2023-05-18 09:28:33 +01:00
Will McGugan
ff5665051b Release0250 (#2598)
* version bump

* changelog
v0.25.0
2023-05-17 16:30:36 +01:00
Rodrigo Girão Serrão
a9c8b59df5 Use default string on error inside work. (#2595)
Related issues #2588.
2023-05-17 16:27:32 +01:00
Dave Pearson
84de8a8949 Typo fix (#2596) 2023-05-17 16:26:33 +01:00
darrenburns
e25c6290ba Add classes to Tab widget (#2589)
* Add classes to Tab widget

* Update CHANGELOG
2023-05-17 16:21:32 +01:00
Dave Pearson
7ff205bc29 Merge pull request #2545 from davep/directory-tree-work-in-worker
Load `DirectoryTree` contents in a worker
2023-05-17 15:42:51 +01:00