Commit Graph

1246 Commits

Author SHA1 Message Date
Rodrigo Girão Serrão
73d55725b5 Merge pull request #2604 from Textualize/input-auto-completion
Input completion suggestions
2023-05-29 14:48:40 +01:00
Will McGugan
ab10c7c326 fix zero division error (#2674)
* fix zero division error

* push tests
2023-05-28 14:56:05 +01:00
Rodrigo Girão Serrão
fd57309ad0 Make validators kwd-only. 2023-05-25 17:57:33 +01:00
Rodrigo Girão Serrão
31e2d1c839 Merge branch 'main' into input-auto-completion 2023-05-25 17:42:37 +01:00
Rodrigo Girão Serrão
fc86682dfa Add tests for suggester. 2023-05-25 17:32:26 +01:00
Dave Pearson
ea8c6039a9 Merge pull request #2652 from davep/multiselect 2023-05-25 17:10:20 +01:00
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
Dave Pearson
400043dda1 Update snapshit tests 2023-05-25 14:47:11 +01:00
Dave Pearson
93c3c3652b Merge branch 'main' into multiselect 2023-05-25 13:59:34 +01:00
Dave Pearson
a944554d0d Finish a half-finished docstring 2023-05-25 13:58: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
Dave Pearson
51f8d0dc9a Break up the SelectionList snapshit tests
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-05-25 13:20:22 +01:00
Dave Pearson
51133b3a62 Typo fix
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-05-25 13:19:18 +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
Dave Pearson
abda34aa13 Add a test for private validation
Currently failing.
2023-05-25 11:48:04 +01:00
Dave Pearson
939586f5f8 Add snapshot tests for the SelectionList examples 2023-05-25 11:06:21 +01:00
Dave Pearson
9a0e82f4c3 Merge branch 'main' into multiselect 2023-05-25 10:04:52 +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
71d7f7dd86 Merge branch 'main' into multiselect 2023-05-24 15:08:04 +01:00
Dave Pearson
cb05cfff53 Test that the control of selection list events is always correct 2023-05-24 10:21:40 +01:00
Dave Pearson
0a63748573 Add a test for later addition of selected selections 2023-05-24 10:16:25 +01:00
Dave Pearson
d3fe23f0bc Allow passing a Selection into a SelctionList
Up until now I've only been allowing tuples; mostly a hangover from the
initial take on this. Things have drifted a bit now and I feel it makes
sense to allow Selection instances in too.
2023-05-24 10:09:53 +01:00
Dave Pearson
2e540548f8 Add a test that removed selected selections are removed from selected 2023-05-24 09:19:56 +01:00
Dave Pearson
9d6e977e0e Test messages when toggling a selection via user input 2023-05-24 09:15:43 +01:00
Dave Pearson
56103c52e7 Ensure we log any OptionList messages in the messages test
We don't actually want to see them, we don't expect to see them, so here I
make a point of logging them so we can be sure we *don't* see them.
2023-05-24 09:09:40 +01:00
Dave Pearson
50d77b231f Add tests for the wrong sized tuple
While type checking picks this up, not everyone uses type checking.
2023-05-23 16:45:53 +01:00
Dave Pearson
9f6d35b871 Start unit tests for the actual selected property 2023-05-23 16:26:28 +01:00
Dave Pearson
c448fa1ea0 Add unit tests for selection list messages 2023-05-23 15:48:34 +01:00
Dave Pearson
f9780d0346 Add basic selection list creation unit tests 2023-05-23 15:13:46 +01:00
Rodrigo Girão Serrão
bc92cf57e7 Add auto focus to app.
Related issues: #2594.
2023-05-23 11:32:40 +01:00
Rodrigo Girão Serrão
297549c7d8 V2 of input suggestions API. 2023-05-23 10:47:22 +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
c32d5d3c25 Add regression test for #2606. 2023-05-22 13:53:58 +01:00
Rodrigo Girão Serrão
6523fbaff1 Fix tests. 2023-05-18 16:27:09 +01:00
Rodrigo Girão Serrão
75606c8dfd Add explicit sleep. 2023-05-18 16:11:02 +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
97f30a21fb Add tests. 2023-05-18 14:50:28 +01:00
Rodrigo Girão Serrão
bfdaf02f66 Add snapshot test. 2023-05-18 14:26:32 +01:00
Rodrigo Girão Serrão
03a43521dd Fix test. 2023-05-18 14:02:51 +01:00
Rodrigo Girão Serrão
38f9500642 Fix test. 2023-05-17 11:35:10 +01:00
Rodrigo Girão Serrão
a058fe53eb Make test clearer. 2023-05-17 11:15:56 +01:00
Rodrigo Girão Serrão
dea133d357 Merge branch 'main' into auto-focus-improv 2023-05-17 10:28:54 +01:00
Rodrigo Girão Serrão
45686c8aca Fix tests. 2023-05-17 10:27:57 +01:00
Will McGugan
53e765f7d6 Avoid docks when scrolling (#2571)
* handle docked layers

* handle scroll better

* snapshot update

* remove commented out code

* superflous

* dock gutter

* snapshit

* snapshit test

* changelog

* mistake

* docstrings

* changelog

* whitespace

* missing punctuation

* ofx docstring

* 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-05-16 21:34:59 +01:00
Rodrigo Girão Serrão
634789ae93 Add tests to screen modes. 2023-05-16 17:40:09 +01:00
Dave Pearson
83e4be77db Merge pull request #2567 from davep/issue/2557/select-update
Fix clearing an OptionList
2023-05-16 15:11:29 +01:00