Skip to content

Release v2.2.2#5354

Merged
tig merged 18 commits into
mainfrom
release/v2.2.2
May 21, 2026
Merged

Release v2.2.2#5354
tig merged 18 commits into
mainfrom
release/v2.2.2

Conversation

@tig
Copy link
Copy Markdown
Member

@tig tig commented May 21, 2026

Release v2.2.2

Version: 2.2.2
NuGet Package: Terminal.Gui 2.2.2

What happens when this PR is merged

  1. ✅ The Finalize Release workflow will automatically create tag v2.2.2
  2. ✅ The Publish workflow will build and push to NuGet.org
  3. ✅ A GitHub Release will be created with auto-generated notes
  4. ✅ A back-merge PR from maindevelop will be opened

Checklist

  • CI passes on this PR
  • Version looks correct: 2.2.2
  • Release notes reviewed (will be auto-generated on merge)

tig and others added 18 commits May 19, 2026 08:48
Back-merge v2.2.1 from main into develop
…rationSetup

- Update PageDown_OneStep baselines from ~20ms to ~53ms (matching
  ScrollDown_OneStep, since both call LayoutAndDraw)
- Add missing ScrollUp_OneStep and ScrollRight_OneStep baseline entries
- Replace single IterationSetup with targeted setups: ScrollUp starts
  at the first visible row with RowOffset > 0, ScrollRight starts at
  the last visible column boundary
- Widen cell data to 14+ chars so 10 columns overflow the 120-cell
  viewport, ensuring CursorRight actually triggers horizontal scrolling

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…line

Fixes #5335. Correct TableView benchmark baselines and per-method IterationSetup
Replace custom keyword-based syntax highlighting (DrawNormalColor event, regex
matching, per-cell attribute assignment) with EditorView's built-in
HighlightingDefinition via HighlightingManager.

Key changes:
- Replace TextView with Editor from Terminal.Gui.Editor package
- Use HighlightingManager.Instance.GetDefinition(TSQL) for native highlighting
- Use TextDocument for content loading
- Remove all manual highlighting logic (keywords HashSet, regex matching, etc.)
- Remove Cell save/load functionality (was TextView-specific)
- Remove EventExtensions helper class (no longer needed)
- Update category from TextView to Editor
- Add GutterOptions.LineNumbers for line number display

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Port the multi-line editor portion of the TextInputControls UICatalog
scenario from the deprecated TextView to EditorView (Terminal.Gui.Editor).

- Add using Terminal.Gui.Editor
- Replace TextView with EditorView
- Use ViewportSettingsFlags for scroll bar configuration
- Remove Multiline checkbox (EditorView is always multiline)
- Remove TabKeyAddsTab checkbox (EditorView handles Tab via indentation)
- Remove autocomplete wiring (EditorView does not expose this API yet)
- Keep ReadOnly, WordWrap, and ScrollBars option checkboxes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the internal ConfigTextView : TextView subclass with
ConfigEditorView : Editor (from Terminal.Gui.Editor package).

Key changes:
- ScrollBars = true -> ViewportSettings flags for scroll bars
- ContentsChanged event -> Document.Changed event
- IsDirty -> !Document.UndoStack.IsOriginalFile
- ClearHistoryChanges() -> Document.UndoStack.ClearAll() + MarkAsOriginalFile()
- ScenarioCategory changed from TextView to Editor

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace all usages of the deprecated TextView control with the
Terminal.Gui.Editor.Editor class from the Terminal.Gui.Editor NuGet package.

Key changes:
- Use Terminal.Gui.Editor.Editor instead of TextView
- Text accessed via Document.Text (TextDocument) instead of .Text
- File loading via File.ReadAllText + new TextDocument() instead of .Load()
- Copy/Cut/Paste via InvokeCommand(Command.*) instead of direct methods
- Find/Replace via Editor's FindNext/FindPrevious/ReplaceNext/ReplaceAll
- ScrollBars via ViewportSettings flags instead of .ScrollBars property
- History clearing via Document.UndoStack.ClearAll() + MarkAsOriginalFile()
- Caret position via CaretChanged event + Document line calculations
- Removed menu items for APIs not available in Editor (Autocomplete,
  TabKeyAddsTab, UseSameRuneTypeForWords, SelectWordOnlyOnDoubleClick)
- Changed ScenarioCategory from 'TextView' to 'Editor'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace all TextView usage in UICatalog scenarios and Examples with:
- Terminal.Gui.Editor NuGet package (v2.2.1-develop.133) for editable text
- Code view for read-only uses (WizardStep, CharMap)

Changes:
- Delete old Editor scenario (Editor.cs, Editor.FindReplace.cs, Editor.Menu.cs)
- Port ~20 scenarios from TextView to Editor
- Add Terminal.Gui.Editor package reference and nuget source mapping
- Add syntax highlighting to ConfigurationEditor (JSON), Notepad (extension-based), MarkdownTester (MarkDown)
- Remove typeof(TextView) from ConfigPropertyHostTypes.cs
- Replace TextView with Code in WizardStep.cs and CharMap.cs
- Add disposal verification test in Tests/StressTests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All usages, samples, and documentation now reference the new Editor control instead of TextView. Updated scenarios, configuration, command bindings, and API docs to use Editor as the standard multi-line text editor. Applied code style and formatting improvements for consistency.
- Renamed PreservedMembers to PRESERVED_MEMBERS for clarity.
- Added TextView to config host types and DynamicDependency.
- Fixed nullability in View.Paste.cs and used PastedEventArgs.
- Cleaned up unused usings and improved naming consistency.
- Reordered and clarified guard-rail tests for config hosts.
- Enhanced test assertions and comments for better diagnostics.
Reorganized and renamed test methods in AllViewsTests.cs for better clarity. Added tests to verify Accept and HotKey command event raising. Moved and refactored constructor tests to use a local function. Adjusted test order and reformatted commented-out tests for consistency.
- IntegrationTests/UICatalogScenarioTests.All_Scenarios_Dispose_Properly:
  Tests all 92 UICatalog scenarios dispose views properly
- UnitTestsParallelizable/Views/AllViewsDisposalTests.AllViews_Dispose_Properly:
  Tests all 77 View types dispose properly after Run

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replaced private field and constructor with C# 14 primary constructor for ITestOutputHelper injection. Updated all usages to reference the new parameter, simplifying the class and modernizing the code.
View.Instances is static so this test cannot run concurrently with other
tests in UnitTestsParallelizable. Moved to IntegrationTests which runs
sequentially.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes #5322. Remove internal uses of TextView from Examples
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes #5349. Ignore non-readable poll events during ANSI shutdown
@tig tig merged commit de9301d into main May 21, 2026
35 checks passed
@tig tig deleted the release/v2.2.2 branch May 21, 2026 02:37
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e956484c19

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +14 to 18
private readonly Code _helpTextView = new ()
{
ReadOnly = true,
WordWrap = true,
SyntaxHighlighter = null,
X = Pos.AnchorEnd () + 1,
Height = Dim.Fill (),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve wrapped help text in WizardStep sidebar

Changing the help pane from TextView to Code removes word wrapping while the sidebar still uses a fixed narrow width (CalculateHelpPaddingWidth() returns 25). In practice, any HelpText line longer than that width is now clipped and requires horizontal scrolling, which is a usability regression for existing wizard help content that previously rendered fully wrapped.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants