Commit Graph

1190 Commits

Author SHA1 Message Date
Darren Burns
79b08aa6b5 Merge branch 'main' of github.com:Textualize/textual into datatable-cell-keys 2023-02-01 14:55:14 +00:00
Darren Burns
3f463cb0ef Store strings as strings 2023-02-01 14:54:33 +00:00
Dave Pearson
78f49f0ab2 Allow replacement of the root node data when clearing the tree 2023-02-01 13:44:53 +00:00
Dave Pearson
ff7f2488f8 Remove Tree class name clash with how pytest works
Just before doing the commit I decided to rename the test tree in the new
unit test for clearing down a tree. Of course I managed to name it in such a
way that it becomes special to pytest.

This fixes that.
2023-02-01 12:45:18 +00:00
Dave Pearson
7563d4cb7e Allow setting a new label when performing a clear on a Tree
See #1437 for background. While it would be ideal to allow for the complete
emptying of a Tree, the root node is required (and it's part of the
construction of a Tree). So, here, when clearing the Tree we optionally
allow for a new label to be given.

Ideally we'll also allow for fresh data to be provided too; but there's a
wrinkle there in knowing the difference between the data being None, and no
data being provided (so the current root's data being carried over).
Following the method of defaulting used in __init__ would cause problems. As
such, rather than roll all of this into one commit, this goes with the basic
requirement and the solution for data will follow.

Note this also starts some unit tests for the clearing of a Tree.
2023-02-01 12:33:36 +00:00
Dave Pearson
6f24331564 Merge pull request #1703 from davep/lowkey-tree-selection
Lowkey tree selection
2023-01-31 16:27:15 +00:00
Dave Pearson
b0a29050cf Update snapshots after change of unfocused tree cursor handling 2023-01-31 16:20:41 +00:00
Rodrigo Girão Serrão
40fde8cfb9 Merge pull request #1610 from Textualize/fix-1607
Fix #1607 to allow programmatic style changes
2023-01-31 15:13:24 +00:00
Dave Pearson
ff76157479 Merge pull request #1700 from davep/tree-select-expand-divorce
Enhance `Tree` so that there is a expand/collapse action that is separate from select
2023-01-31 14:33:43 +00:00
Will McGugan
fc22576691 Merge pull request #1699 from Textualize/auto-width-inputs
Auto width inputs
2023-01-31 14:46:03 +01:00
Darren Burns
0ad26c3361 Merge branch 'main' of github.com:Textualize/textual into datatable-cell-keys 2023-01-31 13:37:41 +00:00
Darren Burns
abd35436fb Some refactoring, and add cell_key to DataTable.CellSelected 2023-01-31 13:34:13 +00:00
Dave Pearson
6db5217f3e Modify Tree message unit tests to take new action in to account
See #1433.
2023-01-31 13:32:46 +00:00
Will McGugan
e446695684 snapshot fix 2023-01-31 12:53:32 +01:00
Will McGugan
330db5fc80 snapshot 2023-01-31 12:43:07 +01:00
Dave Pearson
f1f3e20148 Merge pull request #1694 from davep/input-wordless-passwords
When in password mode have word-oriented actions act on whole input
2023-01-31 11:20:57 +00:00
Will McGugan
be5a67e903 fix auto width glitch 2023-01-31 12:13:25 +01:00
darrenburns
3aeadf2d37 Merge branch 'main' into datatable-cell-keys 2023-01-31 10:32:53 +00:00
Will McGugan
dc02b22d7c Fix paste and test 2023-01-31 11:12:47 +01:00
Dave Pearson
928a289c0e Add extra unit tests for password field deletion
Here we're just testing the exceptional situations.
2023-01-30 20:38:19 +00:00
Dave Pearson
5fc16c6af0 Add extra unit tests for password field movement
Here we're just testing the exceptional situations.
2023-01-30 20:34:22 +00:00
Will McGugan
891e8d95a1 Merge pull request #1695 from Textualize/rodrigogiraoserrao-patch-1
Update test_animation.py
2023-01-30 19:04:41 +01:00
Will McGugan
71a0a6676f docstring [skip ci] 2023-01-30 19:02:35 +01:00
Will McGugan
4aa988347f add tests 2023-01-30 18:59:23 +01:00
Rodrigo Girão Serrão
1fc2c2951c Update test_animation.py
Make it less likely for test to fail.

References: #1675
2023-01-30 17:24:15 +00:00
Darren Burns
61bf8c8a5a Merge branch 'main' of github.com:willmcgugan/textual into datatable-cell-keys 2023-01-30 15:51:51 +00:00
Will McGugan
475cd4fb1b Merge pull request #1644 from davep/tree-deeply
Add support for a method of expanding/collapsing all tree nodes from a given node down
2023-01-30 16:27:06 +01:00
Will McGugan
11618e7029 Merge branch 'main' into more-input-bindings 2023-01-30 16:15:27 +01:00
Will McGugan
88b155132b Merge branch 'main' into scroll-sensitivity 2023-01-30 15:59:49 +01:00
Will McGugan
9e5bcf2063 merge 2023-01-30 15:49:07 +01:00
Darren Burns
c34f4becfe Fixing data table tests 2023-01-30 14:37:41 +00:00
Will McGugan
787232b644 fix removed test 2023-01-30 15:34:04 +01:00
Will McGugan
4a302148f8 fix typing 2023-01-30 15:08:14 +01:00
Rodrigo Girão Serrão
b023d4e02e Improve tests. 2023-01-30 12:34:35 +00:00
Will McGugan
0e01651825 Merge branch 'main' into scroll-sensitivity 2023-01-30 13:18:47 +01:00
Will McGugan
eb91fc0579 snapshot fix 2023-01-30 13:01:44 +01:00
Dave Pearson
62244b4ea9 Merge branch 'main' into more-input-bindings 2023-01-30 11:25:07 +00:00
Dave Pearson
a1752248d4 Help some older Pythons along 2023-01-30 10:23:37 +00:00
Dave Pearson
9e23a79ec1 Add more Input unit tests for actions that modify the text
This time all the things to do with deleting right.
2023-01-30 10:15:23 +00:00
Dave Pearson
af2189fdeb Fix a docstring typo 2023-01-30 10:12:35 +00:00
Darren Burns
9cd72db7e7 Merge branch 'main' into datatable-cell-keys 2023-01-30 10:01:26 +00:00
Dave Pearson
e199dc226b Start Input unit tests for actions that modify the text 2023-01-30 09:51:46 +00:00
Dave Pearson
1230ca3694 Rename the key action tests
There are actions that relate to editing the input too, which I also want to
test, but I'm not minded to lump them all in the same file. So here I'm
renaming to make it clear these tests are just about movement. The editing
ones will come next in their own file.
2023-01-29 11:58:46 +00:00
Dave Pearson
b7203edd4a Add a test for using left-word to get home from the end of an input 2023-01-29 11:57:00 +00:00
Dave Pearson
054c23ab29 Add a test for using right-word to get to the end of an input 2023-01-29 11:53:21 +00:00
Dave Pearson
5bf0542e47 Rename a test to be more in line with the others 2023-01-29 11:49:29 +00:00
Dave Pearson
af4a6b0f68 Fix a typo/thinko in a test name 2023-01-29 11:48:48 +00:00
Dave Pearson
112c789e3c Add a test for going right a word from the end 2023-01-29 11:47:16 +00:00
Dave Pearson
d5a99425c0 Add a test for going right a word from the start 2023-01-29 11:37:12 +00:00
Dave Pearson
fad87c90f3 Add a test for going left a word from the end 2023-01-29 11:29:07 +00:00