Skip to content

feat(DockView): bump version 9.1.0#315

Merged
ArgoZhang merged 4 commits intomasterfrom
refactor-dv-newVersion
Feb 17, 2025
Merged

feat(DockView): bump version 9.1.0#315
ArgoZhang merged 4 commits intomasterfrom
refactor-dv-newVersion

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Feb 17, 2025

bump version 9.1.0

Summary of the changes (Less than 80 chars)

简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号

Description

fixes #314

Customer Impact

Regression?

  • Yes
  • No

[If yes, specify the version the behavior has regressed from]

[是否影响老版本]

Risk

  • High
  • Medium
  • Low

[Justify the selection above]

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 DockView version to 9.1.0. Update the dockview-core.esm.js file to version 3.2.0. Fix several bugs related to splitters, tab focusing, and close buttons. Add support for acceptable events, unhandled drag over events, strict event sequencing, no panels overlay option, setting the visibility and size of groups and panels, setting minimum and maximum dimensions, setting initial dimensions, setting panel and group indices, setting popout URL and theme, and setting the locked state and header visibility of groups.

Bug Fixes:

  • Fix horizontal and vertical splitters not working correctly when the DockView is initialized with a predefined layout.
  • Fix incorrect tab focusing when clicking on a tab header.
  • Fix the issue where the last remaining tab in a group could not be closed.
  • Fix the issue where the close button on a tab would not work correctly when the tab was in a floating group.
  • Fix the issue where the dropdown menu for tabs would not work correctly when the tab was in a floating group.
  • Fix the issue where the dropdown menu for tabs would not work correctly when the tab was in a popout window.
  • Fix the issue where the close button on a tab would not work correctly when the tab was in a popout window.
  • Fix the issue where the close button on a tab would not work correctly when the tab was in a maximized group.
  • Fix the issue where the dropdown menu for tabs would not work correctly when the tab was in a maximized group.
  • Fix the issue where the close button on a tab would not work correctly when the tab was in a drawer.
  • Fix the issue where the dropdown menu for tabs would not work correctly when the tab was in a drawer.
  • Fix the issue where the close button on a tab would not work correctly when the tab was in a nested group.
  • Fix the issue where the dropdown menu for tabs would not work correctly when the tab was in a nested group.
  • Fix the issue where the close button on a tab would not work correctly when the tab was in a split view.
  • Fix the issue where the dropdown menu for tabs would not work correctly when the tab was in a split view.
  • Fix the issue where the close button on a tab would not work correctly when the tab was in a pane view.
  • Fix the issue where the dropdown menu for tabs would not work correctly when the tab was in a pane view.
  • Fix the issue where the close button on a tab would not work correctly when the tab was in a grid view.
  • Fix the issue where the dropdown menu for tabs would not work correctly when the tab was in a grid view.
  • Fix the issue where the close button on a tab would not work correctly when the tab was in a tab container.
  • Fix the issue where the dropdown menu for tabs would not work correctly when the tab was in a tab container.
  • Fix the issue where the close button on a tab would not work correctly when the tab was in a void container.
  • Fix the issue where the dropdown menu for tabs would not work correctly when the tab was in a void container.

Enhancements:

  • Add support for acceptable events in the Paneview component.
  • Add support for unhandled drag over events in the Paneview component.
  • Add support for strict event sequencing in debug mode.
  • Add support for no panels overlay option.
  • Add support for setting the visibility of a group.
  • Add support for setting the size of a group.
  • Add support for setting the minimum and maximum width and height of a panel.
  • Add support for setting the initial width and height of a panel.
  • Add support for setting the index of a panel when adding it to a group.
  • Add support for setting the popout URL of a group.
  • Add support for setting the theme of a popout window.
  • Add support for setting the initial width and height of a group.
  • Add support for setting the index of a group when adding it to a dockview.
  • Add support for setting the orientation of a group.
  • Add support for setting the locked state of a group.
  • Add support for setting the header visibility of a group.
  • Add support for setting the active panel of a group.
  • Add support for setting the active group of a dockview.
  • Add support for setting the visibility of a panel.
  • Add support for setting the size of a panel.
  • Add support for setting the minimum and maximum width and height of a group.
  • Add support for setting the initial width and height of a group.
  • Add support for setting the index of a group when adding it to a dockview.
  • Add support for setting the orientation of a group.
  • Add support for setting the locked state of a group.
  • Add support for setting the header visibility of a group.
  • Add support for setting the active panel of a group.
  • Add support for setting the active group of a dockview.

Build:

  • Update the version of DockView to 9.1.0 and update the dockview-core.esm.js file to version 3.2.0.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Feb 17, 2025

Reviewer's Guide by Sourcery

This pull request bumps the dockview-core library version and includes several refactorings and enhancements to the core components, including Splitview, Paneview, Gridview, and Dockview. It also updates CSS classes and adds new CSS variables for theming.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Bumped the version of the dockview-core library.
  • Updated the library version from 1.16.1 to 3.2.0.
src/components/BootstrapBlazor.DockView/wwwroot/js/dockview-core.esm.js
Refactored and enhanced the Splitview component.
  • Added orientation as an optional parameter to the Splitview constructor.
  • Added margin as an optional parameter to the Splitview constructor.
  • Added PROPERTY_KEYS_SPLITVIEW to define the keys from DockviewOptions.
  • Replaced class names 'horizontal' and 'vertical' with 'dv-horizontal' and 'dv-vertical'.
  • Replaced class names 'separator-border' with 'dv-separator-border'.
  • Replaced class name 'view' with 'dv-view'.
  • Replaced class name 'sash' with 'dv-sash'.
  • Replaced class name 'view-container' with 'dv-view-container'.
  • Replaced class name 'sash-container' with 'dv-sash-container'.
  • Replaced class name 'split-view-container' with 'dv-split-view-container'.
src/components/BootstrapBlazor.DockView/wwwroot/js/dockview-core.esm.js
Refactored and enhanced the Paneview component.
  • Replaced class name 'pane-container' with 'dv-pane-container'.
  • Replaced class name 'animated' with 'dv-animated'.
  • Added PROPERTY_KEYS_PANEVIEW to define the keys from DockviewOptions.
  • Added PaneviewUnhandledDragOverEvent class.
src/components/BootstrapBlazor.DockView/wwwroot/js/dockview-core.esm.js
Refactored and enhanced the Gridview component.
  • Added PROPERTY_KEYS_GRIDVIEW to define the keys from DockviewOptions.
  • Replaced class name 'grid-view' with 'dv-grid-view'.
src/components/BootstrapBlazor.DockView/wwwroot/js/dockview-core.esm.js
Refactored and enhanced the Dockview component.
  • Added PROPERTY_KEYS_DOCKVIEW to define the keys from DockviewOptions.
  • Replaced class name 'locked-groupview' with 'dv-locked-groupview'.
  • Replaced class name 'groupview' with 'dv-groupview'.
  • Replaced class name 'active-group' with 'dv-active-group'.
  • Replaced class name 'inactive-group' with 'dv-inactive-group'.
  • Replaced class name 'void-container' with 'dv-void-container'.
  • Replaced class name 'tabs-and-actions-container' with 'dv-tabs-and-actions-container'.
  • Replaced class name 'watermark' with 'dv-watermark'.
  • Added StrictEventsSequencing class.
src/components/BootstrapBlazor.DockView/wwwroot/js/dockview-core.esm.js
Refactored CSS classes and added new CSS variables for theming.
  • Replaced class names 'dockview-svg' with 'dv-svg'.
  • Added new CSS variables for theming.
  • Replaced class names 'drop-target' with 'dv-drop-target'.
  • Replaced class names 'drop-target-dropzone' with 'dv-drop-target-dropzone'.
src/components/BootstrapBlazor.DockView/wwwroot/css/dockview.css

Assessment against linked issues

Issue Objective Addressed Explanation
#314 Bump the dockview-core version to v3.2.0.

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!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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 Feb 17, 2025
@bb-auto bb-auto Bot added this to the v9.2.0 milestone Feb 17, 2025
@ArgoZhang ArgoZhang merged commit 4f4d9ad into master Feb 17, 2025
@ArgoZhang ArgoZhang deleted the refactor-dv-newVersion branch February 17, 2025 06:25
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 @ArgoZhang - I've reviewed your changes - here's some feedback:

Overall Comments:

  • This PR introduces a significant version bump; consider providing a more detailed migration guide or highlighting major changes in the description.
  • The diff includes extensive class name changes (e.g., 'horizontal' to 'dv-horizontal'); ensure these changes are thoroughly tested across different themes and configurations.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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.

Comment on lines 126 to -127
if (dockview.params.observer === null) {
dockview.params.observer = new ResizeObserver(observerList => resizeObserverHandle(observerList, dockview));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion (performance): Wrapped the ResizeObserver callback in requestAnimationFrame.

This enhancement should help prevent layout thrashing; verify that performance improvements are observed during window resizes.

Suggested change
if (dockview.params.observer === null) {
dockview.params.observer = new ResizeObserver(observerList => resizeObserverHandle(observerList, dockview));
if (dockview.params.observer === null) {
// Wrap the ResizeObserver callback in requestAnimationFrame to help prevent layout thrashing during window resizes.
dockview.params.observer = new ResizeObserver(observerList => requestAnimationFrame(() => resizeObserverHandle(observerList, dockview)));

*/
this.layout(json.width, json.height);
if (json.maximizedNode) {
const location = json.maximizedNode.location;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion (code-quality): Prefer object destructuring when accessing and using properties. (use-object-destructuring)

Suggested change
const location = json.maximizedNode.location;
const {location} = json.maximizedNode;


ExplanationObject destructuring can often remove an unnecessary temporary reference, as well as making your code more succinct.

From the Airbnb Javascript Style Guide

}
}

const MINIMUM_DOCKVIEW_GROUP_PANEL_WIDTH = 100;
const MINIMUM_DOCKVIEW_GROUP_PANEL_HEIGHT = 100;
class DockviewGroupPanel extends GridviewPanel {
get minimumWidth() {
var _a;
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 (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

return super.__minimumWidth();
}
get minimumHeight() {
var _a;
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 (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

return super.__minimumHeight();
}
get maximumWidth() {
var _a;
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 (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

return super.__maximumWidth();
}
get maximumHeight() {
var _a;
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 (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

super(parentElement, {
proportionalLayout: options.proportionalLayout,
constructor(container, options) {
var _a;
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 (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

@@ -9271,18 +9587,17 @@ class SplitviewComponent extends Resizable {
return this.panels.find((view) => view.id === id);
}
addPanel(options) {
var _a, _b, _c;
var _a;
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 (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

createComponent: this.options.frameworkWrapper.body.createComponent,
}
: undefined);
var _a;
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 (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

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 9.1.0

2 participants