Commit Graph

7238 Commits

Author SHA1 Message Date
Will McGugan
98168ae536 fix for textual-web flash 2023-08-28 14:19:47 +01:00
Aaron Stephens
6dd5439eac feat(datatable): add cursor_type to constructor (#3183)
* feat(datatable): add cursor_type to constructor

* fix(datatable): formatting

---------

Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2023-08-28 13:56:17 +01:00
Rodrigo Girão Serrão
a50d27f712 Let layers be strings. (#3169)
* Let layers be strings.

* Changelog.
2023-08-28 13:55:14 +01:00
Rodrigo Girão Serrão
d5f07c26a1 Merge pull request #3065 from Textualize/reactive-callback
Schedule reactive callbacks on watcher.
2023-08-28 13:30:03 +01:00
Rodrigo Girão Serrão
57419aa134 Merge branch 'main' into reactive-callback 2023-08-28 11:24:54 +01:00
Dave Pearson
f929b5e569 Make the icon a string 2023-08-28 11:24:05 +01:00
Dave Pearson
7653c1133d Remove unused imports 2023-08-28 11:20:37 +01:00
Rodrigo Girão Serrão
41006caffc Consider visible children inside invisible containers when computing focus chain (#3070)
* Add regression tests for #3053

* Traverse invisible containers when computing focus chain.

At the moment, we were completely bypassing invisible containers which meant that their visible children wouldn't be included in the focus chain.

* Make note of removed property.

* Add regression test for #3071.

* Fix #3071.

* Fix regression test for #3053.

* Optimize computation of focus chain.

Computing the focus chain was relying on the property 'visible' of nodes which may traverse the DOM up to find the visibility of a given node. Instead, we cache the visibility of the nodes we traverse and keep them in a stack, saving some of that computation.
Related issues: #3071
Related comments: https://github.com/Textualize/textual/pull/3070#issuecomment-1669683285

* Make test more robust.

* Make test more robust.

* Short-circuit disabled portions of DOM.

If a node is disabled, we will not be focusable, nor will its children, so we can skip it altogether.
Related review comment: https://github.com/Textualize/textual/pull/3070/files#r1300292492

* Simplify traversal.

The traversal code could be simplified after reordering some lines of code.
We also get rid of the visibility stack and instead keep everything in the same stack.
Related comments: https://github.com/Textualize/textual/pull/3070#pullrequestreview-1587295458
2023-08-28 11:06:39 +01:00
Dave Pearson
e6b9a264a1 Rename search_for to search
As per this request:

  https://github.com/Textualize/textual/pull/3058#discussion_r1307135816
2023-08-28 11:05:39 +01:00
Claire-me
409363d974 Create CONTRIBUTING.md (#3115)
* Create CONTRIBUTING.md

* Update CONTRIBUTING.md
2023-08-28 11:02:13 +01:00
Dave Pearson
a807061e20 Merge pull request #3186 from davep/link-centre-faq-to-howto
Link the centring FAQ to the HOWTO
2023-08-28 08:53:09 +01:00
Dave Pearson
ab0126f672 Link the centring FAQ to the HOWTO
Keeping it as a FAQ makes sense, as it means that FAQtory will be able to
point to it, but now that we have the HOWTO, and it's more comprehensive, it
makes sense to direct the reader in that direction if they want something
more involved.
2023-08-28 08:39:57 +01:00
Dave Pearson
1b1e26cd16 Merge branch 'main' into M-x 2023-08-28 08:30:41 +01:00
Will McGugan
2519063389 version bump (#3181)
* version bump

* changelog

* snapshot update
v0.35.1 v0.35.0
2023-08-26 17:19:13 +01:00
Will McGugan
821a60fe3b Win wait (#3151)
* input waiter

* waiter objects

* try signal handler for windows

* selectors

* fix win wait

* log meta

* log

* meta loop

* loop

* correct wait

* Waiter tweak

* timeout change

* restore loop

* change constant

* quit

* tweak

* loops

* debug

* debug

* exit on no data

* change wait

* loop tweak

* log

* change wait

* experiement

* wrap with handle

* experiment

* Debug

* handle

* DWORD

* another attempt

* test

* log

* reading

* stream

* tweak

* Restore

* input reader

* reader

* Remove debug

* input reader

* shutdown devtools after waiter

* flush

* fileno

* exit meta

* windows reader

* remove logging

* formatting

* docstring
2023-08-26 16:24:47 +01:00
Will McGugan
9ce1840889 Default to auto 2023-08-26 15:54:07 +01:00
Will McGugan
ee7d728399 color system override 2023-08-26 15:45:33 +01:00
Will McGugan
59646ff21a faq tweak 2023-08-26 10:57:44 +01:00
Will McGugan
d89871b045 update docs for tcss (#3179)
* update docs for tcss

* letter
2023-08-26 10:49:18 +01:00
Dave Pearson
888557747c Reinstate the FAQtory-friendly links in the FAQ (#3142) 2023-08-26 08:35:41 +01:00
Rodrigo Girão Serrão
d674674b22 Update _styles_builder.py (#3168) 2023-08-24 19:40:22 +01:00
Rodrigo Girão Serrão
c01b868b00 Changelog. 2023-08-24 16:14:55 +01:00
Rodrigo Girão Serrão
9980148c26 Use call_next to invoke reactive watchers.
Related review comment: https://github.com/Textualize/textual/pull/3065#issuecomment-1670983082.
2023-08-24 16:07:31 +01:00
Rodrigo Girão Serrão
ac62096b80 Make call_next respect prevented messages.
Related issue: #3166.
2023-08-24 16:06:24 +01:00
Rodrigo Girão Serrão
19b24dd663 call_next preserves prevented messages information.
Provides a regression test for #3166.
2023-08-24 16:05:25 +01:00
Rodrigo Girão Serrão
f97fd81f56 Merge branch 'main' into reactive-callback
Fix CHANGELOG.md in the process.
2023-08-24 11:17:02 +01:00
Rodrigo Girão Serrão
7563a390e5 Merge pull request #3152 from Textualize/disable-tab-pane
Allow enabling/disabling tab via tab pane.
2023-08-23 14:51:43 +01:00
Rodrigo Girão Serrão
9ef644cd77 Add base class for TabPane messages.
Related review comment: https://github.com/Textualize/textual/pull/3152#discussion_r1302921959.
2023-08-23 14:43:38 +01:00
Dave Pearson
fa9a988032 Merge pull request #3155 from davep/handy-makefile-things
Add a couple of `Makefile` targets for things I'm forever typing
2023-08-23 14:41:23 +01:00
Rodrigo Girão Serrão
79f8ab05b7 Revert "Deactivate disabled tab."
This reverts commit 7aa40601ab.
2023-08-23 14:31:34 +01:00
Dave Pearson
6023e774ad Add a couple of Makefile targets for things I'm forever typing
Well, completing in my shell but you get the idea...
2023-08-23 14:31:18 +01:00
Rodrigo Girão Serrão
7aa40601ab Deactivate disabled tab.
Related issues: #3148.
2023-08-23 14:26:17 +01:00
Dave Pearson
c9d3e2d8b7 Merge branch 'main' into M-x 2023-08-23 14:22:28 +01:00
Rodrigo Girão Serrão
c8b06e073f Merge pull request #3140 from Textualize/css-to-tcss
Rename CSS files to TCSS.
2023-08-23 14:13:58 +01:00
Rodrigo Girão Serrão
3f03743cd8 Merge branch 'main' into disable-tab-pane 2023-08-23 14:04:54 +01:00
Rodrigo Girão Serrão
695e59bd3a Merge pull request #3150 from Textualize/fix-3145
Allow modifying tabs in nested contexts
2023-08-23 14:01:10 +01:00
Rodrigo Girão Serrão
a62302cf86 Tests/changelog. 2023-08-23 12:12:50 +01:00
Rodrigo Girão Serrão
7cf1b48f5b Allow enabling/disabling tab via tab pane.
This allows one to use the 'disabled' attribute in tab panes to enable/disable a tab, which is particularly useful if you want to instantiate a tab that starts off as disabled, as seen in #3149.
2023-08-23 12:12:01 +01:00
Rodrigo Girão Serrão
22b63f6717 Simplify and generalise test.
We use the default IDs because that means the nested tabs get the same IDs.

Relevant review comment: https://github.com/Textualize/textual/pull/3150#discussion_r1302811660.
2023-08-23 11:40:55 +01:00
Rodrigo Girão Serrão
32007d78a2 Changelog. 2023-08-23 11:13:53 +01:00
Rodrigo Girão Serrão
0339879f1f Query DOM correctly. 2023-08-23 11:12:23 +01:00
Rodrigo Girão Serrão
0353302216 Allow modifying tabs in nested tabbed contents.
Fixes #3145 with the fix in #3148.
2023-08-23 10:57:49 +01:00
Rodrigo Girão Serrão
4d0db5d13b Add regression test for #3145. 2023-08-23 10:52:29 +01:00
Dave Pearson
a57ed16687 Simplify the command palette action 2023-08-22 20:34:48 +01:00
Dave Pearson
d09455d93b Update the snapshots 2023-08-22 19:38:42 +01:00
Dave Pearson
34c739df78 Properly pad out the left side of the commands in the list 2023-08-22 19:29:21 +01:00
Will McGugan
f3c24db18d don't add signal handler on Windows 2023-08-22 16:20:53 +01:00
Rodrigo Girão Serrão
5ee0ebfef4 Rename CSS files to TCSS.
Related issue: #3137.
2023-08-22 13:21:17 +01:00
Will McGugan
bc1af586b5 version bump (#3139)
* version bump

* changelog
v0.34.0
2023-08-22 13:05:09 +01:00
Will McGugan
59fa326e85 add prelude 2023-08-22 12:56:11 +01:00