From 033206ba55427e552e7a1ae7f99fcb02e37f2cbc Mon Sep 17 00:00:00 2001 From: Tig Date: Fri, 17 Mar 2023 09:03:03 -0600 Subject: [PATCH 1/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 504e0fa9f..10a1e2005 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![License](https://img.shields.io/github/license/gui-cs/gui.cs.svg)](LICENSE) ![Bugs](https://img.shields.io/github/issues/gui-cs/gui.cs/bug) -***The current release of Tmerinal.Gui [(v1.9)](https://www.nuget.org/packages/Terminal.Gui) is stable, rich, and broadly used. The team is now focused on designing and building a significant upgrade we're referring to as `v2`. Therefore, `v1` is now in maintenance mode.*** +***The current release of Tmerinal.Gui [(v1.10)](https://www.nuget.org/packages/Terminal.Gui) is stable, rich, and broadly used. The team is now focused on designing and building a significant upgrade we're referring to as `v2`. Therefore, `v1` is now in maintenance mode.*** ***This means we will accept PRs for v1.x (the `develop` branch) only for issues impacting existing functionality. All new development will happen on the `v2_develop` branch. See the V2 discussion [here](https://github.com/gui-cs/Terminal.Gui/discussions/1940).*** From 96cb9cea02a7d84e9e8d6e11ab77a937cee651e2 Mon Sep 17 00:00:00 2001 From: mapgiedev <4250209+mapgie@users.noreply.github.com> Date: Fri, 17 Mar 2023 18:13:42 +0000 Subject: [PATCH 2/9] Typo fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 10a1e2005..82eb6da5a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![License](https://img.shields.io/github/license/gui-cs/gui.cs.svg)](LICENSE) ![Bugs](https://img.shields.io/github/issues/gui-cs/gui.cs/bug) -***The current release of Tmerinal.Gui [(v1.10)](https://www.nuget.org/packages/Terminal.Gui) is stable, rich, and broadly used. The team is now focused on designing and building a significant upgrade we're referring to as `v2`. Therefore, `v1` is now in maintenance mode.*** +***The current release of Terminal.Gui [(v1.10)](https://www.nuget.org/packages/Terminal.Gui) is stable, rich, and broadly used. The team is now focused on designing and building a significant upgrade we're referring to as `v2`. Therefore, `v1` is now in maintenance mode.*** ***This means we will accept PRs for v1.x (the `develop` branch) only for issues impacting existing functionality. All new development will happen on the `v2_develop` branch. See the V2 discussion [here](https://github.com/gui-cs/Terminal.Gui/discussions/1940).*** From 5b00dcfd04746168e6f703c9663d8ce5b8ffb328 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 22 Mar 2023 13:45:02 +0000 Subject: [PATCH 3/9] Fixes #2429. Error when replacing a word in textView. --- Terminal.Gui/Views/TextView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/Views/TextView.cs b/Terminal.Gui/Views/TextView.cs index 7cb797b11..7a06f733a 100644 --- a/Terminal.Gui/Views/TextView.cs +++ b/Terminal.Gui/Views/TextView.cs @@ -387,7 +387,7 @@ namespace Terminal.Gui { pos = new Point (col, i); col += (textToReplace.Length - matchText.Length); } - if (col + 1 > txt.Length) { + if (col < 0 || col + 1 > txt.Length) { break; } col = txt.IndexOf (matchText, col + 1); From 1525c5021e3508767ce3cf256ffc70dc16b1e6b1 Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 22 Mar 2023 13:45:02 +0000 Subject: [PATCH 4/9] Fixes #2429. Error when replacing a word in textView. --- UnitTests/Views/TextViewTests.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/UnitTests/Views/TextViewTests.cs b/UnitTests/Views/TextViewTests.cs index 5add478f6..1b83d3d51 100644 --- a/UnitTests/Views/TextViewTests.cs +++ b/UnitTests/Views/TextViewTests.cs @@ -949,7 +949,7 @@ namespace Terminal.Gui.ViewTests { Assert.Equal (0, _textView.CursorPosition.X); Assert.Equal (0, _textView.CursorPosition.Y); Assert.Equal ("This is the second line.", _textView.Text.ToString ()); - Assert.Equal ($"This is the first line.{Environment.NewLine}", Clipboard.Contents.ToString()); + Assert.Equal ($"This is the first line.{Environment.NewLine}", Clipboard.Contents.ToString ()); break; case 2: _textView.ProcessKey (new KeyEvent (Key.K | Key.CtrlMask, new KeyModifiers ())); @@ -985,7 +985,7 @@ namespace Terminal.Gui.ViewTests { _textView.ProcessKey (new KeyEvent (Key.K | Key.AltMask, new KeyModifiers ())); Assert.Equal (0, _textView.CursorPosition.X); Assert.Equal (1, _textView.CursorPosition.Y); - Assert.Equal ($"This is the first line.{Environment.NewLine}", _textView.Text.ToString()); + Assert.Equal ($"This is the first line.{Environment.NewLine}", _textView.Text.ToString ()); Assert.Equal ($"This is the second line.", Clipboard.Contents.ToString ()); break; case 1: @@ -6815,5 +6815,17 @@ This is the second line. Assert.Equal (1, eventcount); Assert.Equal ($"This is the first line.{Environment.NewLine}This is the second line.{Environment.NewLine}", tv.Text); } + + [Fact] + public void ReplaceAllText_Does_Not_Throw_Exception () + { + var textToFind = "hello! hello!"; + var textToReplace = "hello!"; + var tv = new TextView () { Width = 20, Height = 3, Text = textToFind }; + + var exception = Record.Exception (() => tv.ReplaceAllText (textToFind, false, false, textToReplace)); + Assert.Null (exception); + Assert.Equal (textToReplace, tv.Text); + } } } \ No newline at end of file From 9a5f1edcf7fece225bf8380314f38655962738a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Mar 2023 15:09:08 +0000 Subject: [PATCH 5/9] Bump SixLabors.ImageSharp from 3.0.0 to 3.0.1 Bumps [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/SixLabors/ImageSharp/releases) - [Commits](https://github.com/SixLabors/ImageSharp/compare/v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: SixLabors.ImageSharp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- UICatalog/UICatalog.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UICatalog/UICatalog.csproj b/UICatalog/UICatalog.csproj index 17ac8fd56..2791ec532 100644 --- a/UICatalog/UICatalog.csproj +++ b/UICatalog/UICatalog.csproj @@ -22,7 +22,7 @@ - + From b45c1e67f0a8a9041a6512208f2d4d02ee38839a Mon Sep 17 00:00:00 2001 From: Roberto Cervantes Date: Sun, 2 Apr 2023 01:45:44 -0700 Subject: [PATCH 6/9] Removed additional colon --- Terminal.Gui/Windows/FileDialog.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/Windows/FileDialog.cs b/Terminal.Gui/Windows/FileDialog.cs index c2d20f3f1..c5070d96a 100644 --- a/Terminal.Gui/Windows/FileDialog.cs +++ b/Terminal.Gui/Windows/FileDialog.cs @@ -914,7 +914,7 @@ namespace Terminal.Gui { /// The message. /// The allowed types. public SaveDialog (ustring title, ustring message, List allowedTypes = null) - : base (title, prompt: Strings.fdSave, nameFieldLabel: $"{Strings.fdSaveAs}:", message: message, allowedTypes) { } + : base (title, prompt: Strings.fdSave, nameFieldLabel: $"{Strings.fdSaveAs}", message: message, allowedTypes) { } /// /// Gets the name of the file the user selected for saving, or null From 8cbe7cbf904c165bc1490468b284384930210af2 Mon Sep 17 00:00:00 2001 From: Tig Date: Thu, 6 Apr 2023 09:04:14 -0600 Subject: [PATCH 7/9] Update README.md with new header --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 82eb6da5a..3c75c4087 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +![Terminal.Gui](https://socialify.git.ci/gui-cs/Terminal.Gui/image?description=1&font=Rokkitt&forks=1&language=1&logo=https%3A%2F%2Fraw.githubusercontent.com%2Fgui-cs%2FTerminal.Gui%2Fdevelop%2Fdocfx%2Fimages%2Flogo.png&name=1&owner=1&pattern=Circuit%20Board&stargazers=1&theme=Auto) ![.NET Core](https://github.com/gui-cs/Terminal.Gui/workflows/.NET%20Core/badge.svg?branch=master) ![Code scanning - action](https://github.com/gui-cs/Terminal.Gui/workflows/Code%20scanning%20-%20action/badge.svg) [![Version](https://img.shields.io/nuget/v/Terminal.Gui.svg)](https://www.nuget.org/packages/Terminal.Gui) From ad5e25966b20f03c8512778f8ffc95144e36877d Mon Sep 17 00:00:00 2001 From: Tigger Kindel Date: Thu, 6 Apr 2023 09:25:47 -0600 Subject: [PATCH 8/9] Updated readmes --- README.md | 13 +++++-------- Terminal.Gui/README.md | 17 +++++++++++------ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 3c75c4087..9d462cefc 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,12 @@ [![License](https://img.shields.io/github/license/gui-cs/gui.cs.svg)](LICENSE) ![Bugs](https://img.shields.io/github/issues/gui-cs/gui.cs/bug) -***The current release of Terminal.Gui [(v1.10)](https://www.nuget.org/packages/Terminal.Gui) is stable, rich, and broadly used. The team is now focused on designing and building a significant upgrade we're referring to as `v2`. Therefore, `v1` is now in maintenance mode.*** +***The current, stable, release of Terminal.Gui is [v1.x](https://www.nuget.org/packages/Terminal.Gui). It is stable, rich, and broadly used. The team is now focused on designing and building a significant upgrade we're referring to as `v2`. Therefore:*** + * *`v1` is now in maintenance mode, meaning we will accept PRs for v1.x (the `develop` branch) only for issues impacting existing functionality.* + * *All new development happens on the `v2_develop` branch. See the V2 discussion [here](https://github.com/gui-cs/Terminal.Gui/discussions/1940).* + * *Developers are encouraged to continue building on [v1.x](https://www.nuget.org/packages/Terminal.Gui) until we announce `v2` is stable.* -***This means we will accept PRs for v1.x (the `develop` branch) only for issues impacting existing functionality. All new development will happen on the `v2_develop` branch. See the V2 discussion [here](https://github.com/gui-cs/Terminal.Gui/discussions/1940).*** - -***Developers are encouraged to continue building on `v1` until we announce `v2` is stable.*** - -# Terminal.Gui - Cross Platform Terminal UI toolkit for .NET - -A toolkit for building rich console apps for .NET, .NET Core, and Mono that works on Windows, the Mac, and Linux/Unix. +**Terminal.Gui**: A toolkit for building rich console apps for .NET, .NET Core, and Mono that works on Windows, the Mac, and Linux/Unix. ![Sample app](docfx/images/sample.gif) diff --git a/Terminal.Gui/README.md b/Terminal.Gui/README.md index 37a026fd7..94530a338 100644 --- a/Terminal.Gui/README.md +++ b/Terminal.Gui/README.md @@ -49,6 +49,16 @@ Doing so will update the `.csproj` files in your branch with version info, which ## Publishing a Release of Terminal.Gui +First, use the [Semantic Versioning](https://semver.org/) rules.to determine the new verison number. + +Given a version number MAJOR.MINOR.PATCH, increment the: + +* MAJOR version when you make incompatible API changes +* MINOR version when you add functionality in a backwards compatible manner +* PATCH version when you make backwards compatible bug fixes + +Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format. + To release a new version (e.g. with a higher `major`, `minor`, or `patch` value) tag a commit using `git tag` and then push that tag directly to the `main` branch on `github.com/gui-cs/Terminal.Gui` (`upstream`). The `tag` must be of the form `v..`, e.g. `v2.3.4`. @@ -117,13 +127,8 @@ https://www.nuget.org/packages/Terminal.Gui ### 10) Add a new Release in Github: https://github.com/gui-cs/Terminal.Gui/releases -Generate release notes with the list of PRs since the last release +Generate release notes with the list of PRs since the last release. -Use `gh` to get a list with just titles to make it easy to paste into release notes: - -```powershell -gh pr list --limit 500 --search "is:pr is:closed is:merged closed:>=2021-05-18" -``` ### 11) Update the `develop` branch with the new version ```powershell From f766db7f412f88805effd5be1895004532fce584 Mon Sep 17 00:00:00 2001 From: Tigger Kindel Date: Thu, 6 Apr 2023 09:32:36 -0600 Subject: [PATCH 9/9] Updated to net7.0 --- Example/Example.csproj | 2 +- ReactiveExample/ReactiveExample.csproj | 2 +- Terminal.Gui/ConsoleDrivers/CursesDriver/binding.cs | 2 ++ Terminal.Gui/README.md | 2 +- Terminal.Gui/Terminal.Gui.csproj | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Example/Example.csproj b/Example/Example.csproj index 2ebf163bc..69d7bd305 100644 --- a/Example/Example.csproj +++ b/Example/Example.csproj @@ -1,7 +1,7 @@  Exe - net6.0 + net7.0 diff --git a/ReactiveExample/ReactiveExample.csproj b/ReactiveExample/ReactiveExample.csproj index 9df49720c..2cc2e0550 100644 --- a/ReactiveExample/ReactiveExample.csproj +++ b/ReactiveExample/ReactiveExample.csproj @@ -1,7 +1,7 @@  Exe - net6.0 + net7.0 diff --git a/Terminal.Gui/ConsoleDrivers/CursesDriver/binding.cs b/Terminal.Gui/ConsoleDrivers/CursesDriver/binding.cs index 42612b3ae..587a43e71 100644 --- a/Terminal.Gui/ConsoleDrivers/CursesDriver/binding.cs +++ b/Terminal.Gui/ConsoleDrivers/CursesDriver/binding.cs @@ -331,6 +331,7 @@ namespace Unix.Terminal { #pragma warning disable RCS1102 // Make class static. internal class Delegates { #pragma warning restore RCS1102 // Make class static. +#pragma warning disable CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language. public delegate IntPtr initscr (); public delegate int endwin (); public delegate bool isendwin (); @@ -555,4 +556,5 @@ namespace Unix.Terminal { } } #pragma warning restore CS1591 // Missing XML comment for publicly visible type or member +#pragma warning restore CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language. } diff --git a/Terminal.Gui/README.md b/Terminal.Gui/README.md index 94530a338..81d337f30 100644 --- a/Terminal.Gui/README.md +++ b/Terminal.Gui/README.md @@ -77,7 +77,7 @@ The PR title should be of the form "Release v2.3.4" ```powershell git checkout develop git pull upstream develop -git checkout -b v_2_3_4 +git checkout -b v2_3_4 git add . git commit -m "Release v2.3.4" git push diff --git a/Terminal.Gui/Terminal.Gui.csproj b/Terminal.Gui/Terminal.Gui.csproj index 0bab49cbf..464b50dd2 100644 --- a/Terminal.Gui/Terminal.Gui.csproj +++ b/Terminal.Gui/Terminal.Gui.csproj @@ -56,7 +56,7 @@ - net472;netstandard2.0;net6.0 + net472;netstandard2.0;net7.0 Terminal.Gui Terminal.Gui bin\Release\Terminal.Gui.xml