Skip to content

feat(TargetFramework): bump vesion 10.0.0#673

Merged
ArgoZhang merged 14 commits intomasterfrom
feat-net10
Nov 12, 2025
Merged

feat(TargetFramework): bump vesion 10.0.0#673
ArgoZhang merged 14 commits intomasterfrom
feat-net10

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Nov 12, 2025

Link issues

fixes #672

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Bump library version to 10.0.0 and extend HTML-to-PDF services to support optional PDF configuration

Enhancements:

  • Add optional PdfOptions parameter to all IHtml2Pdf service methods in both Playwright and Select implementations

Build:

  • Upgrade solution and project files to target version 10.0.0

Chores:

  • Standardize copyright header in Playwright HTML-to-PDF service

# Conflicts:
#	src/components/BootstrapBlazor.CherryMarkdown/BootstrapBlazor.CherryMarkdown.csproj
#	src/components/BootstrapBlazor.Markdown/BootstrapBlazor.Markdown.csproj
#	src/components/BootstrapBlazor.Region/BootstrapBlazor.Region.csproj
#	src/components/BootstrapBlazor.SummerNote/BootstrapBlazor.SummerNote.csproj
#	src/components/BootstrapBlazor.Vditor/BootstrapBlazor.Vditor.csproj
#	test/UnitTestEditor/UnitTestEditor.csproj
#	test/UnitTestHoliday/UnitTestHoliday.csproj
#	test/UnitTestOpcDa/UnitTestOpcDa.csproj
#	test/UnitTestOpcUa/UnitTestOpcUa.csproj
#	test/UnitTestRegion/UnitTestRegion.csproj
#	test/UnitTestSvgIcon/UnitTestSvgIcon.csproj
#	tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.csproj
Copilot AI review requested due to automatic review settings November 12, 2025 00:56
@bb-auto bb-auto Bot added the enhancement New feature or request label Nov 12, 2025
@bb-auto bb-auto Bot added this to the v9.2.0 milestone Nov 12, 2025
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Nov 12, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR upgrades the entire solution to version 10.0.0, extends PDF service APIs to accept an optional PdfOptions parameter in both Playwright and Select implementations, and refreshes license headers for consistency.

Class diagram for updated DefaultPdfService API (Playwright and Select)

classDiagram
    class DefaultPdfService {
        +Task<byte[]> PdfDataAsync(string url, PdfOptions? options = null)
        +Task<Stream> PdfStreamAsync(string url, PdfOptions? options = null)
        +Task<byte[]> PdfDataFromHtmlAsync(string html, IEnumerable<string>? links = null, IEnumerable<string>? scripts = null, PdfOptions? options = null)
        +Task<Stream> PdfStreamFromHtmlAsync(string html, IEnumerable<string>? links = null, IEnumerable<string>? scripts = null, PdfOptions? options = null)
    }
    class PdfOptions {
    }
    DefaultPdfService ..> PdfOptions : uses
Loading

File-Level Changes

Change Details Files
Extend PDF service methods to accept PdfOptions
  • Added optional PdfOptions parameter to PdfDataAsync and PdfStreamAsync methods
  • Propagated the options argument into the underlying PDF generation calls
  • Synchronized signatures across Playwright and Select implementations
src/components/BootstrapBlazor.Html2Pdf.Playwright/Services/DefaultPdfService.cs
src/components/BootstrapBlazor.Html2Pdf.Select/Services/DefaultPdfService.cs
Bump project version to 10.0.0 across solution and projects
  • Updated version numbers in Directory.Build.props and Frameworks.props
  • Incremented version metadata in all .csproj files and the BootstrapBlazor.Extensions.slnx
BootstrapBlazor.Extensions.slnx
src/Directory.Build.props
src/Frameworks.props
src/components/**/*.csproj
src/extensions/**/*.csproj
src/middleware/**/*.csproj
test/**/*.csproj
tools/**/*.csproj
Refresh license headers for consistency
  • Updated copyright notice and contact email in DefaultPdfService.cs (Playwright)
  • Re-applied standard header formatting in AzureOpenAIOption.cs
src/components/BootstrapBlazor.Html2Pdf.Playwright/Services/DefaultPdfService.cs
src/components/BootstrapBlazor.AzureOpenAI/Services/AzureOpenAIOption.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#672 Bump the TargetFramework version to 10.0.0 across the repository.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • The PdfOptions parameter is never used in GeneratePdfFromUrlAsync or in the HtmlToPdf converters, so the new options have no effect—consider wiring them through or removing them.
  • You updated the copyright header in one service but not others—either standardize this change project-wide or revert it to keep headers consistent.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The PdfOptions parameter is never used in GeneratePdfFromUrlAsync or in the HtmlToPdf converters, so the new options have no effect—consider wiring them through or removing them.
- You updated the copyright header in one service but not others—either standardize this change project-wide or revert it to keep headers consistent.

## Individual Comments

### Comment 1
<location> `src/components/BootstrapBlazor.Html2Pdf.Playwright/Services/DefaultPdfService.cs:14` </location>
<code_context>
-    /// <inheritdoc/>
-    /// </summary>
-    public Task<byte[]> PdfDataAsync(string url)
+    public Task<byte[]> PdfDataAsync(string url, PdfOptions? options = null)
     {
         return GeneratePdfFromUrlAsync(url);
</code_context>

<issue_to_address>
**issue:** The new 'options' parameter is unused in PdfDataAsync.

If the unused 'options' parameter is for compatibility, please document this. Otherwise, pass 'options' to the PDF generation logic.
</issue_to_address>

### Comment 2
<location> `src/components/BootstrapBlazor.Html2Pdf.Playwright/Services/DefaultPdfService.cs:19` </location>
<code_context>
-    /// <inheritdoc/>
-    /// </summary>
-    public async Task<Stream> PdfStreamAsync(string url)
+    public async Task<Stream> PdfStreamAsync(string url, PdfOptions? options = null)
     {
         var data = await GeneratePdfFromUrlAsync(url);
</code_context>

<issue_to_address>
**issue:** The 'options' parameter is unused in PdfStreamAsync.

If you plan to support options later, add a TODO or use the parameter to clarify its purpose.
</issue_to_address>

### Comment 3
<location> `src/components/BootstrapBlazor.Html2Pdf.Playwright/Services/DefaultPdfService.cs:25` </location>
<code_context>
-    /// <param name="links"></param>
-    /// <param name="scripts"></param>
-    public Task<byte[]> PdfDataFromHtmlAsync(string html, IEnumerable<string>? links = null, IEnumerable<string>? scripts = null)
+    public Task<byte[]> PdfDataFromHtmlAsync(string html, IEnumerable<string>? links = null, IEnumerable<string>? scripts = null, PdfOptions? options = null)
     {
         return GeneratePdfFromHtmlAsync(html, links, scripts);
</code_context>

<issue_to_address>
**issue:** The 'options' parameter is unused in PdfDataFromHtmlAsync.

If 'options' is meant to influence PDF generation, it should be passed to GeneratePdfFromHtmlAsync.
</issue_to_address>

### Comment 4
<location> `src/components/BootstrapBlazor.Html2Pdf.Playwright/Services/DefaultPdfService.cs:30` </location>
<code_context>
-    /// <param name="links"></param>
-    /// <param name="scripts"></param>
-    public async Task<Stream> PdfStreamFromHtmlAsync(string html, IEnumerable<string>? links = null, IEnumerable<string>? scripts = null)
+    public async Task<Stream> PdfStreamFromHtmlAsync(string html, IEnumerable<string>? links = null, IEnumerable<string>? scripts = null, PdfOptions? options = null)
     {
         var data = await PdfDataFromHtmlAsync(html, links, scripts);
</code_context>

<issue_to_address>
**issue:** The 'options' parameter is unused in PdfStreamFromHtmlAsync.

If 'options' is only present for interface compatibility, document this clearly. Otherwise, use or remove the parameter.
</issue_to_address>

### Comment 5
<location> `src/components/BootstrapBlazor.Html2Pdf.Select/Services/DefaultPdfService.cs:14` </location>
<code_context>
-    /// <inheritdoc/>
-    /// </summary>
-    public Task<byte[]> PdfDataAsync(string url)
+    public Task<byte[]> PdfDataAsync(string url, PdfOptions? options = null)
     {
         return GeneratePdfFromUrlAsync(url);
</code_context>

<issue_to_address>
**issue:** The 'options' parameter is unused in PdfDataAsync.

If 'options' should influence PDF generation, ensure it is used in the implementation, such as by passing it to HtmlToPdf.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

/// <inheritdoc/>
/// </summary>
public Task<byte[]> PdfDataAsync(string url)
public Task<byte[]> PdfDataAsync(string url, PdfOptions? options = null)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: The new 'options' parameter is unused in PdfDataAsync.

If the unused 'options' parameter is for compatibility, please document this. Otherwise, pass 'options' to the PDF generation logic.

/// <inheritdoc/>
/// </summary>
public async Task<Stream> PdfStreamAsync(string url)
public async Task<Stream> PdfStreamAsync(string url, PdfOptions? options = null)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: The 'options' parameter is unused in PdfStreamAsync.

If you plan to support options later, add a TODO or use the parameter to clarify its purpose.

/// <param name="links"></param>
/// <param name="scripts"></param>
public Task<byte[]> PdfDataFromHtmlAsync(string html, IEnumerable<string>? links = null, IEnumerable<string>? scripts = null)
public Task<byte[]> PdfDataFromHtmlAsync(string html, IEnumerable<string>? links = null, IEnumerable<string>? scripts = null, PdfOptions? options = null)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: The 'options' parameter is unused in PdfDataFromHtmlAsync.

If 'options' is meant to influence PDF generation, it should be passed to GeneratePdfFromHtmlAsync.

/// <param name="links"></param>
/// <param name="scripts"></param>
public async Task<Stream> PdfStreamFromHtmlAsync(string html, IEnumerable<string>? links = null, IEnumerable<string>? scripts = null)
public async Task<Stream> PdfStreamFromHtmlAsync(string html, IEnumerable<string>? links = null, IEnumerable<string>? scripts = null, PdfOptions? options = null)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: The 'options' parameter is unused in PdfStreamFromHtmlAsync.

If 'options' is only present for interface compatibility, document this clearly. Otherwise, use or remove the parameter.

/// <inheritdoc/>
/// </summary>
public Task<byte[]> PdfDataAsync(string url)
public Task<byte[]> PdfDataAsync(string url, PdfOptions? options = null)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: The 'options' parameter is unused in PdfDataAsync.

If 'options' should influence PDF generation, ensure it is used in the implementation, such as by passing it to HtmlToPdf.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR bumps the target framework from .NET 9.0 to .NET 10.0 across the BootstrapBlazor ecosystem. The PR title indicates "bump vesion 10.0.0" with a typo ("vesion" should be "version").

Key changes:

  • Updates the target framework to net10.0 across all projects
  • Consolidates version management by introducing version variables (NET6Version, NET7Version, etc.) in Directory.Build.props
  • Removes hardcoded version numbers from individual project files in favor of centralized version management
  • Updates package references to use wildcard or variable-based versioning

Reviewed Changes

Copilot reviewed 92 out of 92 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tools/BootstrapBlazor.CssBundler/BootstrapBlazor.CssBundler.csproj Updates version to 10.0.0, adds net10.0 as target framework, consolidates PropertyGroups
test/Directory.Build.props Updates TargetFramework from net9.0 to net10.0, removes global Using directives
test/UnitTest*.csproj (multiple) Removes explicit framework configurations and adds specific Using directives where needed
src/Directory.Build.props Updates Version to 10.0.0, introduces version variables for different .NET versions
src/Frameworks.props Adds net10.0 to TargetFrameworks, removes Visual Studio version conditions
src/components/*.csproj (multiple) Removes explicit Version properties, standardizes package references to use version variables
src/extensions/*.csproj (multiple) Updates package version references to use centralized version variables
src/middleware/*.csproj Removes explicit Version property
BootstrapBlazor.Extensions.slnx Reorganizes Directory.Build.props into a dedicated /props/ folder

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>net10.0</TargetFrameworks>
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both TargetFramework (line 6) and TargetFrameworks (line 12) are defined, which is incorrect. Only one should be used. Since TargetFramework (singular) is already set to 'net10.0' on line 6, the TargetFrameworks (plural) property on line 12 should be removed or the singular version should be removed if multi-targeting is intended.

Copilot uses AI. Check for mistakes.
Comment thread src/Directory.Build.props

<PropertyGroup>
<BBVersion>9.0.0</BBVersion>
<BBVersion>9.*</BBVersion>
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BBVersion is set to '9.' but the overall Version has been updated to '10.0.0'. This creates an inconsistency where projects reference BootstrapBlazor version 9.x while the solution is being updated to version 10.0.0. This should likely be '10.' or '10.0.0' to match the version bump.

Suggested change
<BBVersion>9.*</BBVersion>
<BBVersion>10.*</BBVersion>

Copilot uses AI. Check for mistakes.
@@ -1,4 +1,4 @@
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
// Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The email address has been changed from 'argo@163.com' to 'argo@live.ca', which is inconsistent with other files in this PR (e.g., BootstrapBlazor.Html2Pdf.Select/Services/DefaultPdfService.cs). Copyright headers should remain consistent across the codebase unless there's a deliberate policy change.

Copilot uses AI. Check for mistakes.

<ItemGroup>
<Using Include="BootstrapBlazor.Components" />
<PackageReference Include="BootstrapBlazor" Version="$(BBVersion)" />
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The PackageReference and Using item groups have been swapped. While this doesn't affect functionality, it creates inconsistency. The original order (Using includes before PackageReference) should be maintained for better readability and consistency with the codebase conventions.

Copilot uses AI. Check for mistakes.
@@ -13,7 +9,6 @@
<ItemGroup>
<PackageReference Include="Baidu.AI" Version="4.15.16" />
<PackageReference Include="BootstrapBlazor" Version="$(BBVersion)" />
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Newtonsoft.Json package reference has been removed. If this package was a dependency of Baidu.AI and is now pulled in transitively, this is fine. However, if the code directly uses Newtonsoft.Json types, this removal could cause build errors. Please verify that Newtonsoft.Json is not directly used in this project.

Suggested change
<PackageReference Include="BootstrapBlazor" Version="$(BBVersion)" />
<PackageReference Include="BootstrapBlazor" Version="$(BBVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

Copilot uses AI. Check for mistakes.
@ArgoZhang ArgoZhang merged commit 3398820 into master Nov 12, 2025
8 checks passed
@ArgoZhang ArgoZhang deleted the feat-net10 branch November 12, 2025 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(TargetFramework): bump vesion 10.0.0

2 participants