Widgets: Add TerminalView
Introduces a TerminalView widget that
- Automatically includes terminal styling from #864 , which is now an internal style class
- Includes toggleable autoscroll functionality
- Uses a scrollable
TextView
Also:
- Switches message dialog to use this new widget
- Moves
Terminal Viewto it's own page in the demo app
Future extensions
- Include option to automatically tie to stdout or stderr
- Support ANSI graphics and color escape codes
If it's possible with this widget, maybe it would be worth to show colour palette?
Small snippets on how to archive those colours. e.g. for [PASS], [FAIL], [WARNING].
If it's possible with this widget, maybe it would be worth to show colour palette?
Supporting ANSI Graphics/Color escape codes would be useful. However, I don't know whether it would be better to delay this PR to add that support, or to include that support in a follow-up.
—Edit:
Thinking further on it, this is probably better in a follow-up. At minimum (thinking out loud), I expect this would require a fully defined TextTagTable, some reworking of the stylesheet to allow us to actually apply foreground colors, and some mechanism to apply the tags.