Skip to content

feat(WinBox): make asset URL resolution compatible with .NET 9+ - #1180

Merged
ArgoZhang merged 4 commits into
masterfrom
feat-winbox
Oct 18, 2026
Merged

ArgoZhang merged 4 commits into
masterfrom
feat-winbox

Conversation

@ArgoZhang

@ArgoZhang ArgoZhang commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Link issues

fixes #1179

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

Ensure WinBox stylesheets load correctly across .NET versions, including .NET 9 and later.

Bug Fixes:

  • Resolve WinBox stylesheet asset URLs correctly on .NET 9 and later.

Enhancements:

  • Pass resolved base and bundled stylesheet URLs from the component to the WinBox JavaScript initializer and load them independently.

Build:

  • Update the WinBox project configuration to support the revised asset resolution.

@sourcery-ai

sourcery-ai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Makes WinBox asset loading compatible with .NET 9+ by resolving stylesheet URLs through the framework asset map and passing them into JavaScript, while retaining legacy URL behavior for older targets; JavaScript now loads the two stylesheets explicitly.

Sequence diagram for .NET 9+ WinBox asset loading

sequenceDiagram
    participant WinBox
    participant AssetMap
    participant JavaScript
    participant Browser

    WinBox->>AssetMap: Resolve _content/BootstrapBlazor.WinBox/css/winbox.min.css
    WinBox->>AssetMap: Resolve _content/BootstrapBlazor.WinBox/css/winbox.bundle.css
    WinBox->>JavaScript: init(id, options)
    JavaScript->>Browser: addLink(baseStyleUrl)
    JavaScript->>Browser: addLink(styleUrl)
Loading

Sequence diagram for legacy WinBox asset loading

sequenceDiagram
    participant WinBox
    participant JavaScript
    participant Browser

    WinBox->>JavaScript: init(id, options)
    JavaScript->>Browser: addLink(_content/BootstrapBlazor.WinBox/css/winbox.min.css)
    JavaScript->>Browser: addLink(_content/BootstrapBlazor.WinBox/css/winbox.bundle.css)
Loading

File-Level Changes

Change Details Files
Resolve WinBox stylesheet URLs through the .NET 9 asset manifest while preserving legacy static paths on earlier target frameworks.
  • Added constants for the bundled and base stylesheet asset paths.
  • Added framework-conditional URL properties using the asset collection on .NET 9+ and literal paths otherwise.
  • Passed both resolved URLs from component initialization to JavaScript.
src/components/BootstrapBlazor.WinBox/WinBox.razor.cs
src/components/BootstrapBlazor.WinBox/BootstrapBlazor.WinBox.csproj
Update JavaScript initialization to load both stylesheets explicitly and remove the CSS bundle import dependency.
  • Extended initialization to accept stylesheet URLs from .NET.
  • Added links for the base and bundled stylesheets.
  • Removed the @import of the base stylesheet from the bundled CSS file.
  • Removed the BOM from the JavaScript module.
src/components/BootstrapBlazor.WinBox/WinBox.razor.js
src/components/BootstrapBlazor.WinBox/wwwroot/css/winbox.bundle.css

Assessment against linked issues

Issue Objective Addressed Explanation
#1179 Make WinBox asset URL resolution compatible with .NET 9 and later while preserving compatibility with earlier .NET versions. ✅

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

@bb-auto bb-auto Bot added the enhancement New feature or request label Oct 18, 2026
@bb-auto bb-auto Bot added this to the v10.0.0 milestone Oct 18, 2026

@bb-auto bb-auto Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Auto approved by bb-auto

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@ArgoZhang
ArgoZhang merged commit baeda66 into master Oct 18, 2026
3 checks passed
@ArgoZhang
ArgoZhang deleted the feat-winbox branch October 18, 2026 01:05
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(WinBox): make asset URL resolution compatible with .NET 9+

1 participant