Commit Graph

724 Commits

Author SHA1 Message Date
Rodrigo Girão Serrão
0f3aff6fb1 Merge pull request #1408 from Textualize/review-styles-reference
Review styles reference
2023-01-10 14:20:11 +00:00
Rodrigo Girão Serrão
d9a0c343d7 Update snapshot tests. 2023-01-09 16:42:15 +00:00
Rodrigo Girão Serrão
e5375d0a2f Reset color cycle before tests.
We need to reset the color cycle for placeholders before each CSS property test because we need to ensure consistent colouring of the placeholders as tests are added/removed/reordered.
2023-01-09 16:26:33 +00:00
Rodrigo Girão Serrão
5cad93220e Merge branch 'main' into review-styles-reference 2023-01-09 16:19:24 +00:00
Dave Pearson
5a09831c5e Run black over path tests 2023-01-09 14:00:52 +00:00
Dave Pearson
c84a5dc413 Run black over widget removing tests 2023-01-09 13:59:59 +00:00
Dave Pearson
3f6ec10311 Run black over widget mounting tests 2023-01-09 13:59:15 +00:00
Dave Pearson
8872956b29 Run black over arrange tests 2023-01-09 13:58:25 +00:00
Dave Pearson
afc7ba2a37 Run black over unmount tests 2023-01-09 13:57:49 +00:00
Dave Pearson
5df5f12906 Run black over node tests 2023-01-09 13:57:13 +00:00
Dave Pearson
06ab4f4d70 Run black over child focus tests 2023-01-09 13:56:35 +00:00
Dave Pearson
04ef895626 Run black over child widget moving tests 2023-01-09 13:55:53 +00:00
Will McGugan
86e8738882 Merge pull request #1517 from Textualize/call-in-thread
Call from thread method
2023-01-09 02:47:50 -08:00
Rodrigo Girão Serrão
b3495c6e92 Merge pull request #1509 from Textualize/fix-1508
Simplify Placeholder implementation
2023-01-08 11:19:29 +00:00
Will McGugan
467953b1c4 Merge pull request #1503 from Textualize/cursor-blink-bug
Converting cell position to index
2023-01-07 07:43:32 -08:00
Will McGugan
702640fd2e Merge pull request #1514 from davep/blackify-isv-test
Run black over recent immutable sequence view tests
2023-01-07 07:43:14 -08:00
Will McGugan
e11f563123 docstrings 2023-01-07 14:24:17 +00:00
Will McGugan
fd9c1de3e2 Call from thread method 2023-01-07 14:04:52 +00:00
Rodrigo Girão Serrão
4c3eb3e021 Update placeholder snapshot test.
Although there was no visual difference in the output, the snapshot tool was complaining because there are now less things to draw on the screen, thus the snapshots looked different. Hence, the placeholder snapshot needed to be updated.
2023-01-07 09:35:41 +00:00
Dave Pearson
53df47b401 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-07 09:35:41 +00:00
Dave Pearson
12c6129150 Tweak the unit tests for ImmutableSequence
Make it 100% clear that the tests that are about wrapping iterators actually
are wrapping iterators.
2023-01-07 09:35:41 +00:00
Dave Pearson
274bb634ca Only convert to an indexable sequence if absolutely necessary 2023-01-07 09:35:41 +00:00
Dave Pearson
0029470b4b Add read-only access to the children of a TreeNode
See #1398.
2023-01-07 09:35:39 +00:00
Dave Pearson
2c827e18d0 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-07 09:35:00 +00:00
Dave Pearson
af56d88a6d Add a public read-only parent property to TreeNode
See #1397.
2023-01-07 09:34:56 +00:00
Dave Pearson
b8500de1e9 Run black over recent immutable sequence view tests
Now that we're running black on tests...
2023-01-07 09:32:43 +00:00
Dave Pearson
ea8252cfcc Run black over recent Tree tests
Now that we're running black on tests...
2023-01-07 09:30:01 +00:00
Rodrigo Girão Serrão
d08699ff50 Update placeholder snapshot test.
Although there was no visual difference in the output, the snapshot tool was complaining because there are now less things to draw on the screen, thus the snapshots looked different. Hence, the placeholder snapshot needed to be updated.
2023-01-06 18:30:39 +00:00
Darren Burns
3fe855296c Raise exception from index to cell position method 2023-01-06 16:34:57 +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
Darren Burns
c90e12a35b Remove unused import in test file 2023-01-06 13:59:52 +00:00
Darren Burns
433c86d4b9 Remove unused test file 2023-01-06 13:59:36 +00:00
Darren Burns
733b8934fe Merge branch 'main' of github.com:Textualize/textual into cursor-blink-bug 2023-01-06 13:57:08 +00:00
Darren Burns
1bd720ef0d Index to cell position 2023-01-06 13:55:48 +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
Darren Burns
0abeba620e Method for converting Strip index to cell position 2023-01-06 11:14:15 +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
Darren Burns
a6e751c7a4 Merge branch 'main' of github.com:Textualize/textual into cursor-blink-bug 2023-01-04 13:01:31 +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