From 12db1c05b2443ba29e03c20721cd43c1c750c904 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Tue, 3 Mar 2026 10:44:25 -0300 Subject: [PATCH 1/2] fix(demo): fix demo styles in vaadin 25 --- .../vaadin/addons/uploadhelper/UploadHelperDemoView.java | 4 +++- .../{shared-styles.css => upload-helper-demo-styles.css} | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) rename src/test/resources/META-INF/frontend/styles/{shared-styles.css => upload-helper-demo-styles.css} (77%) diff --git a/src/test/java/com/flowingcode/vaadin/addons/uploadhelper/UploadHelperDemoView.java b/src/test/java/com/flowingcode/vaadin/addons/uploadhelper/UploadHelperDemoView.java index 2f839b3..d5bce71 100644 --- a/src/test/java/com/flowingcode/vaadin/addons/uploadhelper/UploadHelperDemoView.java +++ b/src/test/java/com/flowingcode/vaadin/addons/uploadhelper/UploadHelperDemoView.java @@ -2,7 +2,7 @@ * #%L * Upload Helper Add-on * %% - * Copyright (C) 2022 - 2024 Flowing Code + * Copyright (C) 2022 - 2026 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ import com.flowingcode.vaadin.addons.DemoLayout; import com.flowingcode.vaadin.addons.GithubLink; import com.flowingcode.vaadin.addons.demo.TabbedDemo; +import com.vaadin.flow.component.dependency.CssImport; import com.vaadin.flow.router.ParentLayout; import com.vaadin.flow.router.Route; @@ -29,6 +30,7 @@ @ParentLayout(DemoLayout.class) @Route("upload-helper") @GithubLink("https://github.com/FlowingCode/UploadHelper") +@CssImport("./styles/upload-helper-demo-styles.css") public class UploadHelperDemoView extends TabbedDemo { public UploadHelperDemoView() { diff --git a/src/test/resources/META-INF/frontend/styles/shared-styles.css b/src/test/resources/META-INF/frontend/styles/upload-helper-demo-styles.css similarity index 77% rename from src/test/resources/META-INF/frontend/styles/shared-styles.css rename to src/test/resources/META-INF/frontend/styles/upload-helper-demo-styles.css index 591fc71..1219ee9 100644 --- a/src/test/resources/META-INF/frontend/styles/shared-styles.css +++ b/src/test/resources/META-INF/frontend/styles/upload-helper-demo-styles.css @@ -2,7 +2,7 @@ * #%L * Upload Helper Add-on * %% - * Copyright (C) 2022 - 2024 Flowing Code + * Copyright (C) 2022 - 2026 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,7 @@ * limitations under the License. * #L% */ -/*Demo styles*/ + +#content.upload-helper-demo.demos-v25 vaadin-upload { + margin-bottom: calc(var(--vaadin-padding-s) * (1 - var(--vaadin-lumo-theme,0))); +} From 5335d46a51343178a74ef4a67d6cddeb5c0f218b Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Tue, 3 Mar 2026 10:45:41 -0300 Subject: [PATCH 2/2] feat(demo): add support for dynamic theme switching --- .../vaadin/addons/AppShellConfiguratorImpl.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/flowingcode/vaadin/addons/AppShellConfiguratorImpl.java b/src/test/java/com/flowingcode/vaadin/addons/AppShellConfiguratorImpl.java index e7a6481..7dbfbe6 100644 --- a/src/test/java/com/flowingcode/vaadin/addons/AppShellConfiguratorImpl.java +++ b/src/test/java/com/flowingcode/vaadin/addons/AppShellConfiguratorImpl.java @@ -2,7 +2,7 @@ * #%L * Upload Helper Add-on * %% - * Copyright (C) 2022 - 2024 Flowing Code + * Copyright (C) 2022 - 2026 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,11 +19,20 @@ */ package com.flowingcode.vaadin.addons; +import com.flowingcode.vaadin.addons.demo.DynamicTheme; import com.vaadin.flow.component.page.AppShellConfigurator; import com.vaadin.flow.component.page.Push; +import com.vaadin.flow.server.AppShellSettings; @SuppressWarnings("serial") @Push public class AppShellConfiguratorImpl implements AppShellConfigurator { + @Override + public void configurePage(AppShellSettings settings) { + if (DynamicTheme.isFeatureSupported()) { + DynamicTheme.LUMO.initialize(settings); + } + } + }