Commit Graph

4646 Commits

Author SHA1 Message Date
Dave Pearson
faac89fd8d Remove mention of ChildrenUpdated from the ListView docs
As pointed out in #1649, a `ChildrenUpdated` message is documented but it
doesn't exist in the code. It looks like it got added during development,
then removed after it was realised it wasn't needed, but presumably it got
left in the docs:

  https://github.com/Textualize/textual/pull/1143#discussion_r1030409026
2023-01-24 07:47:18 +00:00
Dave Pearson
bf8a2745bc Update the CHANGELOG 2023-01-23 21:25:48 +00:00
Dave Pearson
20636a5534 Remove some duplication of effort
No need to set the keyword to True when I can just pass the parameter's
value in anyway. This reads a bit nicer.
2023-01-23 21:21:56 +00:00
Dave Pearson
91d6f2b973 Force keyword argument use for expand/collapse/toggle_all
It might seem excessive for just a single argument, but I feel it's
worthwhile doing it here. It's a single boolean parameter on each of the
methods that, left bare, will always end up reading badly. Consider:

    tree.toggle( True )

vs:

    tree.toggle( toggle_all=True )

the former looks awkward at best and ugly at worst; toggle True? What does
that even mean? The latter, while a touch more verbose, makes it really
clear what's going on.

Trying this on for size.
2023-01-23 21:12:16 +00:00
Dave Pearson
c57ca884ca Correct some terrible English 2023-01-23 21:09:21 +00:00
Dave Pearson
2ac3a03471 Add a missing type hint to TreeNode._expand 2023-01-23 20:56:09 +00:00
Dave Pearson
a3c7430f4a Merge branch 'main' into tree-deeply 2023-01-23 19:57:14 +00:00
Rodrigo Girão Serrão
034d1f8940 Merge branch 'main' into fix-1607 2023-01-23 18:37:16 +00:00
Rodrigo Girão Serrão
dde90a8069 Merge pull request #1646 from Textualize/test-pause
Add pause to flaky test.
2023-01-23 18:36:08 +00:00
Rodrigo Girão Serrão
5c73387bca Pause before rendering input widget. 2023-01-23 18:13:27 +00:00
Rodrigo Girão Serrão
3f2ecd1ad8 Update changelog. 2023-01-23 18:11:33 +00:00
Rodrigo Girão Serrão
c1bac9cd8f Update changelog. 2023-01-23 18:03:55 +00:00
Rodrigo Girão Serrão
3d0b607798 Merge branch 'main' into fix-1616 2023-01-23 18:03:27 +00:00
Rodrigo Girão Serrão
f93e14028d Lift styles. 2023-01-23 18:02:57 +00:00
Rodrigo Girão Serrão
cb73dd4ba9 Remove xfail marker. 2023-01-23 18:00:44 +00:00
Rodrigo Girão Serrão
bb1e8d2eec Refresh scrollbars when overflow changes. 2023-01-23 18:00:37 +00:00
Dave Pearson
3212fbc3b7 Merge branch 'main' into widget-importing 2023-01-23 17:44:38 +00:00
Dave Pearson
289135a1c9 Update the CHANGELOG
This aims to make it clear that a small but significant breaking change has
taken place. See #1637.
2023-01-23 17:42:08 +00:00
Rodrigo Girão Serrão
3305659132 Fix silly mistake when resolving merge conflict. 2023-01-23 17:41:23 +00:00
Dave Pearson
0d77209d43 Merge branch 'main' into widget-importing 2023-01-23 17:39:28 +00:00
Dave Pearson
4adfe69ec9 Remove TreeNode as a pseudo-widget
This encourages importing it from `textual.widgets.tree` instead, keeping it
in line with the other changes made for #1637.

Note this is a breaking change.
2023-01-23 17:37:58 +00:00
Rodrigo Girão Serrão
2deb96c3ed Merge branch 'main' into fix-1607 2023-01-23 17:32:02 +00:00
Rodrigo Girão Serrão
33724e4697 Revert "Potential fix for #1616."
This reverts commit c74b81a8a6.
2023-01-23 17:26:57 +00:00
Dave Pearson
67eb5e753a Add support for deeply expanding/collapsing/toggling nodes
This commit moves the bulk of the work of each action into an internal
method that does everything *apart* from invalidating the tree. The idea
being that all of the expanded states get updated, all of the update counts
get updated, and then finally one single tree invalidation takes place (the
latter taking place in the public method, which calls the related internal
method).

See #1430.
2023-01-23 17:25:06 +00:00
Will McGugan
9e35f7b4e4 Merge pull request #1636 from Textualize/stuck-screen
fix stuck screen
2023-01-23 18:03:07 +01:00
Will McGugan
068345076b Merge branch 'main' into stuck-screen 2023-01-23 17:28:17 +01:00
Dave Pearson
7df94c2084 Merge pull request #1641 from davep/explain-before-after
Explain the significance of the before/after types
2023-01-23 16:26:45 +00:00
Rodrigo Girão Serrão
4baf4f4bce Merge pull request #1640 from Textualize/fix-1406
Correct the dimension relative units in grid-rows/columns were assigned to
2023-01-23 16:24:58 +00:00
Will McGugan
b8e8636832 Merge pull request #1633 from davep/click-warn
Catch an attempt to use the `textual` command in a non-dev context
2023-01-23 17:18:03 +01:00
Dave Pearson
c2e406e48a Explain the significance of the before/after types
This was asked about on Discord; reading the docs over again it's not
obvious what an `int` is for, or a `str`. This change seeks to explain
things at the API level at least.
2023-01-23 15:09:22 +00:00
Rodrigo Girão Serrão
e7f76bf85a Add regression tests. 2023-01-23 15:04:36 +00:00
Dave Pearson
383ab18831 Merge pull request #1639 from davep/param-type-sweepup
Remove some parameter types that got missed on `Widget.move_child`
2023-01-23 14:57:16 +00:00
Rodrigo Girão Serrão
86eb12f335 Update changelog. 2023-01-23 14:45:54 +00:00
Rodrigo Girão Serrão
8aeee6a360 Add percent_unit parameter to ScalarListProperty.
Without this information, grid-rows and grid-columns will have the same percent_unit for scalars that are relative and thus relative dimensions will be wrong.
2023-01-23 14:42:27 +00:00
Rodrigo Girão Serrão
8aeb6c1e01 Fix width/height relationshipt with rows/columns. 2023-01-23 14:41:36 +00:00
Dave Pearson
ac11a4f461 Remove some parameter types that got missed on Widget.move_child
Rogue colon likely threw off whatever regexp was being used to hunt the
examples down.
2023-01-23 14:34:54 +00:00
Will McGugan
4a924d446c fix typo 2023-01-23 12:50:34 +01:00
Will McGugan
cd92356b8e update dependencies 2023-01-23 12:46:31 +01:00
Will McGugan
2b3d966410 moar pauses 2023-01-23 12:31:18 +01:00
Will McGugan
81d086e8d7 fix snapshot test 2023-01-23 12:11:05 +01:00
Will McGugan
e852795e10 comment 2023-01-23 12:09:41 +01:00
Will McGugan
dc97baedc5 comment 2023-01-23 12:08:26 +01:00
Will McGugan
b70b3997f0 remove comments 2023-01-23 12:03:38 +01:00
Dave Pearson
d4c71588a7 Make TreeNode available for import via widgets.tree
See #1589.
2023-01-23 10:57:55 +00:00
Will McGugan
3b9bc0d536 fix stuck screen 2023-01-23 11:57:48 +01:00
Dave Pearson
731f4fc93b Make Column and Row available for import via widgets.data_table
See #1589.
2023-01-23 10:50:24 +00:00
Will McGugan
cc1f2f61d9 Merge pull request #1629 from Textualize/rodrigogiraoserrao-patch-1
Skip FAQtory on new issues by Textualize members
2023-01-21 18:15:05 +01:00
Dave Pearson
98f904223c Catch an attempt to use textual command in non-dev
This provides an interim fix for #983. While the longer-term solution for
this is for us to *not* have the `textual` command available if the user has
installed textual rather than textual[dev], this at least informs the user
what's going on and why for now.
2023-01-21 09:42:21 +00:00
Rodrigo Girão Serrão
94157eae59 Skip FAQtory on new issues by Textualize members
Fix #1617 (excellent idea).
2023-01-20 15:47:13 +00:00
Rodrigo Girão Serrão
60faf9f8e2 Fix xfail usage. 2023-01-20 14:47:41 +00:00