Fixes #5391, #5392 - Add Terminal.Gui.Interop.Spectre with SpectreView and style bridge#5393
Merged
Conversation
9 tasks
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/7113b76f-a6aa-4ba6-a74f-c5cdbaf39f4a Co-authored-by: tig <585482+tig@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add SpectreView to render IRenderable in Terminal.Gui app
Add SpectreView to render Spectre.Console IRenderable inside Terminal.Gui
May 24, 2026
This comment was marked as outdated.
This comment was marked as outdated.
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/8f20c41f-e3ce-4e4a-a667-bdf8cfbeaabd Co-authored-by: tig <585482+tig@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
Copilot
AI
changed the title
Add SpectreView to render Spectre.Console IRenderable inside Terminal.Gui
Add SpectreView interop and UICatalog scenario for Spectre.Console renderables
May 24, 2026
Member
|
@copilot use gui-cs/tuirec to record a gif of the new scenario in action and add the gif to docs/images. |
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/f35cf387-5838-43a1-8bd9-28c882fe97af Co-authored-by: tig <585482+tig@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
Copilot
AI
changed the title
Add SpectreView interop and UICatalog scenario for Spectre.Console renderables
Add SpectreView interop, UICatalog scenario, and demo GIF for Spectre.Console renderables
May 24, 2026
This comment was marked as outdated.
This comment was marked as outdated.
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/b17a0837-992b-4a05-92f2-b1d8b62b83f2 Co-authored-by: tig <585482+tig@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
Copilot
AI
changed the title
Add SpectreView interop, UICatalog scenario, and demo GIF for Spectre.Console renderables
Add SpectreView interop, UICatalog scenario, and validated demo GIF for Spectre.Console renderables
May 24, 2026
Member
|
@copilot see the code cleanup .md doc in ./.claude and use it on all touched files. |
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/588b85ed-beb4-452b-9967-f8f75eac4f93 Co-authored-by: tig <585482+tig@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/e51b923f-3781-4315-8458-2ffa6138ea61 Co-authored-by: tig <585482+tig@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
Copilot
AI
changed the title
Add SpectreView interop, UICatalog scenario, validated demo GIF, and touched-file cleanup
Add SpectreView interop, UICatalog scenario, validated demo GIF, and tuirec recording guidance docs
May 24, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add SpectreMarkupBridge.ToSpectreStyle() for TG->Spectre conversion - Add NuGet package metadata to interop project - Add project to Terminal.sln - Add tests for round-trip, Markup IRenderable, default/none colors - Rename scenario to 'Spectre' / 'Demonstrates Spectre.Console integration' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4 tasks
Cycles through Table, Panel, Rule, Tree, BarChart, Calendar, Figlet, Markup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…l console - Skip Segment.IsControlCode segments to prevent ANSI escapes in output - Use ref col parameter in DrawSegment for consistent column tracking - Replace global AnsiConsole.Console with dedicated null-output console - Add GitVersion.MsBuild for consistent package versioning - Add tests for control code skipping and zero-width character alignment Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
BDisp
approved these changes
May 24, 2026
Collaborator
BDisp
left a comment
There was a problem hiding this comment.
Fantastic implementation done here!
This was referenced May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
Terminal.Gui.Interop.Spectre— a separate assembly that bridges Spectre.Console rendering into Terminal.Gui applications.Fixes #5391 — Style/Color conversion bridge
Fixes #5392 — SpectreView for rendering any IRenderable
What's Included
SpectreView : ViewA read-only View that renders any Spectre.Console
IRenderable:SpectreMarkupBridgeBidirectional style conversion:
Style.ToAttribute()— Spectre → TG (colors + decorations)Attribute.ToSpectreStyle()— TG → Spectre (round-trip safe)UICatalog Scenario
"Spectre" scenario demonstrating Table, Panel, Rule, Tree, BarChart, Calendar, FigletText, and Markup rendering.
Architecture
Terminal.Gui.Interop.Spectre) — no Spectre dependency in core TGTerminal.Gui.Interop.SpectreTerminal.slnTests
10 tests covering: style conversion, reverse conversion, round-trip, default/none colors, Markup rendering, Table/Panel/Rule/Tree/BarChart/FigletText, re-render on change, DimAuto content sizing, integration with Window.