Dave Pearson
36aa3321ff
Make ToggleButton event handlers private
...
See #2324 .
2023-04-19 10:07:36 +01:00
Dave Pearson
d23024141c
Make Tabs event handlers private
...
See #2324 .
2023-04-19 10:05:53 +01:00
Dave Pearson
1063c0f94c
Make Switch event handlers private
...
See #2324 .
2023-04-19 10:04:05 +01:00
Dave Pearson
d2c8206a8e
Make RadioSet event handlers private
...
See #2324 .
2023-04-19 10:02:47 +01:00
Dave Pearson
404d7b8fb8
Make PlaceHolder event handlers private
...
See #2324 .
2023-04-19 09:53:56 +01:00
Dave Pearson
99d3c9fa79
Make OptionList event handlers private
...
See #2324 .
2023-04-19 09:52:43 +01:00
Dave Pearson
da809ec717
Make Markdown event handlers private
...
See #2324 .
2023-04-19 09:44:03 +01:00
Dave Pearson
6b147487bb
Make LoadingIndicator event handlers private
...
See #2324 .
2023-04-19 09:40:45 +01:00
Dave Pearson
489bcf3ad1
Make ListView event handlers private
...
See #2324 .
2023-04-19 09:39:36 +01:00
Dave Pearson
f9071987bd
Make ListItem event handlers private
...
See #2324 .
2023-04-19 09:37:35 +01:00
Will McGugan
db1b784606
dim filter ( #2323 )
...
* dim filter
* optimization
* Remove test code
* move functions out of filter
* docstring
* move function to module scope
* docstring
* docstrings
2023-04-19 09:31:59 +01:00
Dave Pearson
18a6428738
Make Input event handlers private
...
See #2324 .
2023-04-19 09:30:44 +01:00
Dave Pearson
c9664f0ff5
Make Header event handlers private
...
See #2324 .
2023-04-19 09:20:10 +01:00
Dave Pearson
69477c2a18
Make DirectoryTree event handlers private
...
See #2324 .
2023-04-19 09:17:01 +01:00
Dave Pearson
590c898213
Make ContentSwitcher.on_mount private
...
See #2324 .
2023-04-19 09:13:28 +01:00
Will McGugan
4981effcba
Revert "Prevent reactive-watcher loop in Tabs / TabbedContent." ( #2322 )
...
* Revert "Prevent reactive-watcher loop in Tabs / TabbedContent. (#2305 )"
This reverts commit 66a644845b .
* fix stuck tab
* fix for stuck underline
* snpshot
v0.20.1
2023-04-18 16:46:10 +01:00
Dave Pearson
c9dd89b944
Merge branch 'main' into screen-results
2023-04-18 14:29:40 +01:00
Will McGugan
cc41a7f81d
Bump0200 ( #2320 )
...
* version bump
* changelog
v0.20.0
2023-04-18 13:41:15 +01:00
Will McGugan
bbe38f7d30
faq entry on Transparent backgrounds ( #2319 )
...
* faq entry
* word
* update to words
2023-04-18 13:29:13 +01:00
Dave Pearson
e3babfd812
Drop dismiss_with
...
Just go with a single dismiss method.
2023-04-18 13:11:51 +01:00
Dave Pearson
21783fb479
Fix the typing for ResultCallback.__init__
2023-04-18 12:49:28 +01:00
Dave Pearson
2e7b010301
Allow for a screen being pushed when the stack is empty
...
Under normal circumstances the code wouldn't encounter this problem as
there's always a default screen; but a handful of tests that were testing
the screen stack broke after the recent additions relating to result
callbacks.
This cleans up that problem.
2023-04-18 11:54:32 +01:00
Rodrigo Girão Serrão
66a644845b
Prevent reactive-watcher loop in Tabs / TabbedContent. ( #2305 )
...
* Add regression test for #2229 .
* Fix potential reactive-watch loop.
* Simplify regression test.
Labels are cheaper to use and the final visual result of the test won't depend on the directory it runs from.
* Simplify solution.
Turns out I didn't need a descriptor. :(
* Fail on empty tab.
2023-04-18 11:48:33 +01:00
Rodrigo Girão Serrão
3a7cf08ef2
Make scrollable containers focusable. ( #2317 )
...
* Make scrollable containers focusable.
Related issues: #2270 .
2023-04-18 11:44:32 +01:00
Dave Pearson
77e47f7508
Swap the result callbacks on screens to be a stack of callbacks
...
It is possible for the same instance of a screen to get pushed onto the
screen stack multiple times; as such we really need to keep track of all the
callback requests.
So here I register a callback for every screen push and clean it up on every
screen pop; with those without callbacks being no-ops.
2023-04-18 11:40:12 +01:00
darrenburns
496f8b4524
Updating styles on demand instead of on_idle ( #2304 )
...
* Updating styles on demand instead of on_idle
* Tidy up update_styles
* Fix LRU cache tests
* Remove some debugging code
* Adding test for pseudoclass style update
* Update changelog
2023-04-18 11:36:00 +01:00
Rodrigo Girão Serrão
01d67173e8
Don't expose snippets publically. ( #2300 )
2023-04-18 10:19:43 +01:00
Dave Pearson
b67f4f89cc
Initial testing of screen result callbacks
...
This is roughly how it should work. Having got this going and constructed
test code to go with it (outwith of this commit, not unit testing code, just
a test app to try out the ideas), I wanted to get this onto the forge for
further mulling over tomorrow.
The one sneaky/questionable thing here is that I'm sort of dumpster-diving
the screen stack to get the "parent" screen, to make the callback in
context. This both feels right and feels like a cheat. On the other hand
it's public for a reason, right?
Right?
2023-04-17 21:03:49 +01:00
Will McGugan
e930e82526
fix for win driver ( #2303 )
2023-04-17 17:06:07 +01:00
Dave Pearson
f8b51ea269
Ensure the active message pump is set when app is the sender ( #2302 )
...
See https://github.com/Textualize/textual/issues/2301
2023-04-17 16:23:31 +01:00
Will McGugan
0509cf8948
Border style ( #2292 )
...
* border styles
* docs for border styles
* fix tests
* tests
* tests and docs
* changelog
* implement auto
* style information fix
2023-04-16 12:31:39 +01:00
Dave Pearson
9fb63f9b53
Merge pull request #2286 from davep/faqup
...
Update the centring FAQ to reference `Center`
2023-04-15 09:05:07 +01:00
Dave Pearson
52dcca4e8c
Merge pull request #2287 from davep/export-button-variant
2023-04-14 15:59:01 +01:00
Dave Pearson
3c1a311a67
Update the Button docs to mention ButtonVariant
...
I'm not 100% sure how to get this into the docs as I'd like, and it seems
we've moved the API docs around a lot in respect to widgets, recently (I'm
aware of this but aren't sure what the new layout is yet).
This at least starts to get things into the right place.
2023-04-14 13:08:26 +01:00
Dave Pearson
8fe14e44da
Update the CHANGELOG
2023-04-14 12:19:24 +01:00
Dave Pearson
3ce910f764
Add textual.widgets.button to expose ButtonVariant
...
See #2264 .
2023-04-14 12:17:53 +01:00
Dave Pearson
bec01e99d1
Rebuild the FAQ
...
Keep forgetting to do this!
2023-04-14 12:11:45 +01:00
Dave Pearson
ee8153c9ed
Update the centring FAQ to reference Center
...
See #2263 .
2023-04-14 12:09:25 +01:00
darrenburns
898de5a69c
Fix for empty ListView bindings not firing ( #2281 )
...
* Fix bindings not firing when ListView is empty
* Regression test for empty ListView bindings not working
* Update changelog
2023-04-13 15:32:56 +01:00
Will McGugan
5e50b2e417
optimization
2023-04-13 14:33:01 +01:00
Will McGugan
58b8d22a3c
remove bell
2023-04-13 14:23:06 +01:00
Will McGugan
04b994836c
Strips render optimization ( #2278 )
...
* WIP optimization
* optimization
* simplify, add comments
* docstring
* Update src/textual/_compositor.py
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
* Update src/textual/_compositor.py
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
* Update src/textual/strip.py
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
* Update src/textual/_compositor.py
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
* driver bell
* optimize render
---------
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
2023-04-13 14:15:32 +01:00
darrenburns
5246282c22
Improving data table documentation ( #2279 )
...
* Improving data table documentation
* More info on DataTable
* Add note on retrieving cursor coordinate
* Add note on DataTable supporting more than just strings
* Add note on cell styling and justifying - common question
* Slight rewording
* Explaining what "row labels" are.
* Update docs/widgets/data_table.md
Co-authored-by: Will McGugan <willmcgugan@gmail.com >
* Update docs/widgets/data_table.md
Co-authored-by: Will McGugan <willmcgugan@gmail.com >
* Update docs/widgets/data_table.md
Co-authored-by: Will McGugan <willmcgugan@gmail.com >
* Update docs/widgets/data_table.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
* Update docs/widgets/data_table.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
* Update docs/widgets/data_table.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
* Update docs/widgets/data_table.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
* Update docs/widgets/data_table.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
* Improve data table fixed rows/columns docs
* Update some examples
---------
Co-authored-by: Will McGugan <willmcgugan@gmail.com >
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
2023-04-13 14:09:19 +01:00
Rodrigo Girão Serrão
bb2c31ba35
Add --port option to textual console. ( #2258 )
...
* Add --port option to textual console.
* Changelog.
* Address review feedback.
* Mark unpredictable test as xfail.
This test gets an xfail mark until #2254 is open.
* Make DEVTOOLS_PORT a constant.
Related review: https://github.com/Textualize/textual/pull/2258\#discussion_r1165210395
* Factor logic into function.
Related review: https://github.com/Textualize/textual/pull/2258\#discussion_r1165298259
* Remove dead import.
2023-04-13 11:57:35 +01:00
Rodrigo Girão Serrão
e32cdbb390
Merge pull request #2276 from Textualize/tabs-scroll-to-center
...
Scroll to center when tab is clicked.
2023-04-13 10:48:15 +01:00
Rodrigo Girão Serrão
5104cbe501
changelog
2023-04-12 22:28:48 +01:00
Rodrigo Girão Serrão
663b09736e
Scroll to center when tab is clicked.
...
Related comment: https://github.com/Textualize/textual/issues/2256#issuecomment-1505551728
2023-04-12 22:25:37 +01:00
Will McGugan
c249548c43
Move responsibility for writing in to driver ( #2273 )
...
* Move responsibility for writing in to driver
* remove driver property
* optimization for segments
* force terminal
* Update src/textual/drivers/_writer_thread.py
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
* no safe box
* safe box false
* force null file
---------
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com >
2023-04-12 17:10:21 +01:00
darrenburns
6369c37907
Ensure styles applied in correct order in DataTable ( #2272 )
...
* Ensure styles applied in correct order in DataTable
* Add snapshot regression test for datatable style ordering
* Update CHANGELOG
2023-04-12 14:45:24 +01:00
Will McGugan
03fa641be7
Simplify driver ( #2252 )
...
* Simplify driver
* remove debug flag
* added set_terminal_size to driver
* restore flush
* Restore debug mode
* docstring
* fix parser
* simplify windows driver
* driver update
* annotations
* docstrings
2023-04-12 13:44:22 +01:00