Skip to content

feat(DockView): bump version 10.0.6#969

Merged
ArgoZhang merged 2 commits intomasterfrom
dev-dockview
Apr 10, 2026
Merged

feat(DockView): bump version 10.0.6#969
ArgoZhang merged 2 commits intomasterfrom
dev-dockview

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Apr 10, 2026

Link issues

fixes #968

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

Introduce a new DockViewComponent Razor component for configurable dock panel content and adjust DockView dockview.js behavior.

New Features:

  • Add a DockViewComponent Razor component with parameters for header, title, visibility, locking, floating, and renderer behavior, plus optional title bar customization.

Enhancements:

  • Refine DockView client-side event handling by no longer invoking the loadTabs callback from JavaScript.
  • Adjust DockView tab rendering behavior with a temporary fallback for partial render mode.

Copilot AI review requested due to automatic review settings April 10, 2026 06:14
@bb-auto bb-auto Bot added the enhancement New feature or request label Apr 10, 2026
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 10, 2026

Reviewer's Guide

Refactors the DockView component into a Razor + code‑behind pair with richer parameters and title‑bar behavior, introduces a new component-based content type for DockView items, bumps the DockView package version, and temporarily disables the JavaScript loadTabs callback while applying a partial‑mode ShowTab workaround.

Sequence diagram for DockViewComponent title bar click behavior

sequenceDiagram
actor User
participant DockViewTitleBar
participant DockViewComponent
participant OnClickTitleBarCallback

User->>DockViewTitleBar: click bar icon
DockViewTitleBar->>DockViewComponent: OnClickBar()
DockViewComponent->>DockViewComponent: check OnClickTitleBarCallback
DockViewComponent-->>OnClickTitleBarCallback: invoke()
OnClickTitleBarCallback-->>DockViewComponent: Task completed
Loading

Sequence diagram for updated DockViewV2 loadTabs handling

sequenceDiagram
participant Dockview
participant DockViewV2_js

Dockview->>DockViewV2_js: emit loadTabs(tabs)
DockViewV2_js->>DockViewV2_js: loadTabs handler (no-op)
Loading

Updated class diagram for DockViewComponent in DockView

classDiagram
class DockViewComponentBase

class DockViewComponent {
  +bool ShowHeader
  +string Title
  +int TitleWidth
  +string TitleClass
  +RenderFragment TitleTemplate
  +string Class
  +bool Visible
  +bool ShowTitleBar
  +bool? ShowClose
  +string Key
  +bool? IsLock
  +bool? ShowLock
  +bool? IsFloating
  +bool? ShowFloat
  +bool? ShowMaximize
  +string Renderer
  +string TitleBarIcon
  +string TitleBarIconUrl
  +Func_Task_ OnClickTitleBarCallback
  +void OnInitialized()
  +Task OnClickBar()
  +void SetVisible(bool visible)
}

class DockViewContentType {
  <<enumeration>>
  Component
}

class DockViewTitleBar {
  +string BarIcon
  +string BarIconUrl
  +Func_Task_ OnClickBarCallback
}

DockViewComponent --|> DockViewComponentBase
DockViewComponent ..> DockViewContentType : sets Type
DockViewComponent --> DockViewTitleBar : uses
Loading

File-Level Changes

Change Details Files
Refactor DockViewComponent into a Razor + code-behind partial component with richer configuration and title bar behavior.
  • Replace the old DockViewComponent C# file with a partial DockViewComponent.razor.cs class exposing parameters for header visibility, title, styling, visibility, locking, floating, close/maximize controls, and rendering mode.
  • Introduce Blazor-only parameters (e.g., TitleTemplate, ShowTitleBar, TitleBarIcon, TitleBarIconUrl, OnClickTitleBarCallback) with appropriate JsonIgnore attributes for serialization boundaries.
  • Set the component Type to DockViewContentType.Component in OnInitialized to register it as a component-based DockView content item.
  • Provide an OnClickBar helper that invokes the optional title-bar callback and a SetVisible method to programmatically control component visibility.
src/components/BootstrapBlazor.DockView/Components/DockViewComponent.razor.cs
src/components/BootstrapBlazor.DockView/Components/DockViewComponent.razor
src/components/BootstrapBlazor.DockView/Components/DockViewComponent.cs
Define the DockViewComponent Razor layout for title, title bar, and content visibility.
  • Render a wrapping div with DockView metadata attributes (id, data-bb-key, data-bb-title).
  • Render a custom TitleTemplate when provided, otherwise show a DockViewTitleBar when ShowTitleBar is true, wiring its click to OnClickBar.
  • Gate rendering of ChildContent on the Visible flag to support programmatic show/hide of the panel.
src/components/BootstrapBlazor.DockView/Components/DockViewComponent.razor
Adjust DockViewV2 behavior and documentation to support partial rendering mode and temporarily disable tab loading callback from JS.
  • Comment a TODO in ShowTab to document a temporary rollback behavior for partial render mode while leaving the Always render mode path unchanged.
  • Remove the invoke.invokeMethodAsync(options.loadTabs, tabs) call from the dockview 'loadTabs' JavaScript event handler, effectively disabling the .NET loadTabs callback for now.
src/components/BootstrapBlazor.DockView/Components/DockViewV2.razor.cs
src/components/BootstrapBlazor.DockView/Components/DockViewV2.razor.js
Bump the DockView package version to 10.0.6.
  • Update BootstrapBlazor.DockView.csproj to version 10.0.6 for the DockView component package.
src/components/BootstrapBlazor.DockView/BootstrapBlazor.DockView.csproj

Assessment against linked issues

Issue Objective Addressed Explanation
#968 Update the DockView component/package version to 10.0.6 in the project (e.g., in the .csproj or equivalent version metadata).

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 this to the v9.2.0 milestone Apr 10, 2026
@ArgoZhang ArgoZhang merged commit 988cfa9 into master Apr 10, 2026
4 checks passed
@ArgoZhang ArgoZhang deleted the dev-dockview branch April 10, 2026 06:15
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 - I've left some high level feedback:

  • In DockViewV2.razor.js the loadTabs event handler is now an empty function; if the callback is intentionally disabled, consider removing the subscription or adding a brief comment to clarify why it is kept registered but does nothing.
  • The SetVisible method on DockViewComponent only updates the Visible field without triggering a re-render; if this is meant to update the UI at runtime, consider calling StateHasChanged() or documenting that callers are expected to trigger a refresh themselves.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `DockViewV2.razor.js` the `loadTabs` event handler is now an empty function; if the callback is intentionally disabled, consider removing the subscription or adding a brief comment to clarify why it is kept registered but does nothing.
- The `SetVisible` method on `DockViewComponent` only updates the `Visible` field without triggering a re-render; if this is meant to update the UI at runtime, consider calling `StateHasChanged()` or documenting that callers are expected to trigger a refresh themselves.

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.

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 BootstrapBlazor.DockView package version to 10.0.6 (fixes #968) and includes refactors/behavior changes in DockView rendering and JS interop.

Changes:

  • Bump BootstrapBlazor.DockView package version from 10.0.510.0.6.
  • Refactor DockViewComponent from a C# BuildRenderTree implementation into a .razor + code-behind component.
  • Modify DockView JS interop around the loadTabs event / tab rendering flow.

Reviewed changes

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

Show a summary per file
File Description
src/components/BootstrapBlazor.DockView/BootstrapBlazor.DockView.csproj Version bump to 10.0.6.
src/components/BootstrapBlazor.DockView/Components/DockViewV2.razor.js Changes dockview event wiring (notably loadTabs).
src/components/BootstrapBlazor.DockView/Components/DockViewV2.razor.cs Adds a TODO note in ShowTab logic.
src/components/BootstrapBlazor.DockView/Components/DockViewComponent.razor New Razor markup for DockView component rendering.
src/components/BootstrapBlazor.DockView/Components/DockViewComponent.razor.cs New code-behind replacing the removed DockViewComponent.cs.
src/components/BootstrapBlazor.DockView/Components/DockViewComponent.cs Removed legacy BuildRenderTree implementation.

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

});
dockview.on('loadTabs', tabs => {
invoke.invokeMethodAsync(options.loadTabs, tabs);

{
<DockViewTitleBar BarIcon="@TitleBarIcon" BarIconUrl="@TitleBarIconUrl" OnClickBarCallback="OnClickBar"></DockViewTitleBar>
}
@if (Visible)
Comment on lines +11 to +47
/// DockContentItem 配置项子项对标 content 配置项内部 content 配置
/// </summary>
public partial class DockViewComponent
{
/// <summary>
/// 获得/设置 组件是否显示 Header 默认 true 显示
/// </summary>
[Parameter]
public bool ShowHeader { get; set; } = true;

/// <summary>
/// 获得/设置 组件 Title
/// </summary>
[Parameter]
public string? Title { get; set; }

/// <summary>
/// 获得/设置 组件 Title 宽度 默认 null 未设置
/// </summary>
[Parameter]
public int? TitleWidth { get; set; }

/// <summary>
/// 获得/设置 组件 Title 样式 默认 null 未设置
/// </summary>
[Parameter]
public string? TitleClass { get; set; }

/// <summary>
/// 获得/设置 Title 模板 默认 null 未设置
/// </summary>
[Parameter]
[JsonIgnore]
public RenderFragment? TitleTemplate { get; set; }

/// <summary>
/// 获得/设置 组件 Class 默认 null 未设置
Comment on lines 1 to 5
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>10.0.5</Version>
<Version>10.0.6</Version>
</PropertyGroup>
/// <param name="key"></param>
public bool ShowTab(string? key)
{
// TODO: Partial 模式下使用临时回滚稍后完善
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(DockView): bump version 10.0.6

2 participants