See #1661 for lots of context. Long story short, in Windows Terminal it
looks like any character that would requite the press of a modifier key
causes a NUL to appear in the pasted text for that character. This feels
like it could be a bug in Windows Terminal and we will investigate and
report at some point.
Meanwhile though this provides a workaround that has the paste experience
work the same as I'm seeing on macOS (and I would imagine in most terminals
on GNU/Linux too).
We copy the mkdocstrings template for attributes so that we can exclude the (default) value for attributes (and class variables) from the documentation as that is generally useless.
This is the fix for #1372 because the styles that were sticking had nothing to do with `:hover` per se.
The issue was in the fact that we were trying to start a second animation (back to the default background color) while the first animation hadn't started yet, so we would skip the creation of the new animation but the old one would still run to completion.
This issue also affects animations that start with a delay. If we set an animation A -> B with a delay of 10s and 1s later we set an animation B -> A, then the animation A -> B will run after 9s but the animation B -> A will not run because it was not created in the first place.
See https://github.com/Textualize/textual/pull/1644#issuecomment-1401720808
where Darren raises the excellent point that while the "technically correct"
approach that I had was... well, technically correct I guess (it toggled all
the nodes from the target node down), it didn't have what was likely the
desired effect.
So this commit does away with the previous logic for doing the toggle and
instead simply calls on expand or collapse depending on the state of the
source node.
Somehow I'd managed to typo them as True when they obviously should be False
to maintain backward-compatibility (and generally this is the only sensible
default).
As pointed out in #1649, a `ChildrenUpdated` message is documented but it
doesn't exist in the code. It looks like it got added during development,
then removed after it was realised it wasn't needed, but presumably it got
left in the docs:
https://github.com/Textualize/textual/pull/1143#discussion_r1030409026