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
Dave Pearson
f2e756b695
Update the CHANGELOG
2023-01-31 15:54:27 +00:00
Dave Pearson
6e1f18910a
Keep a visible, but darker, cursor in Tree when it doesn't have focus
...
See #1471 . It seems useful and important for a Tree to still have a cursor
visible even when it doesn't have focus -- that ways someone can build a UI
where the user can tab away from the tree to something that relates to the
node, and still see which node is in play.
2023-01-31 15:51:31 +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
Rodrigo Girão Serrão
c79f19c1c7
Rename attribute.
2023-01-31 15:07:30 +00:00
Dave Pearson
4143bd7ee5
Merge pull request #1701 from davep/CHANGELOG-tweak
...
Fix wording of entry in CHANGELOG to match lines around it
2023-01-31 14:48:17 +00:00
Dave Pearson
1cc5b3799c
Fix wording of entry in CHANGELOG to match lines around it
2023-01-31 14:45:28 +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
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
Dave Pearson
2086b713db
Update the CHANGELOG
2023-01-31 13:17:58 +00:00
Dave Pearson
606af8d3a2
Correct a typo in the docstring of action_scroll_end
2023-01-31 13:12:03 +00:00
Dave Pearson
9e406f525e
Add a docstring to action_scroll_end
2023-01-31 13:03:23 +00:00
Dave Pearson
ca773f4350
Add a docstring to action_scroll_home
2023-01-31 13:02:34 +00:00
Dave Pearson
b2aecfa847
Add a docstring to action_page_up
2023-01-31 13:00:06 +00:00
Dave Pearson
17d84bc75b
Add a docstring to action_page_down
2023-01-31 12:51:41 +00:00
Dave Pearson
84fa94978e
Add a docstring to action_cursor_down
2023-01-31 12:51:04 +00:00
Dave Pearson
93d4863e0b
Add a docstring to action_cursor_up
2023-01-31 12:50:40 +00:00
Dave Pearson
ca224b76ab
Add a docstring to action_toggle_node
2023-01-31 12:50:12 +00:00
Dave Pearson
775165ec12
Add a docstring to action_toggle_node
...
I want to add docstrings to the actions I'm adding as part of #1700 , so with
this in mind I'm going to add docstrings to all the actions.
2023-01-31 12:48:19 +00:00
Dave Pearson
5c17bc3482
Add a toggle action to Tree, along with a new binding
...
See #1433 . The idea here is that the user has an option of
expanding/collapsing a non-leaf node without causing a selected event,
or (with auto_expand turned off) cause a selected event without an
expand/collapse event.
As this will need a new binding, I've chosen the space bar as the key to
toggle the expanded state.
2023-01-31 12:36:22 +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
bfa586fdcd
changelog url
2023-01-31 12:16:21 +01:00
Will McGugan
632cfc77b0
changelog
2023-01-31 12:14:36 +01:00
Will McGugan
be5a67e903
fix auto width glitch
2023-01-31 12:13:25 +01:00
Dave Pearson
8bfe4e8170
Fix unintentional indent
2023-01-31 10:36:07 +00:00
Will McGugan
dc1c4dad0e
Merge pull request #1698 from Textualize/fix-paste
...
Fix paste and test
2023-01-31 11:27:58 +01:00
Will McGugan
2ec01916d0
unused import
2023-01-31 11:16:48 +01:00
Will McGugan
6e7fd08890
change log [skip ci]
2023-01-31 11:14:23 +01: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
62cede54ef
docstring update
2023-01-30 19:24:16 +01: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
08bb55bfb3
Merge pull request #1696 from Textualize/render-widths-test
...
Restore tests
2023-01-30 19:03:56 +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
Dave Pearson
12cfec7be3
When in password mode have word-oriented actions act on whole input
...
The idea here is that a password field should give no hint as to what's
within, length notwithstanding. To this end have the actions that (re)move
based on word boundaries act as if a password field is always just one word.
See #1692 (and previously #1676 , prompted originally by #1310 ).
2023-01-30 16:51:45 +00:00
Rodrigo Girão Serrão
aa03373a64
Merge pull request #1673 from Textualize/doc-improvements
...
Documentation improvements
2023-01-30 15:52:45 +00:00
Rodrigo Girão Serrão
ca6763d4a3
Merge branch 'main' into doc-improvements
2023-01-30 15:35:43 +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
Dave Pearson
89c799d02a
Merge pull request #1676 from davep/more-input-bindings
...
More input bindings
2023-01-30 15:20:09 +00:00
Will McGugan
11618e7029
Merge branch 'main' into more-input-bindings
2023-01-30 16:15:27 +01:00
Will McGugan
d5844f7949
Merge pull request #1689 from Textualize/scroll-sensitivity
...
Scroll sensitivity
2023-01-30 16:14:44 +01:00