Skip to content

feat(DockView): bump version 4.2.4#429

Merged
ArgoZhang merged 5 commits intomasterfrom
dev-dockview
Apr 30, 2025
Merged

feat(DockView): bump version 4.2.4#429
ArgoZhang merged 5 commits intomasterfrom
dev-dockview

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Apr 30, 2025

Link issues

fixes #428

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 DockView library version to 4.2.4 with several minor improvements and bug fixes

New Features:

  • Added new utility functions for element positioning and z-index handling

Bug Fixes:

  • Fixed z-index handling for popover elements
  • Improved tab interaction with pointer events

Enhancements:

  • Improved popover and tab interaction handling
  • Enhanced element positioning and visibility management

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 30, 2025

Reviewer's Guide

This pull request bumps the version of the dockview-core.esm.js library to 4.2.4, incorporating upstream changes, and adjusts related CSS styles.

File-Level Changes

Change Details Files
Update dockview-core.esm.js to version 4.2.4 and integrate upstream changes.
  • Bump version comment from 4.2.3 to 4.2.4.
  • Add shiftAbsoluteElementIntoView utility function to keep absolutely positioned elements within the viewport.
  • Add findRelativeZIndexParent utility function.
  • Update TabsContainer to use pointerdown event instead of mousedown and utilize findRelativeZIndexParent for popup z-index.
  • Update PopupService to use shiftAbsoluteElementIntoView for popovers and allow custom z-index.
  • Modify DockviewComponent to conditionally add views based on whether the source is a popout.
src/components/BootstrapBlazor.DockView/wwwroot/js/dockview-core.esm.js
Adjust CSS styles for DockView components.
  • Reorder some style rules in dockview.css.
  • Update positioning, margins, and borders for aside elements (.bb-dockview-aside-left, .bb-dockview-aside-right, .bb-dockview-aside-button) in dockview-bb.css.
src/components/BootstrapBlazor.DockView/wwwroot/css/dockview.css
src/components/BootstrapBlazor.DockView/wwwroot/css/dockview-bb.css

Assessment against linked issues

Issue Objective Addressed Explanation

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 Apr 30, 2025
@bb-auto bb-auto Bot added this to the v9.2.0 milestone Apr 30, 2025
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:

  • Consider reverting the reordering of CSS rules in dockview.css to reduce diff noise.
  • Consider separating the update of the core DockView library assets from the specific CSS changes in dockview-bb.css.
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.

}));
return disposable;
}
function shiftAbsoluteElementIntoView(element, root, options = { buffer: 10 }) {
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 (bug_risk): Potential bug: rootRect is obtained from element instead of root.

Use root.getBoundingClientRect() instead of element.getBoundingClientRect() so calculations use the container’s boundaries.

this._listeners.splice(index, 1);
}
else if (Emitter.ENABLE_TRACKING);
else if (Emitter.ENABLE_TRACKING) ;
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): Use block braces for ifs, whiles, etc. (use-braces)

Suggested change
else if (Emitter.ENABLE_TRACKING) ;
else if (Emitter.ENABLE_TRACKING) {


ExplanationIt is recommended to always use braces and create explicit statement blocks.

Using the allowed syntax to just write a single statement can lead to very confusing
situations, especially where subsequently a developer might add another statement
while forgetting to add the braces (meaning that this wouldn't be included in the condition).

return disposable;
}
function shiftAbsoluteElementIntoView(element, root, options = { buffer: 10 }) {
const buffer = options.buffer;
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 buffer = options.buffer;
const {buffer} = options;


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

From the Airbnb Javascript Style Guide

updateOptions(options) {
var _a, _b, _c, _d;
if (typeof options.proportionalLayout === 'boolean');
if (typeof options.proportionalLayout === 'boolean') ;
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): Use block braces for ifs, whiles, etc. (use-braces)

Suggested change
if (typeof options.proportionalLayout === 'boolean') ;
if (typeof options.proportionalLayout === 'boolean') {


ExplanationIt is recommended to always use braces and create explicit statement blocks.

Using the allowed syntax to just write a single statement can lead to very confusing
situations, especially where subsequently a developer might add another statement
while forgetting to add the braces (meaning that this wouldn't be included in the condition).

}), this._activeDisposable);
}
openPopover(element, position) {
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

@ArgoZhang ArgoZhang merged commit 14d3d5a into master Apr 30, 2025
1 check passed
@ArgoZhang ArgoZhang deleted the dev-dockview branch April 30, 2025 05:01
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 4.2.4

2 participants