ShowBorders property (default true) + some small code cleanups#20
ShowBorders property (default true) + some small code cleanups#20BrunoVT1992 merged 6 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a ShowBorders property to the Table class with a default value of true, allowing users to create tables without borders for a minimalist style. It also includes code formatting improvements.
Changes:
- Added
ShowBordersproperty (defaulttrue) to control border visibility - Reorganized private field declarations to appear before XML documentation comments
- Removed unnecessary blank lines and added comprehensive test coverage
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ConsoleTable.Text/Table.cs | Implemented ShowBorders property with conditional border rendering logic and reorganized field declarations |
| ConsoleTable.Text/TableDrawing.cs | Added Empty constant for borderless rendering |
| Tests/ConsoleTable.Text.Tests/TableTests.cs | Added tests for ShowBorders default value and border removal |
| README.md | Updated documentation with ShowBorders property and usage examples |
| ConsoleTable.Text.Examples/Program.cs | Added example demonstrating borderless table rendering |
| ConsoleTable.Text/ConsoleTable.Text.csproj | Bumped version to 2.1.0 |
| ChangeLogs/2.1.0-ChangeLog.md | Added changelog for version 2.1.0 |
| ConsoleTable.slnx | Added reference to new changelog file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ChangeLogs/2.1.0-ChangeLog.md
Outdated
| @@ -0,0 +1,44 @@ | |||
| # V2.0.0 | |||
There was a problem hiding this comment.
The version header shows 'V2.0.0' but this changelog is for version 2.1.0 based on the filename and content. Update the header to '# V2.1.0'.
| # V2.0.0 | |
| # V2.1.0 |
ConsoleTable.Text/Table.cs
Outdated
| { | ||
| var column = row[i]; | ||
|
|
||
| var leftVerticlaLine = verticalLine; |
There was a problem hiding this comment.
Corrected spelling of 'leftVerticlaLine' to 'leftVerticalLine'.
| Assert.Contains("Header", result); | ||
| Assert.Contains("Value", result); |
There was a problem hiding this comment.
The test assertions check for 'Header' and 'Value' but the test setup uses 'Name', 'Age', 'John', 'Jane', '30', '25', 'Footer1', and 'Footer2'. These assertions will fail because the strings 'Header' and 'Value' are not present in the table output.
| Assert.Contains("Header", result); | |
| Assert.Contains("Value", result); | |
| Assert.Contains("Name", result); | |
| Assert.Contains("Age", result); |
No description provided.