Commit Graph

1225 Commits

Author SHA1 Message Date
Dave Pearson
a944554d0d Finish a half-finished docstring 2023-05-25 13:58:31 +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
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
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
ad986b127d Merge branch 'main' into screen-modes 2023-05-18 15:11:21 +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
Dave Pearson
1ebfe2f418 Update the snapshits 2023-05-16 14:38:11 +01:00
Dave Pearson
3d2e3d9092 Add a snapshot test for a rebuilt Select
This helps test the practical impact of the fix added for #2557.
2023-05-16 14:34:18 +01:00
Rodrigo Girão Serrão
4b22234b24 Merge branch 'main' into auto-focus-improv 2023-05-16 11:40:13 +01:00
Rodrigo Girão Serrão
a6ee867ee3 Fix tests. 2023-05-16 11:39:38 +01:00
Rodrigo Girão Serrão
b592ac077a AUTO_FOCUS targets first focusable widget.
Related issues: #2578.
2023-05-16 11:27:24 +01:00
Rodrigo Girão Serrão
7a8d6920e8 Error when dismissing non-active screen.
Related issues: #2575.
2023-05-16 11:14:54 +01:00
Rodrigo Girão Serrão
fe7812d94d Add regression test for #2563. 2023-05-15 13:24:48 +01:00
Rodrigo Girão Serrão
0b6e3b3040 Merge branch 'main' into auto-focus 2023-05-15 10:41:15 +01:00
Rodrigo Girão Serrão
c967661699 Merge branch 'main' into move-child-no-op 2023-05-15 10:31:43 +01:00
Will McGugan
d266e3685f snapshot update (#2555) 2023-05-12 18:57:53 +02:00
Will McGugan
c2e7b619f1 Revert "virtual size and docks"
This reverts commit 9a134b4920.
2023-05-12 15:53:47 +02:00
Will McGugan
9a134b4920 virtual size and docks 2023-05-12 15:36:49 +02:00
Dave Pearson
2d75ca0d77 Merge pull request #2536 from davep/expand-tree-expand-messages
Ensure that `TreeNode` messages are posted when via-API changes are made
2023-05-10 14:18:24 +01:00
Rodrigo Girão Serrão
8dd627b0f4 Merge branch 'main' into sub-title-str 2023-05-10 13:10:48 +01:00
Dave Pearson
28be54d10d Merge branch 'main' into expand-tree-expand-messages 2023-05-10 10:12:58 +01:00
Dave Pearson
f19f46bba0 Merge pull request #2519 from davep/cygnus-x-1
Fix for `resolve_fraction_unit` zero division error (#2502)
2023-05-10 10:10:55 +01:00
Dave Pearson
c7fc66fa6c Ensure that TreeNode messages are posted when via-API changes are made
Until now the Tree.NodeExpanded and Tree.NodeCollapsed messages were only
sent out when changes were made to the tree by user interaction. This meant
that if any changes were made with the TreeNode expand, expand_all,
collapse, collapse_all, toggle or toggle_all API calls no messages would be
sent.

This PR corrects this.

The work here is, in part, required for #2456 (DirectoryTree lazy-loads
directory information on node expansion so if someone is expanding nodes
under code control the DirectoryTree never gets to know that it should load
a directory's content) and will build on #1644, essentially adding a missing
aspect to the latter PR.
2023-05-10 09:24:07 +01:00
Rodrigo Girão Serrão
e8baf52bdd Allow setting (sub)title of any type.
Related issues: #2521.
2023-05-09 16:56:56 +01:00
Rodrigo Girão Serrão
3245eb38bb Make auto-focus a class var.
Related comments: https://github.com/Textualize/textual/pull/2527\#discussion_r1188776849
2023-05-09 16:44:37 +01:00
Rodrigo Girão Serrão
eafe6b1786 Moving child before/after self is a no-op.
Related issues: #1743.
2023-05-09 15:57:23 +01:00
Dave Pearson
8855471125 Merge pull request #2522 from davep/move-widget-enhanced-testing
Make the widget moving tests more granular and add more tests
2023-05-09 15:07:59 +01:00