I had to blow away my virtual environment, and installing from
requirements.txt worked whereas the existing line didn't, I guess due to
the fixed version number of textual. I don't know exactly, but it seems
pretty silly to try to maintain this list of requirements separately.
This avoids duplicately detecting the format from the file extension
in one case, and in the other case, avoids using a bogus file name to
implement a default fallback file format.
Of course, this highlights the need to prompt during Save as well,
not just Save As, or to make creating color or character information
impossible depending on the type of file that is open.
Can't use self.open_from_file_path because:
1. it short-circuits if the file is already open
2. it clears the undo history*
3. it does stuff with the backup file
4. plus it's not as efficient to use the FS, and it uses a callback,
which is a pain.
*TODO: make the reload undoable
Update style traces when styles are changed with `merge`/`merge_rules`.
I wish `merge` used `merge_rules` so I could define just one extra
instrumentation point. I guess I could make my `merge` use my version of
`merge_rules`, but that feels weird, even if it's probably not any more
fragile to implement it that way.
Using .merge() isn't tracked by the call stack recording (yet), so it
can no longer attribute inline styles to editing with the inspector,
but this lack of tracking was already a problem, it just highlights it.
The old screenshot was generated by Select All and Copy As HTML in
Ubuntu's Terminal app (using a keyboard shortcut that had to be set up
first), and post-processed using code included in screenshot.svg, which
I'm now deleting.
The new screenshot is generated using Textual's built-in SVG export.
It displays nicer, with less artifacts (seams between cells).
It doesn't need such silly explanation of the nature of the screenshot,
and was also sizing to the width of the text, so I removed the wrapper
table which was imitating (standing in for) figure/figcaption elements.
The new screenshot also includes a window border, macOS-styled, which is
a little weird since it's a remake of MS Paint (Windows software)
developed entirely on Ubuntu (Linux distro).
- This regressed due to updates in Textual 0.25.0,
because DirectoryTree now loads directory contents in a worker:
https://github.com/Textualize/textual/issues/2456
- Directory tree expansion may be more robust now, although it's using
more internals now, and it still needs timers for whatever reason.