Commit Graph

4646 Commits

Author SHA1 Message Date
Rodrigo Girão Serrão
cdb68c9ba1 Remove dead code. 2023-01-18 14:38:03 +00:00
Will McGugan
9d58293fd5 Restore copy button 2023-01-18 13:52:07 +00:00
Will McGugan
a8cefabade Merge pull request #1602 from davep/chill-out-list-view-tests
Sprinkle some pauses in the ListView tests
2023-01-18 05:49:49 -08:00
Darren Burns
0b7705c3cd Update CHANGELOG.md regarding DataTable cursor reset origin fix 2023-01-18 13:21:51 +00:00
Darren Burns
15392b9091 Add DataTable medium-sized test for clearing 2023-01-18 13:19:45 +00:00
Dave Pearson
7d307f902c Sprinkle some pauses in the ListView tests
The new ListView tests have been failing randomly in CI. Sprinkle some
pauses to allow keys to be processed so see if this helps some.
2023-01-18 12:31:13 +00:00
Rodrigo Girão Serrão
064cbc9b6f Fix attribute type hinting and docstrings.
The type hint alone was not enough for the tooling to pick up the type, so we decided to add explicit type hints when assigning the attributes in __init__ because that is enough for the tooling, and having the explicit type hints in the code means type checkers can make sure the type hints add up. If we have explicit type hints in the docstrings, those can become outdated without us noticing.
2023-01-18 12:26:36 +00:00
Rodrigo Girão Serrão
f34685b18f Remove base class NodeMessage. 2023-01-18 12:25:07 +00:00
Darren Burns
4c633bd353 Resetting cursor/hover on clear of DataTable 2023-01-18 12:06:12 +00:00
Will McGugan
939f49d1cd Merge pull request #1600 from davep/allow-inherit-listview
Allow populating a child class of `ListView` purely from its `compose`
2023-01-18 03:50:06 -08:00
Rodrigo Girão Serrão
f620da2682 Document the Message attributes. 2023-01-18 11:43:27 +00:00
Dave Pearson
7544448002 Reduce the hits on validation of index on startup
See https://github.com/Textualize/textual/pull/1600#pullrequestreview-1253248684
2023-01-18 11:27:06 +00:00
Dave Pearson
e3c6dea0d4 Update the CHANGELOG 2023-01-18 10:47:03 +00:00
Dave Pearson
b62d14c0d5 Ensure ListView.index is correct in all post-mount situations
This seeks to fix #1588 by ensuring that the index property is set to an
acceptable value after any items have been mounted within the ListView, thus
ensuring that an inherited ListView, which uses compose to add items rather
than having them passed via __init__, works as expected.
2023-01-18 10:43:45 +00:00
Dave Pearson
76272bcefe Extend ListView test to test an empty inherited list
For testing permutations of #1588.
2023-01-18 10:42:42 +00:00
Rodrigo Girão Serrão
72ce24c324 Fix docstrings for new commits. 2023-01-18 10:42:04 +00:00
Rodrigo Girão Serrão
0c2979f731 Merge branch 'main' into docs-sweep 2023-01-18 10:40:01 +00:00
Dave Pearson
9dede19a1f Add a test for inheriting from a ListView
Added to test the fail in #1588. Any fix for this should cause this test to pass.
2023-01-18 10:27:58 +00:00
Will McGugan
c214ca3697 Merge pull request #1598 from davep/pcent-text-update
Seek to improve the explanation of what a percentage does
2023-01-18 02:14:58 -08:00
Dave Pearson
05b3ab6c78 Refine the explanation of percentage
Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2023-01-18 10:05:40 +00:00
Will McGugan
a70520f5e1 Merge pull request #1547 from Textualize/datatable-events
DataTable improvements (and more)
2023-01-18 02:01:33 -08:00
Will McGugan
5fad4ad36c Merge branch 'main' into datatable-events 2023-01-18 01:46:21 -08:00
Rodrigo Girão Serrão
15330e46e4 Remove explicit type hints from docstrings.
No point in having explicit type hints in docstrings because our tooling extracts them automatically. This applies the DRY principle and reduced the probability of us having wrong docstrings.
2023-01-17 18:11:56 +00:00
Will McGugan
c87711ca0d Merge pull request #1551 from Textualize/fix-1420
Raise clearer exception when `none` is in a space-separated list of text styles.
2023-01-17 10:05:27 -08:00
Rodrigo Girão Serrão
9c7a949093 Merge pull request #1595 from Textualize/fix-1196-add-focus-selector
Fix 1196 add focus selector
2023-01-17 16:48:34 +00:00
Dave Pearson
330950e6b0 Seek to improve the explanation of what a percentage does
I've seen a couple or so folk get confused about what a percentage value for
a dimension means, often seeming to think it means that percentage of
the *remaining* space within a container as opposed to a percentage of the
space in the container (note total space, not remaining space).

I'm not sure the wording here is the final form we want (there's more
mention of "dimension" here than your average Star Trek or Doctor Who
episode!), but I think it's narrowing in on it.

Making this change to place-hold the need to improve this and perhaps gather
some input to find the best final wording.
2023-01-17 16:33:30 +00:00
Will McGugan
fc2073386c Merge pull request #1591 from davep/compose-error-expand
Reraise compose TypeError from the error rather than None
2023-01-17 07:45:30 -08:00
Will McGugan
507413d473 updated text 2023-01-17 15:39:59 +00:00
Will McGugan
3104ae0d9d Merge branch 'key-minus' 2023-01-17 15:38:40 +00:00
Will McGugan
f13b7f7fe5 Merge pull request #1596 from Textualize/key-minus
Key minus
2023-01-17 07:36:12 -08:00
Will McGugan
1bfc19f480 help message 2023-01-17 15:24:31 +00:00
Rodrigo Girão Serrão
88a1fe013c Tweak docstrings. 2023-01-17 15:20:04 +00:00
Will McGugan
e32344615a Added test 2023-01-17 15:19:40 +00:00
Will McGugan
2bd1372c38 added minus key 2023-01-17 15:18:31 +00:00
darrenburns
da1d56202f Merge branch 'main' into datatable-events 2023-01-17 15:12:53 +00:00
Darren Burns
d37e9717d9 Update the CHANGELOG regarding DataTable improvements and fixes 2023-01-17 15:12:08 +00:00
Darren Burns
5a60726bdd A couple of missing DataTable docstrings 2023-01-17 15:05:29 +00:00
Rodrigo Girão Serrão
1ebbf3c7fa Docstrings and remove dead code. 2023-01-17 15:05:25 +00:00
Rodrigo Girão Serrão
4221febf44 Update changelog. 2023-01-17 15:04:15 +00:00
Darren Burns
c98a9249ee Ensure correct events raised on cursor_type change 2023-01-17 15:03:09 +00:00
Rodrigo Girão Serrão
d2726d18f1 Add selector to focus next and previous. 2023-01-17 15:02:29 +00:00
Rodrigo Girão Serrão
4963f62893 Use focusable widgets in tests. 2023-01-17 15:02:09 +00:00
Rodrigo Girão Serrão
ed1f7331d8 Add focus tests. 2023-01-17 14:56:45 +00:00
Rodrigo Girão Serrão
12f272d507 Fix tests.
I misread the original app hierarchy and was trying to focus something that can't be focused.
2023-01-17 14:56:35 +00:00
Darren Burns
e1de10d21a Pause after input test 2023-01-17 14:26:16 +00:00
Dave Pearson
984fa41de5 Fix typo/thinko in CHANGELOG 2023-01-17 14:25:44 +00:00
Will McGugan
c2a6e2f8b5 Merge pull request #1581 from Textualize/fix-textlog-wrap
Fixes for textlog issues
2023-01-17 06:23:11 -08:00
Darren Burns
8a04f13ad1 Mention the handler names for DataTable events in docs 2023-01-17 14:22:46 +00:00
Dave Pearson
16f21ecfc8 Reraise compose TypeError from the error rather than None
In its current form, if someone's `compose` results in an uncaught TypeError
in their own code, the resulting error will hide the source. This small
change ensures that the main problem (compose returned something that can't
be turned into a list) is still reported, but also provides the developer a
trackback they can look at to see what the ultimate source of the issue was.
2023-01-17 14:22:32 +00:00
Will McGugan
2956f1f4d8 update change log [skip ci] 2023-01-17 14:22:25 +00:00