浏览代码

Merge branch 'v2_develop' into v2_3574_self-contained-single-file

BDisp 1 年之前
父节点
当前提交
3b19567b5c
共有 6 个文件被更改,包括 27 次插入25 次删除
  1. 2 2
      .github/workflows/api-docs.yml
  2. 1 1
      .github/workflows/publish.yml
  3. 5 5
      CONTRIBUTING.md
  4. 5 6
      README.md
  5. 2 4
      Terminal.Gui/README.md
  6. 12 7
      UnitTests/Views/DateFieldTests.cs

+ 2 - 2
.github/workflows/api-docs.yml

@@ -32,7 +32,7 @@ jobs:
 
     - name: Setup Pages
       if: github.ref_name == 'main' ||  github.ref_name == 'develop'
-      uses: actions/configure-pages@v4
+      uses: actions/configure-pages@v5
       
     - name: Upload artifact
       if: github.ref_name == 'main' ||  github.ref_name == 'develop'
@@ -49,7 +49,7 @@ jobs:
 
     - name: v2_develop Repository Dispatch ${{ github.ref_name }}
       if: github.ref_name == 'v2_develop'
-      uses: peter-evans/repository-dispatch@v2
+      uses: peter-evans/repository-dispatch@v3
       with:
         token: ${{ secrets.V2DOCS_TOKEN }}
         repository: gui-cs/Terminal.GuiV2Docs

+ 1 - 1
.github/workflows/publish.yml

@@ -19,7 +19,7 @@ jobs:
         fetch-depth: 0 # fetch-depth is needed for GitVersion
 
     - name: Install GitVersion 
-      uses: gittools/actions/gitversion/setup@v0
+      uses: gittools/actions/gitversion/setup@v1
       with:
           versionSpec: '5.x'
           includePrerelease: true

+ 5 - 5
CONTRIBUTING.md

@@ -10,8 +10,8 @@ We welcome contributions from the community. See [Issues](https://github.com/gui
 
 Terminal.Gui uses the [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/) branching model. 
 
-* The `main` branch is always stable, and always matches the most recently released Nuget package.
-* The `develop` branch is where new development and bug-fixes happen. It is the default branch.
+* The `v1_release_` and `v2_release` branches are always stable, and always matches the most recently released Nuget package.
+* The `v1__develop` and `v2_develop` branches are where new development and bug-fixes happen. `v2_develop` is the default Github branch.
 
 ### Forking Terminal.Gui
 
@@ -33,11 +33,11 @@ You now have your own fork and a local repo that references it as `origin`. Your
 
 ### Starting to Make a Change
 
-Ensure your local `develop` (for v1) or `v2_develop` (for v2) branch is up-to-date with `upstream` (`github.com/gui-cs/Terminal.Gui`):
+Ensure your local `v1_develop` (for v1) or `v2_develop` (for v2) branch is up-to-date with `upstream` (`github.com/gui-cs/Terminal.Gui`):
 ```powershell
 cd ./Terminal.Gui
-git checkout develop
-git pull upstream develop
+git checkout v2_develop
+git pull upstream v2_develop
 ```
 
 Create a new local branch:

+ 5 - 6
README.md

@@ -1,17 +1,16 @@
 ![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=develop)
-![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)
 ![Code Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/migueldeicaza/90ef67a684cb71db1817921a970f8d27/raw/code-coverage.json)
 [![Downloads](https://img.shields.io/nuget/dt/Terminal.Gui)](https://www.nuget.org/packages/Terminal.Gui)
 [![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, 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.GuiV2Docs/discussions/1940).*
- * *Developers are encouraged to continue building on [v1.x](https://www.nuget.org/packages/Terminal.Gui) until we announce `v2` is stable.*
-
+* The current, stable, release of Terminal.Gui v1 is [![Version](https://img.shields.io/nuget/v/Terminal.Gui.svg)](https://www.nuget.org/packages/Terminal.Gui).
+* The current `prealpha` release of Terminal.Gui v2 can be found on [Nuget](https://www.nuget.org/packages/Terminal.Gui).
+* Developers starting new TUI projects are encouraged to target `v2`. The API is signifcantly changed, and significantly improved. There will be breaking changes in the API before Beta, but the core API is stable.
+* `v1` is in maintenance mode and we will only accept PRs for issues impacting existing functionality.
+ 
 **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)

+ 2 - 4
Terminal.Gui/README.md

@@ -6,9 +6,7 @@ All files required to build the **Terminal.Gui** library (and NuGet package).
 
 - `\` - The root folder contains the source code for the library.
 	- `Terminal.Gui.sln` - The Visual Studio solution
-	- `Application.cs` - A `static` class that provides the base 'application driver'. Given it defines a **Terminal.Gui** application it is both logically and literally (because `static`) a singleton. It has direct dependencies on `MainLoop`, `Events.cs` `NetDriver`, `CursesDriver`, `WindowsDriver`, `Responder`, `View`, and `TopLevel` (and nothing else).
-	- `MainLoop.cs` - Defines `IMainLoopDriver` and implements the `MainLoop` class.
-	- A few supporting class files
+	- `Application\` - The core `Application` logic, including `Application.cs`, which is is a `static` class that provides the base 'application engine', `RunState`, and `MainLoop`.
 
 - `ConsoleDrivers\`
 	- `ConsoleDriver.cs` - Definition for the Console Driver API.
@@ -38,7 +36,7 @@ All files required to build the **Terminal.Gui** library (and NuGet package).
 	- `Dialog` -
 	- etc...
 
-- `Types/` - A folder (not namespace) containing implementations of `Point`, `Rect`, and `Size` which are ancient versions of the modern `System.Drawing.Point`, `System.Drawing.Size`, and `System.Drawning.Rectangle`.
+- `FileServcies/` - File services classes.
 
 ## Version numbers
 

+ 12 - 7
UnitTests/Views/DateFieldTests.cs

@@ -175,12 +175,6 @@ public class DateFieldTests
     [Fact]
     public void Using_All_Culture_StandardizeDateFormat ()
     {
-        // BUGBUG: This is a workaround for the issue with the date separator in macOS. See https://github.com/gui-cs/Terminal.Gui/issues/3592
-        if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX))
-        {
-            return;
-        }
-
         CultureInfo cultureBackup = CultureInfo.CurrentCulture;
 
         DateTime date = DateTime.Parse ("1/1/1971");
@@ -194,7 +188,10 @@ public class DateFieldTests
             {
                 separator = separator.Replace ("\u200f", "");
             }
-
+            else if (culture.Name == "ar-SA" && RuntimeInformation.IsOSPlatform (OSPlatform.OSX))
+            {
+                separator = " ";
+            }
 
             string format = culture.DateTimeFormat.ShortDatePattern;
             var df = new DateField (date);
@@ -207,6 +204,14 @@ public class DateFieldTests
                     case "ar-SA":
                         Assert.Equal ($" 04{separator}11{separator}1390", df.Text);
 
+                        break;
+                    case "en-SA" when RuntimeInformation.IsOSPlatform (OSPlatform.OSX):
+                        Assert.Equal ($" 04{separator}11{separator}1390", df.Text);
+
+                        break;
+                    case "en-TH" when RuntimeInformation.IsOSPlatform (OSPlatform.OSX):
+                        Assert.Equal ($" 01{separator}01{separator}2514", df.Text);
+
                         break;
                     case "th":
                     case "th-TH":