Commit Graph

689 Commits

Author SHA1 Message Date
Will McGugan
fd9c1de3e2 Call from thread method 2023-01-07 14:04:52 +00:00
Dave Pearson
82dcf62122 Merge pull request #1495 from davep/tree-node-children-prop
Add read-only access to the children of a `TreeNode`
2023-01-06 15:17:39 +00:00
Dave Pearson
71cc1bca1e Rename ImmutableSequence to ImmutableSequenceView
Also, in doing so, drop support for unrolling iterators and making them into
indexable sequences.

See the following feedback:

  https://github.com/Textualize/textual/pull/1495#pullrequestreview-1238616797
  https://github.com/Textualize/textual/pull/1495#issuecomment-1373553580
2023-01-06 12:23:51 +00:00
Will McGugan
428ae0e14e Merge branch 'main' into tree-node-parent-prop 2023-01-06 02:11:35 -08:00
Dave Pearson
e5869b9f7b Merge branch 'main' into tree-node-children-prop 2023-01-06 06:18:15 +00:00
Dave Pearson
a15fa7fd01 Tweak the unit tests for ImmutableSequence
Make it 100% clear that the tests that are about wrapping iterators actually
are wrapping iterators.
2023-01-06 06:14:49 +00:00
Dave Pearson
83c0ef73e3 Only convert to an indexable sequence if absolutely necessary 2023-01-06 06:01:59 +00:00
Dave Pearson
7779211dcf Add read-only access to the children of a TreeNode
See #1398.
2023-01-05 21:24:47 +00:00
Dave Pearson
30d5c1e66b Add a generic immutable sequence wrapper class
In anticipation of satisfying #1398, this adds a generic immutable sequence
wrapper class. The idea being that it can be used to wrap up a list or
similar, that you don't want the caller to modify.

This commit aims to get the basics down for this, and also adds a minimal
set of unit tests.
2023-01-05 21:11:14 +00:00
Dave Pearson
2c6bd88c53 Merge branch 'main' into tree-node-parent-prop 2023-01-05 14:31:51 +00:00
Dave Pearson
b8727a8908 Merge branch 'main' into tree-node-label-prop 2023-01-05 14:30:42 +00:00
Dave Pearson
27a7cfc489 Add a public read-only parent property to TreeNode
See #1397.
2023-01-05 10:35:25 +00:00
Dave Pearson
d39c59c414 Move the TreeNode label tests into a better-named file
There's going to be a whole bunch of tests relating to the Tree and TreeNode
coming, let's make sure this ends up being fairly granular.

(side thought: it might be a good time soon to revisit all the tests for
Textual and try and wrangle them into some tidy structure)
2023-01-05 10:01:52 +00:00
Dave Pearson
b8a329638e Add public access to a TreeNode's label
This adds public support to reading a TreeNode's label, and also setting it
too.

See #1396.
2023-01-05 09:37:08 +00:00
Nitzan Shaked
67d2c8df7d black 2023-01-02 21:59:33 +02:00
Nitzan Shaked
e13ea5e0bd MouseScrollUp/MouseScrollDown => plain MousEvent's
... which means they get passesd x, y, etc. In particular,
they are passed the keyboard modifiers. This allows widgets
to use e.g. ctrl-wheel to scroll right/left.
2023-01-02 21:13:56 +02:00
Will McGugan
91e23ff34c more pauses for demo? 2022-12-30 17:31:36 +00:00
Will McGugan
97627107cf add pause 2022-12-30 15:01:57 +00:00
Will McGugan
57654a90bf fix snapshot 2022-12-29 10:23:34 +00:00
Will McGugan
51c7fef2e1 extend trips to line API 2022-12-29 10:13:37 +00:00
Will McGugan
516ca72ba5 Merge branch 'main' into strip-optimization 2022-12-29 00:48:01 -08:00
Josh Karpel
a45a3dca6a add option to clear columns in DataTable.clear 2022-12-28 20:50:24 -06:00
Will McGugan
5382f5eb49 check len 2022-12-28 15:53:58 +00:00
Will McGugan
8113ff8705 moar tests 2022-12-28 15:44:56 +00:00
Will McGugan
331a0ce65d moar tests 2022-12-28 15:40:00 +00:00
Will McGugan
54992d2d91 Added FIFOCache 2022-12-27 15:29:05 +00:00
Will McGugan
3fd8fe2210 tests 2022-12-27 13:02:46 +00:00
Will McGugan
6f82ad9c4a adds Strip primitive 2022-12-26 18:06:35 +00:00
Will McGugan
91e4da17d6 Merge pull request #1417 from Textualize/key-refactor
keys refactor
2022-12-21 15:54:34 +00:00
Will McGugan
6c5ba82bff fix for win 2022-12-21 15:43:43 +00:00
Will McGugan
689ec477ea Update tests/test_keys.py
Co-authored-by: darrenburns <darrenburns@users.noreply.github.com>
2022-12-21 15:19:46 +00:00
Will McGugan
77eadc9fa1 words 2022-12-21 15:17:27 +00:00
Will McGugan
46cfbddad2 check for empty bindings 2022-12-21 14:57:25 +00:00
Dave Pearson
03d5075bad Merge pull request #1423 from davep/bug/1355/visibility-react
Fix changes to visibility needing an explicit refresh to take effect
2022-12-21 14:53:31 +00:00
Dave Pearson
765dd138c7 Fix changes to visibility needing an explicit refresh to take effect
Fixes #1355.
2022-12-21 14:33:12 +00:00
Will McGugan
0a1fc1e7de Merge branch 'main' into key-refactor 2022-12-21 14:07:18 +00:00
Will McGugan
a4aa30ebeb Merge pull request #1416 from Textualize/query-star-exclude-self
Queries/`walk_children` no longer includes self in results by default
2022-12-21 14:04:49 +00:00
Will McGugan
55c58e0f8f added tests 2022-12-21 11:39:36 +00:00
Will McGugan
7a46672d64 docs and expanded keys 2022-12-21 11:38:20 +00:00
Darren Burns
d06fca1041 Improving universal selector test 2022-12-21 11:28:19 +00:00
Dave Pearson
159f94a9b4 Reformat to keep black happy 2022-12-21 11:23:01 +00:00
Dave Pearson
adecdde3a7 Add dark/light mode toggling tests 2022-12-21 11:21:27 +00:00
Darren Burns
8c864030e2 Merge branch 'main' of github.com:Textualize/textual into query-star-exclude-self 2022-12-21 10:52:59 +00:00
Darren Burns
78f06c9d1b Add test for universal selector 2022-12-20 20:19:53 +00:00
Will McGugan
1cef349f27 test fix 2022-12-20 14:06:35 +00:00
Will McGugan
301d56e329 snapshot fix 2022-12-20 13:22:22 +00:00
Will McGugan
3e2c3fbb2f Merge branch 'main' into cli-keys 2022-12-20 13:20:01 +00:00
Will McGugan
0987229c25 fix binding inheritance issues 2022-12-20 13:19:49 +00:00
darrenburns
af8af1bee9 Ensure watcher isn't called on first_set when init is False and value doesn't change (#1367)
* Ensure watcher not called when value doesnt change, even on first set

* Update CHANGELOG.md
2022-12-20 11:17:11 +00:00
Will McGugan
93716e714b Merge branch 'main' into nested-height-fix 2022-12-20 11:14:45 +00:00