Skip to content

feat(DockView): add overflow style for floating window#471

Merged
ArgoZhang merged 2 commits intomasterfrom
release-dockview-v4.3.1
Jun 16, 2025
Merged

feat(DockView): add overflow style for floating window#471
ArgoZhang merged 2 commits intomasterfrom
release-dockview-v4.3.1

Conversation

@zhaijunlei955
Copy link
Copy Markdown
Contributor

@zhaijunlei955 zhaijunlei955 commented Jun 16, 2025

Link issues

fixes #472

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

Upgrade Dockview to v4.3.1 with upstream bug fixes, event enhancements, popup improvements, and CSS cleanups

New Features:

  • Enable replay of the last event for onDidActivePanelChange via the Emitter replay option

Bug Fixes:

  • Correct DropTarget option typos by renaming overrideTraget to overrideTarget and dropTraget to dropTarget

Enhancements:

  • Support explicit referenceGroup parameter when creating popout overlays and adjust addPopoutGroup signature accordingly
  • Toggle overflowHidden CSS class on panel content during group packup and unpack to manage overflow

Chores:

  • Bump dockview-core version from 4.2.5 to 4.3.1
  • Consolidate duplicated tab CSS rules into dockview.css and add .bb-overflowHidden class in dockview-bb.css

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Jun 16, 2025

Reviewer's Guide

This PR upgrades dockview to v4.3.1, reconciles CSS & JS API changes for renamed targets and layout options, adds overflow handling for panels, and refactors duplicated CSS rules.

Sequence Diagram: Emitter Event Firing with Replay Option

sequenceDiagram
    participant ClientCode
    participant Emitter

    ClientCode->>Emitter: new Emitter({ replay: true })
    ClientCode->>Emitter: fire(eventData)
    activate Emitter
    Note right of Emitter: Stores eventData as _last if options.replay is true
    Emitter-->>ClientCode: (listeners notified)
    deactivate Emitter
Loading

Sequence Diagram: Popout Panel with Optional Reference Group

sequenceDiagram
    participant User
    participant DockviewComponent
    participant ItemToPopout

    User->>DockviewComponent: Initiate Popout (itemToPopout, options: { referenceGroup: refGroup })
    activate DockviewComponent
    DockviewComponent->>DockviewComponent: Determine referenceGroup (from options or itemToPopout)
    DockviewComponent->>DockviewComponent: Create Popout Window/Group (using referenceGroup)
    DockviewComponent-->>User: Popout Window Displayed
    deactivate DockviewComponent
Loading

File-Level Changes

Change Details Files
Bumped dockview-core version and enabled event replay for active panel events
  • Updated version comment to 4.3.1
  • Wrapped Emitter with replay flag for active panel change
wwwroot/js/dockview-core.esm.js
Renamed dropTraget to dropTarget and standardized override target logic
  • Replaced misspelled overrideTraget with overrideTarget
  • Renamed dropTraget property to dropTarget
  • Updated related event handler and method calls
wwwroot/js/dockview-core.esm.js
Enhanced popout API to accept referenceGroup option
  • Added referenceGroup parameter in addPopoutGroup call
  • Adjusted default fallback for referenceGroup resolution
wwwroot/js/dockview-core.esm.js
Refactored layout deserialization parameters
  • Removed unused overridePopoutGroup conditional logic
  • Streamlined variable declarations in fromJSON
wwwroot/js/dockview-core.esm.js
Consolidated and relocated tab-related CSS rules to avoid duplication
  • Removed original .dv-tab rule block
  • Appended a single consolidated .dv-tab & related selectors block
wwwroot/css/dockview.css
Improved panel overflow handling during pack-up and show-up actions
  • Added toggling of bb-overflowHidden class on panel content elements
  • Introduced .bb-overflowHidden CSS rule
wwwroot/js/dockview-group.js
wwwroot/css/dockview-bb.css

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
Copy link
Copy Markdown

bb-auto Bot commented Jun 16, 2025

Thanks for your PR, @zhaijunlei955. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@bb-auto bb-auto Bot requested a review from ArgoZhang June 16, 2025 09:41
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 @zhaijunlei955 - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `src/components/BootstrapBlazor.DockView/wwwroot/css/dockview.css:1060` </location>
<code_context>
-.dv-tab.dv-inactive-tab .dv-default-tab:hover .dv-default-tab-action {
-  visibility: visible;
-}
-.dv-tab .dv-default-tab {
-  position: relative;
-  height: 100%;
</code_context>

<issue_to_address>
Add overflow:hidden to enable text-overflow ellipsis

`text-overflow: ellipsis` needs `overflow: hidden;` to work. Please add it to this rule.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
.dv-tab .dv-default-tab {
  position: relative;
  height: 100%;
=======
.dv-tab .dv-default-tab {
  position: relative;
  height: 100%;
  overflow: hidden;
>>>>>>> REPLACE

</suggested_fix>

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 thread src/components/BootstrapBlazor.DockView/wwwroot/css/dockview.css
@ArgoZhang ArgoZhang changed the title Update dockview to v4.3.1 feat(DockView): add overflow style for floating window Jun 16, 2025
@bb-auto bb-auto Bot added the enhancement New feature or request label Jun 16, 2025
@bb-auto bb-auto Bot added this to the v9.2.0 milestone Jun 16, 2025
@ArgoZhang ArgoZhang merged commit fbb9177 into master Jun 16, 2025
1 check passed
@ArgoZhang ArgoZhang deleted the release-dockview-v4.3.1 branch June 16, 2025 09:47
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): add overflow style for floating window

2 participants