Commit Graph

528 Commits

Author SHA1 Message Date
Dave Pearson
c2a19bd632 Merge pull request #2510 from davep/chainsaw
Add the ability to remove nodes from a `Tree`
2023-05-08 10:51:44 +01:00
Dave Pearson
0bb0f4d179 Merge pull request #2508 from davep/add-options
Add `add_options` to `OptionList`
2023-05-08 10:51:15 +01:00
Rodrigo Girão Serrão
1e2f632fc6 Fix TabbedContent __init__ signature. (#2497) 2023-05-08 10:47:15 +01:00
Willi Ballenthin
483aa54bd6 Catch OSError when source code is not available (#2469)
* Catch OSError when source code is not available

* update changelog with reference to fixed bug
2023-05-08 10:45:56 +01:00
Rodrigo Girão Serrão
819b2f1eb3 Add DataTable.move_cursor (#2479)
* Add 'DataTable.move_cursor'.

Related issues: #2472.

* Fix #2471.

* Simplify cursor changes.

* Address review feedback.

Related comments: https://github.com/Textualize/textual/pull/2479\#discussion_r1185016002
2023-05-08 10:44:34 +01:00
Dave Pearson
c9d7bb84e2 Update the CHANGELOG 2023-05-08 10:18:34 +01:00
Dave Pearson
6bb2b21091 Update the CHANGELOG 2023-05-08 10:17:36 +01:00
Dave Pearson
e526a32220 Update the CHANGELOG 2023-05-07 18:07:31 +01:00
Dave Pearson
bba694e93a Update the ChangeLog 2023-05-04 14:30:20 +01:00
Dave Pearson
47f52f7692 Merge branch 'main' into tree-lines-fix 2023-05-04 14:27:46 +01:00
Dave Pearson
f6da3e9fb2 Add always_update as a parameter for a var reactive 2023-05-04 14:16:34 +01:00
Will McGugan
04083a73f8 exclusive false (#2470)
* exclusive false

* changelog
2023-05-04 11:46:20 +01:00
Dave Pearson
7dfc3e57a1 Fix a crash when DirectoryTree starts out anywhere other than .
A hangover from the previous DirectoryTree, where setting the path didn't
matter. This now sets it *after* calling Tree's __init__, thus ensuring the
line cache and other related things have been created.
2023-05-03 20:54:54 +01:00
Rodrigo Girão Serrão
3728555fbd Scroll cursor into view. (#2464)
* Scroll cursor into view.

Related issues: #2459.

* Add regression test.

* Update changelog.
2023-05-03 13:57:04 +01:00
Will McGugan
e5c54a3683 blog post (#2465)
* blog posts

* fix typo

* word

* version bump

* changelog

* update words
2023-05-03 13:22:22 +01:00
Dave Pearson
9e15dc45aa Link the non-issue-related DirectoryTree change back the PR 2023-05-03 11:30:44 +01:00
Dave Pearson
af0ed17ebd Merge branch 'main' into directory-tree-redux 2023-05-03 10:06:30 +01:00
Dave Pearson
c4e2144207 Update the CHANGELOG 2023-05-03 09:59:35 +01:00
Will McGugan
90d9693168 typo 2023-05-02 16:36:41 +01:00
Will McGugan
91a9d570a4 On decorator (#2453)
* Add on decorator

* decorator code

* docs for on decorator

* Examples

* test errors

* simplify listing

* words

* changelog

* Update docs/guide/events.md

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

* Update docs/guide/events.md

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

* Update docs/examples/events/on_decorator.css

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

* Update docs/guide/events.md

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

* rewording

* comment

* clarification

* Added note

---------

Co-authored-by: Dave Pearson <davep@davep.org>
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-05-02 16:17:40 +01:00
Dave Pearson
16ca3e10d1 Merge branch 'main' into outline-top-bottom-colour-glitch 2023-05-02 11:34:14 +01:00
Dave Pearson
9c26c6ef32 Merge branch 'main' into outline-top-bottom-colour-glitch 2023-05-02 11:05:52 +01:00
Dave Pearson
7e570df4f4 Fix outline-top and outline-bottom not handling colour alpha
See #2371.
2023-05-02 11:03:54 +01:00
Dave Pearson
87847cea4c Update the CHANGELOG 2023-05-02 10:16:45 +01:00
Dave Pearson
4ab9ba9268 Merge branch 'main' into overall-important 2023-05-02 08:46:52 +01:00
Will McGugan
83b1fcc102 raise attribute error (#2443)
* raise attribute error

* fix compute defaults
2023-05-01 16:57:40 +01:00
Will McGugan
ba90657559 update changelog 2023-05-01 16:36:05 +01:00
Dave Pearson
60dc38c5cd Merge branch 'main' into overall-important 2023-05-01 16:22:09 +01:00
Dave Pearson
d6eb44bd19 Fix outline-right not being recognised
See #2446.
2023-05-01 15:21:12 +01:00
Dave Pearson
d6f304f5d1 Update the CHANGELOG 2023-05-01 15:19:24 +01:00
Dave Pearson
5a355da78b Fixed !important not applying to border 2023-05-01 14:17:29 +01:00
Dave Pearson
847fd6e69e Add support for private watch methods
This change allows for private watch methods. By convention they start with
an underscore. If a reactive or var has a private watch method, it will be
used in preference to a public watch method.

With this change it becomes easier to have a private reactive/var whose
watcher is also private. For example:

    _counter = var(0)
    """This is a private counter, it won't appear in the docs."

    ...

    def _watch__counter(self) -> None:
        """Watch _counter, but don't appear in the docs either."
        ...

See #2382.
2023-05-01 10:01:50 +01:00
Will McGugan
8fac2c7d2a Bump0223 (#2424)
* button tweak

* fix for windows

* changelog
2023-04-28 20:56:28 +01:00
Will McGugan
c5053eca81 faster focus within (#2423) 2023-04-28 18:08:57 +01:00
Dave Pearson
40f7c97500 Merge branch 'main' into expose-node-tree 2023-04-28 13:58:04 +01:00
Will McGugan
16a1645671 revert timer change (#2417)
* revert timer change

* changelog
2023-04-28 11:47:28 +01:00
Will McGugan
7c696ce378 Updated docs for app.run (#2414)
* fix run app from python

* updated run

* remove function

* update help

* doc update
2023-04-28 10:47:24 +01:00
Dave Pearson
02ed90c633 Add TreeNode.tree
Currently, in the various TreeNode messages, and the handlers you'd write to
handle them, there's no way to easily know *which* tree sent the message and
so which tree the node belongs to.

This commit adds public access to the tree reference to the nodes, so that
in an event handler the developer can check the tree involved in the event.

See #2413.
2023-04-28 10:23:38 +01:00
Will McGugan
124c45e68c Bump0220 (#2405)
* Version bump

* upate version

* fix domain name

* wrong project

* skip on Windows

* disable demo snapshot

* 37 fix
2023-04-27 15:01:46 +01:00
Will McGugan
dd70a7a2dc fix for min and max with fr unints (#2390)
* fix for min and max with fr unints

* snapshit

* forgot snapshit tests

* fix resolve

* added unit tests

* Windoze fix
2023-04-27 13:35:16 +01:00
Dave Pearson
fe99df95fc Fix light mode plain text in non-syntax code blocks in Markdown (#2402)
Bit of a workaround at the moment; ideally longer-term we'll go with
something less hard-coded.

See #2400
2023-04-27 12:03:05 +01:00
Will McGugan
55e198767f Add progress bar to gallery (#2399)
* Add progress bar to gallery

* table fix
2023-04-27 11:37:53 +01:00
Dave Pearson
01df8b0726 Make textual.containers 1fr in meaningful dimensions by default (#2386)
* Make all containers 1fr

An unintended consequence of changes made to containers in v0.21.0 (#2377)
is something like #2385 so this commit sort of rolls that change back, and
solidifies how containers are styled by default in respect to their width
and height. Where appropriate the dimensions will be 1fr.

* Make the DEFAULT_CSS of ProgressBar less greedy

It was attempting to style a Vertical that is uses, but in doing so was
styling all Verticals rather than a Vertical within a ProgressBar.

This fixes that.

* Update the CHANGELOG for the container changes

* Move the ProgressBar CHANGELOG entry into the next release section

* Link the container change entry in the CHANGELOG to its PR

Now that the PR is PRd and we have a PR
2023-04-26 17:07:30 +01:00
Rodrigo Girão Serrão
4148b1d450 Implement a Progress Bar widget. (#2333)
* First prototype of PB.

* Repurpose UnderlineBar.

* Factor out 'Bar' widget.

* Revert "Factor out 'Bar' widget."

This reverts commit 0bb4871adf.

* Add Bar widget.

* Cap progress at 100%.

* Add skeleton for the ETA label.

[skip ci]

* Add ETA display.

* Improve docstrings.

* Directly compute percentage.

* Watch percentage changes directly.

[skip ci]

* Documentation.

* Make reactive percentage private.

Instead, we create a public read-only percentage property.

* Update griffe to fix documentation issue.

Related issues: #1572, https://github.com/mkdocstrings/griffe/issues/128.
Related PRs: https://github.com/mkdocstrings/griffe/pull/135.

* Add example and docs.

* Address review feedback.

[skip ci]

* More documentation.

* Add tests.

* Changelog.

* More tests.

* Fix/fake tests.

* Final tweaks.
2023-04-26 15:25:39 +01:00
Will McGugan
ee0d407067 fix changelog 2023-04-26 14:01:15 +01:00
Will McGugan
f20df9b075 Bump0210 (#2381)
* new version

* docstring
2023-04-26 13:55:41 +01:00
Will McGugan
f53c3cd589 container refactor (#2377)
* container refactor

* Rearrange css

* changelog

* try timer updates

* force update

* sleep idle

* Restore updates
2023-04-26 13:36:08 +01:00
Dave Pearson
f2c56e7cd5 Link the RadioSet CHANGELOG entry to the new PR 2023-04-25 15:17:02 +01:00
Dave Pearson
0d5db58692 Update the CHANGELOG 2023-04-25 15:09:35 +01:00
Dave Pearson
4047c83680 Update the CHANGELOG 2023-04-24 15:22:26 +01:00