From ff7590b28517b8a79ad2fc3b36de2b8341f16448 Mon Sep 17 00:00:00 2001 From: Echways Date: Sun, 8 Nov 2026 15:30:39 +0300 Subject: [PATCH 1/3] add: adder & output --- docs/en/components.md | 2 ++ docs/ru/components.md | 2 ++ src/Enfilade/Components/Adder.razor | 46 ++++++++++++++++++++++++++++ src/Enfilade/Components/Output.razor | 20 ++++++++++++ src/Enfilade/wwwroot/enfilade.css | 42 +++++++++++++++++++++++++ 5 files changed, 112 insertions(+) create mode 100644 src/Enfilade/Components/Adder.razor create mode 100644 src/Enfilade/Components/Output.razor diff --git a/docs/en/components.md b/docs/en/components.md index dfc97da..cb54807 100644 --- a/docs/en/components.md +++ b/docs/en/components.md @@ -23,6 +23,8 @@ | `Meter` | `Used / Limit` with a bar that turns ochre at 90% and red at 100%. | | `Crumb` | Removable filter chip that links to the address without the filter. | | `CopyLine`, `CopyButton` | A value with a copy button. | +| `Output` | A bordered box for logs and command output: `Text` and `Empty`, the line shown when there is no text. | +| `Adder` | A one-line add form: `Placeholder`, `OnAdd` with the trimmed text, `Done`, and the button label as content. Enter adds too. | | `KeyField` | A secret token in groups, with a copy button. | | `EntranceLayout` | Full-screen layout without navigation, for sign-in pages: `@layout EntranceLayout`. | | `LanguageLink` | Link to the next language, for pages outside the shell. | diff --git a/docs/ru/components.md b/docs/ru/components.md index 29afd35..8a26aa4 100644 --- a/docs/ru/components.md +++ b/docs/ru/components.md @@ -23,6 +23,8 @@ | `Meter` | `Used / Limit` с полосой, которая желтеет на 90% и краснеет на 100%. | | `Crumb` | Снимаемая метка фильтра, ссылка на адрес без этого фильтра. | | `CopyLine`, `CopyButton` | Значение с кнопкой копирования. | +| `Output` | Блок с рамкой для логов и вывода команд: `Text` и `Empty` — строка, когда текста нет. | +| `Adder` | Однострочная форма добавления: `Placeholder`, `OnAdd` с обрезанным текстом, `Done` и подпись кнопки в содержимом. Enter тоже добавляет. | | `KeyField` | Секретный токен группами с кнопкой копирования. | | `EntranceLayout` | Полноэкранный макет без навигации для страниц входа: `@layout EntranceLayout`. | | `LanguageLink` | Ссылка на следующий язык для страниц вне оболочки. | diff --git a/src/Enfilade/Components/Adder.razor b/src/Enfilade/Components/Adder.razor new file mode 100644 index 0000000..8de9507 --- /dev/null +++ b/src/Enfilade/Components/Adder.razor @@ -0,0 +1,46 @@ +@namespace Enfilade +@inject Act Act + +
+ + +
+ +@code { + private string? _text; + + [Parameter, EditorRequired] + public string Placeholder { get; set; } = ""; + + [Parameter, EditorRequired] + public EventCallback OnAdd { get; set; } + + [Parameter] + public string? Done { get; set; } + + [Parameter] + public bool Refresh { get; set; } = true; + + [Parameter] + public bool Disabled { get; set; } + + [Parameter, EditorRequired] + public RenderFragment ChildContent { get; set; } = default!; + + private async Task AddAsync() + { + var value = _text?.Trim(); + if (string.IsNullOrEmpty(value)) + return; + + await OnAdd.InvokeAsync(value); + _text = null; + } + + private async Task KeyAsync(KeyboardEventArgs args) + { + if (args.Key == "Enter" && !Disabled && !string.IsNullOrWhiteSpace(_text)) + await Act.RunAsync(AddAsync, Done, null, Refresh); + } +} diff --git a/src/Enfilade/Components/Output.razor b/src/Enfilade/Components/Output.razor new file mode 100644 index 0000000..14c85f3 --- /dev/null +++ b/src/Enfilade/Components/Output.razor @@ -0,0 +1,20 @@ +@namespace Enfilade + +
+ @if (string.IsNullOrEmpty(Text)) + { +

@Empty

+ } + else + { +
@Text
+ } +
+ +@code { + [Parameter] + public string? Text { get; set; } + + [Parameter, EditorRequired] + public string Empty { get; set; } = ""; +} diff --git a/src/Enfilade/wwwroot/enfilade.css b/src/Enfilade/wwwroot/enfilade.css index e0100ec..7ecf78c 100644 --- a/src/Enfilade/wwwroot/enfilade.css +++ b/src/Enfilade/wwwroot/enfilade.css @@ -2630,3 +2630,45 @@ a.crumb:hover { letter-spacing: normal; color: var(--mist); } + +.output { + box-sizing: border-box; + max-height: 480px; + overflow: auto; + padding: 16px 20px; + border-radius: var(--round); + background: var(--deep); + box-shadow: inset 0 0 0 1px var(--rule), var(--edge); + color: var(--light); + scrollbar-width: thin; + scrollbar-color: var(--rule) transparent; + transition: box-shadow 0.3s var(--spring); +} + +.output:hover { + box-shadow: inset 0 0 0 1px var(--line), var(--edge); +} + +.output pre, .output .output-empty { + margin: 0; + font: 400 13px/20px var(--mono); + font-stretch: 87%; + letter-spacing: -0.01em; + white-space: pre-wrap; + overflow-wrap: anywhere; +} + +.output .output-empty { + color: var(--mist); +} + +.adder { + display: flex; + align-items: flex-end; + gap: 16px; +} + +.adder .mud-input-control { + flex: 1 1 auto; + min-width: 0; +} From 98b8cdd28c3acc7494a2d99a4f8fc7909d89c5a0 Mon Sep 17 00:00:00 2001 From: Echways Date: Sun, 8 Nov 2026 15:31:33 +0300 Subject: [PATCH 2/3] release: 0.2.2 --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 31de7b9..a4430bb 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,7 +14,7 @@ - 0.2.1 + 0.2.2 Echways GPL-3.0-only https://github.com/Echways/Enfilade From 0e952c3a0f2b8bf4ce66bb8d3d39fee8a27bfb7f Mon Sep 17 00:00:00 2001 From: Echways Date: Sun, 8 Nov 2026 15:34:31 +0300 Subject: [PATCH 3/3] chore: update ci --- .config/dotnet-tools.json | 13 ++++++++++++ .github/workflows/ci.yml | 44 +++++++++++++++++++++++++++++++-------- 2 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 .config/dotnet-tools.json diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..5d03f28 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-reportgenerator-globaltool": { + "version": "5.5.12", + "commands": [ + "reportgenerator" + ], + "rollForward": false + } + } +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3fb2117..f07771f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,9 @@ name: CI on: push: branches: [main] - paths-ignore: ["**.md", "LICENSE"] + paths-ignore: ["**.md", "docs/**", "LICENSE"] pull_request: - paths-ignore: ["**.md", "LICENSE"] + paths-ignore: ["**.md", "docs/**", "LICENSE"] workflow_call: permissions: @@ -16,10 +16,10 @@ concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: - build: - name: Build, test and pack + lint: + name: Lint runs-on: ubuntu-26.04 - timeout-minutes: 15 + timeout-minutes: 10 steps: - name: Check out uses: actions/checkout@v7 @@ -30,11 +30,19 @@ jobs: - name: Check C# formatting run: dotnet format Enfilade.slnx --verify-no-changes - - name: Build - run: dotnet build Enfilade.slnx -c Release + test: + name: Tests + runs-on: ubuntu-26.04 + timeout-minutes: 15 + steps: + - name: Check out + uses: actions/checkout@v7 + + - name: Set up .NET + uses: ./.github/actions/dotnet - name: Test - run: dotnet test --project tests/Enfilade.Tests -c Release --no-build --results-directory "$GITHUB_WORKSPACE/TestResults" --report-xunit-junit --coverage --coverage-output-format cobertura + run: dotnet test --project tests/Enfilade.Tests -c Release --results-directory "$GITHUB_WORKSPACE/TestResults" --report-xunit-junit --coverage --coverage-output-format cobertura - name: Publish test report if: ${{ !cancelled() }} @@ -46,8 +54,26 @@ jobs: require_tests: true include_time_in_summary: true + - name: Summarize coverage + if: ${{ !cancelled() }} + run: | + dotnet tool restore + dotnet reportgenerator -reports:"TestResults/**/*.cobertura.xml" -targetdir:coverage -reporttypes:MarkdownSummaryGithub + cat coverage/SummaryGithub.md >> "$GITHUB_STEP_SUMMARY" + + pack: + name: Pack + runs-on: ubuntu-26.04 + timeout-minutes: 15 + steps: + - name: Check out + uses: actions/checkout@v7 + + - name: Set up .NET + uses: ./.github/actions/dotnet + - name: Pack - run: dotnet pack Enfilade.slnx -c Release --no-build -o artifacts/packages + run: dotnet pack Enfilade.slnx -c Release -o artifacts/packages - name: Upload packages uses: actions/upload-artifact@v7