Skip to content

Commit 9035107

Browse files
web-padawanclaude
andauthored
refactor!: remove MasterDetailLayoutVariant (#9150)
## Summary - Deletes the `MasterDetailLayoutVariant` enum and drops `HasThemeVariant<MasterDetailLayoutVariant>` from `MasterDetailLayout`. - The sole variant `AURA_INSET_DRAWER` is being removed from the underlying web component in vaadin/web-components#11503, leaving the Flow-side variant enum with no values, so both it and the mixin are no longer needed. ## Test plan - [x] `mvn test -pl vaadin-master-detail-layout-flow-parent/vaadin-master-detail-layout-flow` passes (38/38) - [x] `grep -r "MasterDetailLayoutVariant" vaadin-master-detail-layout-flow-parent/` → no matches 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6e1b562 commit 9035107

3 files changed

Lines changed: 2 additions & 51 deletions

File tree

vaadin-master-detail-layout-flow-parent/vaadin-master-detail-layout-flow/src/main/java/com/vaadin/flow/component/masterdetaillayout/MasterDetailLayout.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import com.vaadin.flow.component.dependency.JsModule;
3737
import com.vaadin.flow.component.dependency.NpmPackage;
3838
import com.vaadin.flow.component.page.PendingJavaScriptResult;
39-
import com.vaadin.flow.component.shared.HasThemeVariant;
4039
import com.vaadin.flow.component.shared.SlotUtils;
4140
import com.vaadin.flow.dom.Element;
4241
import com.vaadin.flow.router.RouterLayout;
@@ -52,8 +51,8 @@
5251
@Tag("vaadin-master-detail-layout")
5352
@NpmPackage(value = "@vaadin/master-detail-layout", version = "25.2.0-alpha7")
5453
@JsModule("@vaadin/master-detail-layout/src/vaadin-master-detail-layout.js")
55-
public class MasterDetailLayout extends Component implements HasSize,
56-
HasThemeVariant<MasterDetailLayoutVariant>, RouterLayout {
54+
public class MasterDetailLayout extends Component
55+
implements HasSize, RouterLayout {
5756

5857
public static final String MASTER_SLOT = "";
5958
public static final String DETAIL_PLACEHOLDER_SLOT = "detail-placeholder";

vaadin-master-detail-layout-flow-parent/vaadin-master-detail-layout-flow/src/main/java/com/vaadin/flow/component/masterdetaillayout/MasterDetailLayoutVariant.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

vaadin-master-detail-layout-flow-parent/vaadin-master-detail-layout-flow/src/test/java/com/vaadin/flow/component/masterdetaillayout/MasterDetailLayoutTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import com.vaadin.flow.component.Text;
2929
import com.vaadin.flow.component.Unit;
3030
import com.vaadin.flow.component.html.Div;
31-
import com.vaadin.flow.component.shared.HasThemeVariant;
3231
import com.vaadin.tests.EnableFeatureFlagExtension;
3332
import com.vaadin.tests.MockUIExtension;
3433

@@ -429,12 +428,6 @@ void addDetailEscapePressListener_verifyListenerTriggered() {
429428
Mockito.verify(listener).onComponentEvent(detailEscapePressEvent);
430429
}
431430

432-
@Test
433-
void implementsHasThemeVariant() {
434-
Assertions.assertTrue(HasThemeVariant.class
435-
.isAssignableFrom(MasterDetailLayout.class));
436-
}
437-
438431
private void assertMasterContent(Component component) {
439432
Assertions.assertEquals("",
440433
component.getElement().getAttribute("slot"));

0 commit comments

Comments
 (0)