Commit Graph

6193 Commits

Author SHA1 Message Date
Dave Pearson
dde3ad397f Remove duplicated setting of height for Select (#2576) 2023-05-16 12:01:45 +01:00
Rodrigo Girão Serrão
41d11996e8 Merge pull request #2580 from Textualize/dismiss-top
Error when dismissing non-active screen.
2023-05-16 11:38:31 +01:00
Rodrigo Girão Serrão
93f4de918c Fix circular import. 2023-05-16 11:30:14 +01:00
Rodrigo Girão Serrão
7a8d6920e8 Error when dismissing non-active screen.
Related issues: #2575.
2023-05-16 11:14:54 +01:00
Will McGugan
6147c28dbf arrange refactor (#2569)
* arrange refactor

* Apply suggestions from code review

Co-authored-by: Dave Pearson <davep@davep.org>

* Apply suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

---------

Co-authored-by: Dave Pearson <davep@davep.org>
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-05-15 14:53:17 +01:00
Rodrigo Girão Serrão
1bba3973bf Merge pull request #2568 from Textualize/empty-paste
Fix empty paste
2023-05-15 14:31:14 +01:00
Rodrigo Girão Serrão
720bd37bba Consume event. 2023-05-15 14:22:16 +01:00
Rodrigo Girão Serrão
f02e2fcdd9 Short-circuit paste on empty text.
Related comments: https://github.com/Textualize/textual/pull/2568#discussion_r1193790630
2023-05-15 14:12:22 +01:00
Rodrigo Girão Serrão
81289c328a Fix empty paste.
Related issues: #2563.
2023-05-15 13:25:01 +01:00
Rodrigo Girão Serrão
fe7812d94d Add regression test for #2563. 2023-05-15 13:24:48 +01:00
Rodrigo Girão Serrão
83618db642 Merge pull request #2527 from Textualize/auto-focus
Add `auto_focus` to screens
2023-05-15 11:04:15 +01:00
Rodrigo Girão Serrão
0b6e3b3040 Merge branch 'main' into auto-focus 2023-05-15 10:41:15 +01:00
Rodrigo Girão Serrão
4db54eac4b Merge pull request #2530 from Textualize/move-child-no-op
Moving child before/after self is a no-op.
2023-05-15 10:39:57 +01:00
Rodrigo Girão Serrão
c967661699 Merge branch 'main' into move-child-no-op 2023-05-15 10:31:43 +01:00
Will McGugan
d266e3685f snapshot update (#2555) 2023-05-12 18:57:53 +02:00
Will McGugan
d061065dcc optimization for divide 2023-05-12 18:29:51 +02:00
Will McGugan
c2e7b619f1 Revert "virtual size and docks"
This reverts commit 9a134b4920.
2023-05-12 15:53:47 +02:00
Will McGugan
4e069abd2e Revert "remove total region update"
This reverts commit 47970dd622.
2023-05-12 15:49:39 +02:00
Will McGugan
47970dd622 remove total region update 2023-05-12 15:45:25 +02:00
Will McGugan
9a134b4920 virtual size and docks 2023-05-12 15:36:49 +02:00
Will McGugan
4434b59982 spacing diagram 2023-05-12 14:03:53 +02:00
Dave Pearson
a065ff572e Correct spelling in a docstring (#2552) 2023-05-12 09:34:27 +02:00
Rodrigo Girão Serrão
4fc56f6db8 Merge pull request #2547 from Textualize/footer-css
Changelog.
2023-05-11 15:12:58 +01:00
Rodrigo Girão Serrão
8dc801fec7 Changelog. 2023-05-11 15:03:21 +01:00
Rodrigo Girão Serrão
a9c38793de Merge pull request #2546 from Textualize/footer-css
Use footer--description component class.
2023-05-11 15:01:01 +01:00
Rodrigo Girão Serrão
58cf825eb4 Use footer--description component class.
Related issues: #2544.
2023-05-11 12:19:29 +01:00
Will McGugan
0dc89dc2a8 wrong axis 2023-05-10 22:25:04 +02:00
Will McGugan
5a02f7335e fix docstrings 2023-05-10 22:21:30 +02:00
Dave Pearson
2d75ca0d77 Merge pull request #2536 from davep/expand-tree-expand-messages
Ensure that `TreeNode` messages are posted when via-API changes are made
2023-05-10 14:18:24 +01:00
Rodrigo Girão Serrão
70e97c6703 Merge pull request #2532 from Textualize/sub-title-str
Allow setting (sub)title of any type.
2023-05-10 13:20:47 +01:00
Rodrigo Girão Serrão
8dd627b0f4 Merge branch 'main' into sub-title-str 2023-05-10 13:10:48 +01:00
Dave Pearson
28be54d10d Merge branch 'main' into expand-tree-expand-messages 2023-05-10 10:12:58 +01:00
Dave Pearson
f19f46bba0 Merge pull request #2519 from davep/cygnus-x-1
Fix for `resolve_fraction_unit` zero division error (#2502)
2023-05-10 10:10:55 +01:00
Dave Pearson
c7fc66fa6c Ensure that TreeNode messages are posted when via-API changes are made
Until now the Tree.NodeExpanded and Tree.NodeCollapsed messages were only
sent out when changes were made to the tree by user interaction. This meant
that if any changes were made with the TreeNode expand, expand_all,
collapse, collapse_all, toggle or toggle_all API calls no messages would be
sent.

This PR corrects this.

The work here is, in part, required for #2456 (DirectoryTree lazy-loads
directory information on node expansion so if someone is expanding nodes
under code control the DirectoryTree never gets to know that it should load
a directory's content) and will build on #1644, essentially adding a missing
aspect to the latter PR.
2023-05-10 09:24:07 +01:00
Dave Pearson
0eeadf9ae9 Update the CHANGELOG 2023-05-09 21:01:31 +01:00
Rodrigo Girão Serrão
41466be007 Add docstrings. 2023-05-09 17:10:08 +01:00
Rodrigo Girão Serrão
fcf9806f6b Add clarifying comment. 2023-05-09 17:00:07 +01:00
Rodrigo Girão Serrão
17af473558 Annotate no-op. 2023-05-09 16:58:56 +01:00
Rodrigo Girão Serrão
e8baf52bdd Allow setting (sub)title of any type.
Related issues: #2521.
2023-05-09 16:56:56 +01:00
Rodrigo Girão Serrão
3245eb38bb Make auto-focus a class var.
Related comments: https://github.com/Textualize/textual/pull/2527\#discussion_r1188776849
2023-05-09 16:44:37 +01:00
Rodrigo Girão Serrão
eafe6b1786 Moving child before/after self is a no-op.
Related issues: #1743.
2023-05-09 15:57:23 +01:00
Dave Pearson
8855471125 Merge pull request #2522 from davep/move-widget-enhanced-testing
Make the widget moving tests more granular and add more tests
2023-05-09 15:07:59 +01:00
Rodrigo Girão Serrão
8d3f69a04d Add auto_focus attribute to screens. 2023-05-09 14:57:50 +01:00
Rodrigo Girão Serrão
ed4d811451 Add tests for Screen auto focus.
Related issues: #2457.
2023-05-09 14:55:18 +01:00
Dave Pearson
a0558e87d8 Merge branch 'main' into cygnus-x-1 2023-05-09 13:38:16 +01:00
Dave Pearson
8d7ae4d1fb Ensure that remaining fraction is always above zero 2023-05-09 13:36:32 +01:00
Dave Pearson
ee70713002 Simplify the resolver zero division bug unit test 2023-05-09 13:35:55 +01:00
Dave Pearson
d3de6d1587 Make the widget moving tests more granular and add more tests
Adds two (currently xfail) tests to illustrate #1743
2023-05-09 11:19:00 +01:00
Dave Pearson
a77dbf4bee Tentative fix for resolve_fraction_unit ZeroDivision error
I'll admit to not really following what the code does, so will really need
someone with a better understanding of the aim of this code to look over the
proposed fix; but based on a bunch of runs and hand-debugging, this seems to
do the job.

This passes all existing tests and also removes the reported error.

On the other hand I'm not confident that I'm *not* just masking an
underlying issue with this function.
2023-05-09 10:38:09 +01:00
Dave Pearson
a5cc96cbc7 Make a pass of the #2502 test a fail
If/when I get this actually passing, I want the test to appear to fail so I
know things have changed for the better.

This makes sense, trust me.
2023-05-09 09:44:51 +01:00