Skip to content

refactor!: update MasterDetailLayout API to match web component changes#8952

Merged
web-padawan merged 5 commits intomainfrom
refactor/mdl-2.0
Mar 20, 2026
Merged

refactor!: update MasterDetailLayout API to match web component changes#8952
web-padawan merged 5 commits intomainfrom
refactor/mdl-2.0

Conversation

@web-padawan
Copy link
Member

@web-padawan web-padawan commented Mar 18, 2026

Summary

Fixes vaadin/web-components#11345
Fixes vaadin/web-components#11346
Fixes vaadin/web-components#11347

  • Remove API no longer present in the web component: setForceOverlay/isForceOverlay, setOverlayMode/getOverlayMode/OverlayMode enum, masterMinSize, and detailMinSize properties
  • Rename Containment enum to OverlayContainment and update getter/setter (overlayContainment element property)
  • Add new overlaySize property (size of detail area when shown as overlay)
  • Add new Expand enum and expand property (controls which area(s) fill available space)
  • Update Javadoc to align with web component JSDoc
  • Update unit tests and integration test demo (CategoryView) to use new API

Test plan

  • Unit tests pass (mvn test -pl vaadin-master-detail-layout-flow-parent/vaadin-master-detail-layout-flow)
  • Integration tests pass with updated web component

🤖 Generated with Claude Code

@web-padawan web-padawan changed the title refactor: update MasterDetailLayout API for web component 2.0 refactor!: update MasterDetailLayout API to match web component changes Mar 18, 2026
@web-padawan web-padawan requested a review from vursen March 18, 2026 10:21
web-padawan and others added 4 commits March 18, 2026 16:33
Remove API that no longer exists in the web component (setForceOverlay,
setOverlayMode/OverlayMode, masterMinSize, detailMinSize), rename
Containment to OverlayContainment, and add new overlaySize and expand
properties. Update Javadoc and tests accordingly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add constructor MasterDetailLayout(String masterSize, String detailSize,
Expand expandingSide) for convenient initialization.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rename Expand enum to ExpandingArea, setExpand/getExpand to
setExpandingArea/getExpandingArea. Add constructor with float sizes
and units: MasterDetailLayout(float, Unit, float, Unit, ExpandingArea).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment on lines +125 to +126
public MasterDetailLayout(float masterSize, Unit masterUnit,
float detailSize, Unit detailUnit, ExpandingArea expandingArea) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at other components, none of them seem to have constructors with unit parameters. I think a constructor taking String masterSize and String detailSize should be enough?

Copy link
Member Author

Choose a reason for hiding this comment

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

@rolfsmeds explicitly requested adding this option on the thread 😅 I don't have a strong opinion.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I dunno, maybe it's overkill?

@web-padawan
Copy link
Member Author

Let's wait until WC 25.2.0-alpha1 to be released before merging this PR.

@web-padawan web-padawan enabled auto-merge March 20, 2026 12:01
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@web-padawan web-padawan added this pull request to the merge queue Mar 20, 2026
Merged via the queue into main with commit 13f286a Mar 20, 2026
5 of 6 checks passed
@web-padawan web-padawan deleted the refactor/mdl-2.0 branch March 20, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants