From 4fb5e1511e71cb00e554b6f9db95f811e3384898 Mon Sep 17 00:00:00 2001 From: Alessio Marinelli Date: Wed, 8 Oct 2025 10:20:56 +0200 Subject: [PATCH 1/8] Added CodeQL Params: - ignore push on main - triggered by pull request on main - triggered manually --- .github/workflows/bitblazor-codeql.yml | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/bitblazor-codeql.yml diff --git a/.github/workflows/bitblazor-codeql.yml b/.github/workflows/bitblazor-codeql.yml new file mode 100644 index 0000000..b85b67a --- /dev/null +++ b/.github/workflows/bitblazor-codeql.yml @@ -0,0 +1,52 @@ +name: CodeQL + +on: + push: + branches-ignore: [ main ] + paths: [ 'src/**' ] + pull_request: + branches: [ main ] + paths: [ 'src/**' ] + workflow_dispatch: + schedule: + - cron: '0 0 1,15 * *' + +env: + NET_VERSION: '9.x' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'csharp' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 # avoid shallow clone so nbgv can do its work. + + - name: Setup .NET SDK ${{ env.NET_VERSION }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ env.NET_VERSION }} + dotnet-quality: 'ga' + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 From 0b8b8a81a14e07fbec7256df700188cef2a41d7c Mon Sep 17 00:00:00 2001 From: Alessio Marinelli Date: Wed, 8 Oct 2025 10:43:09 +0200 Subject: [PATCH 2/8] Update CodeQL to v3 Updated deprecated action from v2 to v3 Ref: https://github.blog/changelog/2025-01-10-code-scanning-codeql-action-v2-is-now-deprecated/ --- .github/workflows/bitblazor-codeql.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bitblazor-codeql.yml b/.github/workflows/bitblazor-codeql.yml index b85b67a..70fba44 100644 --- a/.github/workflows/bitblazor-codeql.yml +++ b/.github/workflows/bitblazor-codeql.yml @@ -41,12 +41,12 @@ jobs: dotnet-quality: 'ga' - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 From 994f40c9679b9ab606e2ca30b23fc9242dd7c582 Mon Sep 17 00:00:00 2001 From: Alessio Marinelli Date: Wed, 8 Oct 2025 10:50:32 +0200 Subject: [PATCH 3/8] Create Test Runner action Params: - triggered pull request on main - triggered manually --- .github/workflows/bitblazor-testrunner.yml | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/bitblazor-testrunner.yml diff --git a/.github/workflows/bitblazor-testrunner.yml b/.github/workflows/bitblazor-testrunner.yml new file mode 100644 index 0000000..a4b41d7 --- /dev/null +++ b/.github/workflows/bitblazor-testrunner.yml @@ -0,0 +1,57 @@ +name: BitBlazor - Test runner + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +permissions: + checks: write + +jobs: + build_and_test: + + env: + BUILD_CONFIG: 'Release' + SOLUTION: 'BitBlazor.sln' + PROJECT_NAME: src/BitBlazor + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # avoid shallow clone so nbgv can do its work. + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.x + + - name: Nerdbank.GitVersioning + uses: dotnet/nbgv@v0.4 + id: nbgv + with: + path: ${{ env.PROJECT_NAME }} + + - name: Restore dependencies + run: dotnet restore $SOLUTION + + - name: Build + run: dotnet build $SOLUTION --configuration $BUILD_CONFIG + + - name: Test + run: dotnet test $SOLUTION --configuration $BUILD_CONFIG --logger "trx;LogFileName=test-runner-results.trx" || true + + - name: Test Report + uses: dorny/test-reporter@v1 + if: always() + with: + name: DotNET Tests + path: "**/test-runner-results.trx" + reporter: dotnet-trx + fail-on-error: true From c1e5ab75bde7563c065942a9e30479a28d75cd5a Mon Sep 17 00:00:00 2001 From: Alessio Marinelli Date: Wed, 8 Oct 2025 10:55:01 +0200 Subject: [PATCH 4/8] Fixed Test Runner Set the correct SDK version Removed NerdBank Git Versioning step --- .github/workflows/bitblazor-testrunner.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/bitblazor-testrunner.yml b/.github/workflows/bitblazor-testrunner.yml index a4b41d7..38c1f2d 100644 --- a/.github/workflows/bitblazor-testrunner.yml +++ b/.github/workflows/bitblazor-testrunner.yml @@ -30,13 +30,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 7.x - - - name: Nerdbank.GitVersioning - uses: dotnet/nbgv@v0.4 - id: nbgv - with: - path: ${{ env.PROJECT_NAME }} + dotnet-version: 9.x - name: Restore dependencies run: dotnet restore $SOLUTION From 0e863d41345a2cc9ebc26799eadd4a66693834df Mon Sep 17 00:00:00 2001 From: Alessio Marinelli Date: Wed, 8 Oct 2025 11:03:29 +0200 Subject: [PATCH 5/8] Added Test Runner and CodeQL to README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ec01884..f2cdb4d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # BitBlazor +[![Tests](https://github.com/albx/bitblazor/actions/workflows/bitblazor-testrunner.yml/badge.svg)](https://github.com/albx/bitblazor/actions/workflows/bitblazor-testrunner.yml) [![CodeQL](https://github.com/albx/bitblazor/actions/workflows/bitblazor-codeql.yml/badge.svg)](https://github.com/albx/bitblazor/actions/workflows/bitblazor-codeql.yml) + + BitBlazor is a UI library that provides accessible, reusable Blazor components styled with [Bootstrap Italia](https://italia.github.io/bootstrap-italia/docs). The goal is to offer a comprehensive set of components for .NET 9 applications, following accessibility best practices and the official Bootstrap Italia design system. @@ -43,4 +46,4 @@ If you have any issues, feedback, or feature requests, please see the [CONTRIBUT ## License -The project is released under [MIT](https://github.com/albx/bitblazor/blob/main/LICENSE) license. \ No newline at end of file +The project is released under [MIT](https://github.com/albx/bitblazor/blob/main/LICENSE) license. From a31cb7b12a473271c5699eaf782b93dad07b00df Mon Sep 17 00:00:00 2001 From: Defkon1 Date: Fri, 17 Oct 2025 08:48:48 +0200 Subject: [PATCH 6/8] Added base component --- .../Components/Breadcrumb/BitBreadcrumb.razor | 39 +++++++++++++++ .../Breadcrumb/BitBreadcrumb.razor.cs | 50 +++++++++++++++++++ .../Breadcrumb/BitBreadcrumbItem.cs | 28 +++++++++++ 3 files changed, 117 insertions(+) create mode 100644 src/BitBlazor/Components/Breadcrumb/BitBreadcrumb.razor create mode 100644 src/BitBlazor/Components/Breadcrumb/BitBreadcrumb.razor.cs create mode 100644 src/BitBlazor/Components/Breadcrumb/BitBreadcrumbItem.cs diff --git a/src/BitBlazor/Components/Breadcrumb/BitBreadcrumb.razor b/src/BitBlazor/Components/Breadcrumb/BitBreadcrumb.razor new file mode 100644 index 0000000..8c906a4 --- /dev/null +++ b/src/BitBlazor/Components/Breadcrumb/BitBreadcrumb.razor @@ -0,0 +1,39 @@ +@namespace BitBlazor.Components + +@using BitBlazor.Components.Breadcrumb +@inherits BitComponentBase + + + + +@code { + + /// + /// Gets the item icon fragment, if specified. + /// + private RenderFragment BreadcrumbIconFragment(BitBreadcrumbItem item) => __builder => + { + @if (item.HasIcon()) + { +