653 Commits

Author SHA1 Message Date
Nils Andresen
1d19079913 add last commit to .git-blame-ignore-revs 2023-11-28 00:14:54 +01:00
Nils Andresen
44300c871f fixed line-endings 2023-11-28 00:14:54 +01:00
Nils Andresen
989c0b9904 added a .gitattributes file
to force lf checkouts on windows
2023-11-28 00:14:54 +01:00
Patrik Svensson
cb52eb63ce Add blog post for 0.48 2023-11-22 22:13:48 +01:00
Patrik Svensson
7397169a27 Update Cake to 4.0.0 2023-11-20 13:14:40 +01:00
Patrik Svensson
ffdb47d77f Build generator as part of build 2023-11-20 13:14:40 +01:00
Patrik Svensson
383bee0e3e Do not push packages to GitHub 2023-11-19 12:18:22 +01:00
Patrik Svensson
4d6541dd14 Add back net7.0 TFM for tests 2023-11-19 12:18:22 +01:00
Patrik Svensson
b1e0896a0d Add net8.0 support 2023-11-14 22:24:53 +01:00
Will Baldoumas
e07ccd9f66
Allow Confirmation Prompt Styling (#1210)
* Allow Confirmation Prompt Styling

* Remove style null check

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>

* Remove style null coalesce

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>

* Update comment

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>

* Remove style null check

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>

* Update comment

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>

* Remove style null coalesce

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>

---------

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>
2023-11-13 18:23:09 +01:00
Frank Ray
250b1f4c9c
Add localization support to help provider (#1349)
Closes #1349
2023-11-11 00:22:52 +01:00
Nils Andresen
023c77ff09 fixed the build-errors
All of which I introduced earlier.
2023-11-11 00:09:08 +01:00
Nils Andresen
dc402220f2 (#1313) fixed errors in FakeTypeRegistrar and FakeTypeResolver
to make the unit tests pass.
2023-11-11 00:09:08 +01:00
Nils Andresen
c448d0d5f6 (#1313) Add TypeRegistrarBaseTests for the FakeTypeRegistrar
So it also works according to our assumptions.
2023-11-11 00:09:08 +01:00
Nils Andresen
3da367f29f (#1313) fix mixing of Registrations
i.e. combining Register, RegisterInstance and RegisterLazy
2023-11-11 00:09:08 +01:00
Nils Andresen
ead7115cbe (#1313) Add new test to TypeRegistrarBaseTests
to assert the assumptions we're making in the code.
2023-11-11 00:09:08 +01:00
Nils Andresen
1fd028942f (#1313) removed the default registration of the IHelpProvider 2023-11-11 00:09:08 +01:00
Cédric Luthi
4219bbbf61 Allow passing a nullable style in DefaultValueStyle() and ChoicesStyle()
This will allow to slightly simplify the implementation of #1210

See also related discussion on https://github.com/spectreconsole/spectre.console/pull/1349#discussion_r1388385384
2023-11-10 08:01:18 +01:00
Cédric Luthi
29a43686d4 Fix AnsiConsoleOutput safe height
The safe height (introduced in 3e2eea730bf0f6fe4a5e336faa312b526d351079) would be 80 (the value of the safe width) instead of 24.

Removing the explicit `defaultValue` parameter ensures that the correct constants are used, i.e. Constants.DefaultTerminalWidth and Constants.DefaultTerminalHeight.
2023-11-09 12:11:56 +01:00
Patrik Svensson
63b940cf0e
Merge pull request #1338 from nils-a/feature/GH-1188 2023-10-19 11:12:09 +02:00
Nils Andresen
bbf58ee814
(#1188) Rows measure greedy 2023-10-19 07:46:12 +02:00
Patrik Svensson
e2a674815d
Merge pull request #1318 from nils-a/feature/GH-1317 2023-09-27 08:57:52 +02:00
Nils Andresen
343b98944d
added a minimal PR template 2023-09-27 08:28:08 +02:00
Andrew Rathbun
2bbb7c1ab6
Update Showcase.csproj - minor typo (#1315) 2023-09-23 15:55:56 +02:00
Cédric Luthi
5296e56b1c
Fix DefaultValue for FileInfo and DirectoryInfo (#1238)
Commit d3f4f5f208ee76a22ff39c13df4d150712685f5f introduced automatic conversion to FileInfo and DirectoryInfo but failed to properly handle the conversion if the value comes from the [DefaultValue] attribute.

Using both `var (converter, stringConstructor) = GetConverter(...)` and `var (converter, _) = GetConverter(...)` should have been a red flag!
2023-09-21 12:05:42 +01:00
Patrik Svensson
943c045fab
Fixes TextPath rendering bugs (#1308)
* Do not emit line break when rendering
* Don't be greedy when measuring.
* Fix a condition that decides if the path fits in the allotted space.

Closes #1307
2023-09-18 08:04:57 +02:00
Fraser Waters
2af3f7faeb
Add an example showing the decorations off (#1191) 2023-09-16 23:08:52 +02:00
Phil Scott
ed9e198d60
Progress bar header and footer (#1262) 2023-09-16 22:39:43 +02:00
Patrik Svensson
3bee7212b7
Merge pull request #1303 from nils-a/feature/GH-684 2023-09-16 19:37:00 +02:00
Patrik Svensson
c82d8c4523
Add option to show separator between table rows (#1304)
* Add option to show separator between table rows
* Panels should show header if borders are not shown

Closes #835
2023-09-16 18:49:12 +02:00
Nils Andresen
bef21e8a21
(#684) Enable setting the color of the values in a BreakdownChart 2023-09-15 20:12:06 +02:00
Ola Bäcker
037e109699
Fix figlet centering possibly throwing due to negative size (#1302) 2023-09-14 19:50:12 +02:00
Nils Andresen
f7befacd79
(#644) Specified settings for the argument vector (#1301) 2023-09-13 09:06:25 +02:00
Fraser Waters
cec5fb4595
Render tables with zero-width columns (#1197)
Fixes https://github.com/spectreconsole/spectre.console/issues/361
2023-09-12 15:46:25 +02:00
Nils Andresen
9c86391fb6
(#1297) change all SetErrorHandler to SetExceptionHandler (#1298) 2023-09-12 13:57:02 +02:00
Nils Andresen
a3dcb31729
Update ColumnsSample to showcase nicer data (#1295)
Also, I switched the base width of the AsciiCast back
to 82 (from 120) so newly created casts are no longer
overflowing the display with on the pages.

Re-created the Panel and BreakdownChart casts, as
they were currently overflowing due to the 120 chars
width of the cast.
2023-09-12 12:58:18 +02:00
Patrik Svensson
1002c6fe27
Merge pull request #1294 from nils-a/feature/GH-1279 2023-09-11 23:45:39 +02:00
Nils Andresen
c64797d681
(#1279) added the missing columns-cast 2023-09-11 23:26:54 +02:00
Frank Ray
131b37fff8
Allow custom help providers (#1259)
Allow custom help providers

* Version option will show in help even with a default command

* Reserve `-v` and `--version` as special Spectre.Console command line arguments (nb. breaking change for Spectre.Console users who have a default command with a settings class that uses either of these switches).

* Help writer correctly determines if trailing commands exist and whether to display them as optional or mandatory in the usage statement.

* Ability to control the number of indirect commands to display in the help text when the command itself doesn't have any examples of its own. Defaults to 5 (for backward compatibility) but can be set to any integer or zero to disable completely.

* Significant increase in unit test coverage for the help writer.

* Minor grammatical improvements to website documentation.
2023-09-08 09:51:33 +02:00
Tomasz Prasołek
813a53cdfa Fix Rule widget docs 2023-07-16 12:29:04 +02:00
Cédric Luthi
2af901a814 Remove unnecessary [NotNull] attributes
When subclassing `Command<TSettings>` which has the [NotNull] attributes, Rider/ReSharper gives this warning:
> Nullability of type of parameter 'context' in method does not match overridden member `int Spectre.Console.Cli.Command<TSettings>.Execute(CommandContext, TSettings)` (possibly because of nullability attributes)

When subclassing `Command<TSettings>` which does not have the [NotNull] attributes, Rider/ReSharper gives this warning:
> The nullability attribute has no effect and can be safely removed

The solution is simply to remove the [NotNull] attributes.

Since `<Nullable>enable</Nullable>` is set in the project, they are actually not necessary. By the way, the non-generic `Command` class does not have the [NotNull] attributes.
2023-07-12 15:26:12 +02:00
Cédric Luthi
83afa97017 Set end_of_line to LF instead of CRLF
This matches the actual content of the repository (except for a few files which have CRLF instead of LF)

The motivation behind this change is that Rider observes the .editorconfig rules and changes the line ending to CRLF on save. When submitting pull requests the diff is full of changes because all the end of lines were changed from LF to CRLF. By setting `end_of_line` to `LF` the end of lines are not changed on save and the diffs are clean when submitting pull requests.
2023-07-12 15:25:52 +02:00
Jeppe Roi Kristensen
e0ded712e8 Add fix to avoid exception on Rows with no children 2023-06-13 00:36:06 +02:00
Cédric Luthi
d484e832f5 Relax the SDK requirements by rolling forward to the latest feature
This was initially introduced in 3c5b98123b4c9cd50a37da25ca9a3fd34ac7f479 by Daniel Cazzulino, then reverted in 82de4a55c48e269225ff2b137850a303b3776879 by Patrick Svensson because of a bug in the .NET 6.0.401 SDK.
2023-06-07 13:41:09 +02:00
fredrikbentzen
71a5d83067 Fixed render issue where writeline inside status caused corrupt output #415 #694 2023-06-04 20:31:12 +02:00
Ignacio Calvo
35ce60b596
Implemented AddAsyncDelegate (#766) 2023-05-25 11:31:01 +01:00
Frank Ray
0ec70a44db
Async command unit tests 2023-05-19 17:19:17 +01:00
Patrik Svensson
1ee2653cf8
Merge pull request #1231 from FrankRay78/Blog-post-for-0.47.0
Blog post for 0.47.0 (updated)
2023-05-19 18:05:06 +02:00
Frank Ray
4c0178cf9a
Merge branch 'main' into Blog-post-for-0.47.0 2023-05-19 16:50:48 +01:00
Frank Ray
296bc61837 Updated links and github usernames to markdown url format so they render as native html links 2023-05-19 16:48:48 +01:00