Commit Graph

5695 Commits

Author SHA1 Message Date
Will McGugan
f5e779c4c4 tabbed content widget (#2059)
* tabbed content widget

* TabbedContent widget and docs

* missing docs

* fix active

* doc fix

* test fix

* additional test

* test for render_str

* docstring

* changelog

* doc update

* changelog

* fix bad optimization

* Update docs/widgets/tabbed_content.md

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

* fix for empty initial

* docstrings

* Update src/textual/widgets/_content_switcher.py

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

* docstring

* remove log

* permit nested tabs

* renamed TabsCleared to Cleared

* added tests, fix types on click

* tests

* fix broken test

* fix for nested tabs

---------

Co-authored-by: Dave Pearson <davep@davep.org>
2023-03-18 10:38:41 +00:00
Will McGugan
2c120c0983 Replace markdown table (#2055)
* Replace markdown table

* snapshots

* fix markdown snapshot

* snapshot update

* imports and docstrings

* remove reference to DataTable

* typing fix
2023-03-18 10:38:26 +00:00
Will McGugan
45520f2da1 color tests to 100% (#2078)
* color tests to 100%

* tweak

* remove overly complex code
2023-03-16 11:42:51 +00:00
Will McGugan
de692aaf07 fix for remove nodes (#2080)
* fix for remove nodes

* added test
2023-03-16 11:36:10 +00:00
Will McGugan
a404ee5e01 add app to active message pump (#2071)
* add app to active message pump

* made sender private

* changelog
2023-03-16 11:26:08 +00:00
Will McGugan
43253f5d80 fix border issue (#2074)
* fix border issue

* add PR to changelog
2023-03-16 09:03:02 +00:00
Will McGugan
9b191914cb copy change 2023-03-15 20:28:02 +00:00
TomJGooding
111233f1b4 fix(markdown): handle hard line breaks (#2060) 2023-03-15 20:24:15 +00:00
Will McGugan
04340bd0ba new post (#2069)
* new post

* Update docs/blog/posts/await-me-maybe.md

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

* Update docs/blog/posts/await-me-maybe.md

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

* Update docs/blog/posts/await-me-maybe.md

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

* Update docs/blog/posts/await-me-maybe.md

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

* words

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
Co-authored-by: Dave Pearson <davep@davep.org>
2023-03-15 16:49:12 +00:00
Will McGugan
8d17ad39fd copy edit 2023-03-15 16:39:05 +00:00
Will McGugan
c889b4bfe9 words 2023-03-15 16:35:18 +00:00
Will McGugan
d64e9a7e67 Update docs/blog/posts/await-me-maybe.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-03-15 16:15:47 +00:00
Will McGugan
66535e9c07 Update docs/blog/posts/await-me-maybe.md
Co-authored-by: Dave Pearson <davep@davep.org>
2023-03-15 16:01:11 +00:00
Will McGugan
01045e6b7f Update docs/blog/posts/await-me-maybe.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-03-15 16:00:55 +00:00
Will McGugan
dab39c719b Update docs/blog/posts/await-me-maybe.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-03-15 15:51:30 +00:00
Will McGugan
31be9e059e new post 2023-03-15 15:34:39 +00:00
Rodrigo Girão Serrão
1246934643 Merge pull request #2030 from Textualize/add-containers
Add containers
2023-03-15 10:37:01 +00:00
Rodrigo Girão Serrão
10a5d171eb Get rid of _Clock and move utility time-related functions to _time.py. (#2042)
* Remove _clock.py::sleep.

* Move _clock.py::get_time_no_wait to _time.py.

* Move _clock.py::get_time to _time.py.

* Remove async version of _time.py::get_time.

We started by removing '_time.py::get_time' because that was the async one and then I renamed 'get_time_no_wait' to 'get_time'.

* Make 'get_time' just an alias.
2023-03-15 08:56:10 +00:00
Will McGugan
c5f1cbd22c Loading indicator simplify (#2050)
* nice simplify

* import

* changelog

* doc [skip ci]
2023-03-14 18:04:58 +00:00
Dave Pearson
d80e38ce03 Merge pull request #2057 from davep/stylezilla
Add some initial rules to a "mega stylesheet"
2023-03-14 15:59:41 +00:00
Rodrigo Girão Serrão
285de4b0fa Merge branch 'main' into add-containers 2023-03-14 14:35:23 +00:00
Rodrigo Girão Serrão
d775a90fa2 Address review comments. 2023-03-14 14:33:10 +00:00
Dave Pearson
8220af4bfe Add some initial rules to a "mega stylesheet"
The start of what will hopefully become a one-stop comprehensive test of all
the fun corners of stylesheet parsing. While not intended to replace all the
other unit tests for CSS, this test should help to quickly and easily be
sure that nothing breaks any valid CSS.

Influenced by #1253 and #1836 this code starts the process of implementing
the requirement outlined in #1838.

Adding more rules -- simple and/or weird -- that are expected and known to
parse without a problem is encouraged.
2023-03-14 14:11:32 +00:00
Will McGugan
85cce4a09e changelog 2023-03-14 10:02:15 +00:00
Rodrigo Girão Serrão
145872c100 Merge pull request #2041 from Textualize/simplify-message-namespace
Simplify namespace for inherited messages from ToggleButton
2023-03-14 09:59:34 +00:00
Will McGugan
507ee48967 version bump (#2049) v0.15.1 2023-03-14 09:57:31 +00:00
Dave Pearson
551d93c7c8 Ensure that Tab is available from textual.widgets (#2045)
Fixes #2044
2023-03-14 09:48:20 +00:00
Dave Pearson
b9c6520db4 Make the Python code for dock.md more... Pythonic (#2046)
Fixes #2043.
2023-03-14 09:47:51 +00:00
Dave Pearson
98f56aa1f6 Fix a typo in example code in the 0.14.0 release blog post (#2047)
Credit to #2021 for the spot.
2023-03-14 09:47:28 +00:00
Dave Pearson
cfb8219e44 Merge pull request #2039 from davep/new-disabled-snapshot-test
Simplify the disabled widgets snapshot test
2023-03-14 08:48:40 +00:00
Rodrigo Girão Serrão
ae83e12483 Simplify namespace for inherited messages.
Related issues: #1814.
Related PRs: 2038.
2023-03-13 16:28:51 +00:00
Rodrigo Girão Serrão
53a56da317 Merge pull request #2038 from Textualize/message-namespaces
Change how to determine whether a message needs an updated namespace
2023-03-13 16:24:11 +00:00
Rodrigo Girão Serrão
f9a1e27c6f Merge branch 'main' into add-containers
[skip ci]
2023-03-13 16:21:46 +00:00
Rodrigo Girão Serrão
eea61c1b0b Fix changelog. [skip ci] 2023-03-13 16:16:00 +00:00
Rodrigo Girão Serrão
f81dd4071c Merge branch 'main' into message-namespaces 2023-03-13 16:08:50 +00:00
Will McGugan
a3887dfcbb new release (#2040)
* new release

* reword [skip ci]
v0.15.0
2023-03-13 15:48:41 +00:00
Dave Pearson
cf62a4a76a Update the snapshots 2023-03-13 15:37:45 +00:00
Dave Pearson
dd49a723ee Simplify the disabled snapshot test
Initially this was "throw most if not all widgets at the display and disable
everything" test; but in #2028 it was requested that this be simplified,
just using the same widget, in enabled and disabled states.

Button seems like a good choice here.

To ensure that things work as intended, I'm going with the approach of
disabling via a container as that's one big change that the disabled
facility brought in.
2023-03-13 15:31:29 +00:00
Rodrigo Girão Serrão
b00b4fb060 Fix #1814. 2023-03-13 15:17:16 +00:00
Rodrigo Girão Serrão
7e83acb966 Add regression test for #1814. 2023-03-13 15:14:12 +00:00
Will McGugan
b0f5c35782 tabs widget (#2020)
* tabs widget

* click underline

* color tweak

* docs

* docs update

* expose Tab

* added remove_tab and clear

* fix cycling

* add animation

* docs

* changelog

* remove recompose

* docstrings

* Update docs/guide/actions.md

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

* Rodrigoed the tabs

* Update docs/widgets/tabs.md

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

* Update docs/widgets/tabs.md

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

* copy

* docstrings

* docstring

* docstring

* Apply suggestions from code review

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

* stop click

* docstring

* auto assign consistent IDs

* Apply suggestions from code review

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

* Document bindings

* document bindings

* Apply suggestions from code review

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

* Apply suggestions from code review

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

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-03-13 14:39:15 +00:00
Rodrigo Girão Serrão
5983d88aa6 Merge pull request #2037 from Textualize/pilot-click-underscore
Pilot can now press _
2023-03-13 14:38:59 +00:00
Rodrigo Girão Serrão
eafa12c9bf Let pilot press _. 2023-03-13 14:13:02 +00:00
Rodrigo Girão Serrão
103c27b942 Add test for pilot pressing underscore.
The pilot pressing the underscore '_' used to be an alias for a short pause (see #2011). This test makes sure that the pilot can press the underscore '_' as any other character key.
2023-03-13 14:11:33 +00:00
Rodrigo Girão Serrão
009270cd69 Remove remaining underscore pauses.
These slipped from #2011.
2023-03-13 14:10:22 +00:00
Dave Pearson
40d9997766 Updates to Pilot.click (#2034)
* Correct the x and y values for pilot-induced clicks

Fixes #2022.

* Update the ChangeLog

* Add modifier key support to `Pilot.click`

---------

Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2023-03-13 13:45:19 +00:00
Will McGugan
5259c9a37e print after stopping writer thread (#2033)
* print after stopping writer thread

* Add to changelog
2023-03-13 13:38:24 +00:00
Rodrigo Girão Serrão
3518d38d85 Update snapshot tests. 2023-03-13 12:02:36 +00:00
Rodrigo Girão Serrão
cc8f65259e Merge branch 'main' into add-containers 2023-03-13 12:00:08 +00:00
Rodrigo Girão Serrão
429c8a3649 Tweak default Center/Middle dimensions.
We set dimensions to 1fr instead of 100% (original request) or blank (previous change) for consistency with the other containers.
2023-03-13 11:48:49 +00:00