From ab58b49c3d578102569ed3d14a991c2e9d68c589 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Mon, 15 Dec 2025 10:40:27 -0300 Subject: [PATCH 1/5] build!: remove compatibility with Vaadin 23 --- pom.xml | 56 ++++++++++++-------------------------------------------- 1 file changed, 12 insertions(+), 44 deletions(-) diff --git a/pom.xml b/pom.xml index 3afbd39..221bddc 100644 --- a/pom.xml +++ b/pom.xml @@ -10,15 +10,16 @@ https://www.flowingcode.com/en/open-source/ - 23.3.35 - 11 - 11 + 24.8.14 + 17 + 17 UTF-8 UTF-8 ${project.basedir}/drivers - 9.4.36.v20210114 + 11.0.26 6.1.0 - 1.0.17 + 1.0.18 + true @@ -62,7 +63,7 @@ com.flowingcode.vaadin.addons.demo commons-demo - 3.8.0 + 4.3.0 @@ -546,43 +547,6 @@ - - v23 - - 23.3.5 - 11 - 11 - - - - - v24 - - 17 - 17 - 24.2.6 - 11.0.12 - true - 5.6.3 - 1.0.18 - - - - - org.seleniumhq.selenium - selenium-java - 4.17.0 - test - - - com.flowingcode.vaadin.addons.demo - commons-demo - 4.2.0 - test - - - - release @@ -602,7 +566,7 @@ 21 21 - 25.0.0-beta7 + 25.0.0-rc1 11.0.26 @@ -624,6 +588,10 @@ 5.0.0 test + + com.vaadin + vaadin-dev + From b0078f563c9fa58c05b89cb0400f7abb72e65d14 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Mon, 15 Dec 2025 10:41:00 -0300 Subject: [PATCH 2/5] ci: align github actions with supported Vaadin versions --- .github/workflows/maven-v1.yml | 42 ++++++++++++++++++++++++++++++++++ .github/workflows/maven.yml | 16 ++++++------- 2 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/maven-v1.yml diff --git a/.github/workflows/maven-v1.yml b/.github/workflows/maven-v1.yml new file mode 100644 index 0000000..147b2e3 --- /dev/null +++ b/.github/workflows/maven-v1.yml @@ -0,0 +1,42 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Java CI with Maven + +on: + push: + branches: [ "1.x" ] + pull_request: + branches: [ "1.x" ] + +jobs: + build-vaadin23: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + - name: Build (Vaadin 23) + run: mvn -B package --file pom.xml -Pv23 + + build-vaadin24: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build (Vaadin 24) + run: mvn -B package --file pom.xml -Pv24 diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7712c12..1a2854e 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,28 +15,28 @@ on: branches: [ "master" ] jobs: - build-vaadin23: + build-vaadin24: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'temurin' cache: maven - - name: Build (Vaadin 23) - run: mvn -B package --file pom.xml -Pv23 + - name: Build (Vaadin 24) + run: mvn -B package --file pom.xml - build-vaadin24: + build-vaadin25: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: maven - - name: Build (Vaadin 24) - run: mvn -B package --file pom.xml -Pv24 + - name: Build (Vaadin 25) + run: mvn -B package --file pom.xml -Pv25 From 8823356f500cf0999f198d517440e002bd705ac1 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Mon, 15 Dec 2025 13:03:22 -0300 Subject: [PATCH 3/5] feat!: replace classNameGenerator with partNameGenerator Close #148 --- .../vaadin/addons/gridhelpers/GridHelper.java | 40 +++++++++---------- ....java => GridHelperPartNameGenerator.java} | 21 +++++----- .../gridhelpers/SelectionFilterHelper.java | 6 +-- .../frontend/fcGridHelper/vaadin-grid.css | 4 +- 4 files changed, 36 insertions(+), 35 deletions(-) rename src/main/java/com/flowingcode/vaadin/addons/gridhelpers/{GridHelperClassNameGenerator.java => GridHelperPartNameGenerator.java} (72%) diff --git a/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java b/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java index 11e8226..675af25 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java +++ b/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java @@ -83,11 +83,11 @@ public final class GridHelper implements Serializable { @Getter(value = AccessLevel.PACKAGE) private final Grid grid; - private final GridHelperClassNameGenerator helperClassNameGenerator; + private final GridHelperPartNameGenerator helperPartNameGenerator; - protected void setHelperClassNameGenerator( + protected void setHelperPartNameGenerator( Class clazz, SerializableFunction generator) { - getHelper(grid).helperClassNameGenerator.setHelperClassNameGenerator(clazz, generator); + getHelper(grid).helperPartNameGenerator.setHelperPartNameGenerator(clazz, generator); grid.getDataCommunicator().reset(); } @@ -95,8 +95,8 @@ protected void setHelperClassNameGenerator( private GridHelper(Grid grid) { this.grid = grid; - helperClassNameGenerator = new GridHelperClassNameGenerator<>(); - setClassNameGenerator(grid.getClassNameGenerator()); + helperPartNameGenerator = new GridHelperPartNameGenerator<>(); + setPartNameGenerator(grid.getPartNameGenerator()); grid.addItemClickListener(this::onItemClick); grid.addAttachListener(this::onAttach); if (grid.isAttached()) { @@ -161,26 +161,24 @@ public static SelectionMode getSelectionMode(Grid grid) { } /** - * Sets the function that is used for generating CSS class names for all the cells in the rows in - * this grid. Returning {@code null} from the generator results in no custom class name being set. - * Multiple class names can be returned from the generator as space-separated. + * Sets the function that is used for generating CSS part names for all the cells in the rows in + * this grid. Returning {@code null} from the generator results in no custom part name being set. + * Multiple part names can be returned from the generator as space-separated. * - *

If {@link Column#setClassNameGenerator(SerializableFunction)} is used together with this - * method, resulting class names from both methods will be effective. Class names generated by - * grid are applied to the cells before the class names generated by column. This means that if - * the classes contain conflicting style properties, column's classes will win. + *

+ * If {@link Column#setPartNameGenerator(SerializableFunction)} is used together with this method, + * resulting part names from both methods will be effective. * - * @param classNameGenerator the class name generator to set, not {@code null} - * @throws NullPointerException if {@code classNameGenerator} is {@code null} - * @see Column#setClassNameGenerator(SerializableFunction) + * @param partNameGenerator the part name generator to set. + * @see Column#setPartNameGenerator(SerializableFunction) */ - public void setClassNameGenerator(SerializableFunction classNameGenerator) { - grid.setClassNameGenerator(helperClassNameGenerator); - if (classNameGenerator instanceof GridHelperClassNameGenerator) { - helperClassNameGenerator.setGridClassNameGenerator( - ((GridHelperClassNameGenerator) classNameGenerator).getGridClassNameGenerator()); + public void setPartNameGenerator(SerializableFunction partNameGenerator) { + grid.setPartNameGenerator(helperPartNameGenerator); + if (partNameGenerator instanceof GridHelperPartNameGenerator) { + helperPartNameGenerator.setGridPartNameGenerator( + ((GridHelperPartNameGenerator) partNameGenerator).getGridPartNameGenerator()); } else { - helperClassNameGenerator.setGridClassNameGenerator(classNameGenerator); + helperPartNameGenerator.setGridPartNameGenerator(partNameGenerator); } } diff --git a/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelperClassNameGenerator.java b/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelperPartNameGenerator.java similarity index 72% rename from src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelperClassNameGenerator.java rename to src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelperPartNameGenerator.java index e72e97d..c8619dd 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelperClassNameGenerator.java +++ b/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelperPartNameGenerator.java @@ -2,7 +2,7 @@ * #%L * Grid Helpers Add-on * %% - * Copyright (C) 2022 - 2024 Flowing Code + * Copyright (C) 2022 - 2025 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,27 +31,30 @@ import lombok.Setter; @SuppressWarnings("serial") -final class GridHelperClassNameGenerator implements SerializableFunction { +final class GridHelperPartNameGenerator implements SerializableFunction { - private Map, SerializableFunction> helperClassNameGenerators = + private Map, SerializableFunction> helperPartNameGenerators = new HashMap<>(); - @Getter @Setter private SerializableFunction gridClassNameGenerator; + @Getter + @Setter + private SerializableFunction gridPartNameGenerator; private transient boolean invoked; - void setHelperClassNameGenerator(Class clazz, SerializableFunction generator) { + void setHelperPartNameGenerator(Class clazz, SerializableFunction generator) { if (generator != null) { - helperClassNameGenerators.put(clazz, generator); + helperPartNameGenerators.put(clazz, generator); } else { - helperClassNameGenerators.remove(clazz); + helperPartNameGenerators.remove(clazz); } } private Stream> generators() { + return Stream.concat( - Optional.ofNullable(gridClassNameGenerator).map(Stream::of).orElseGet(Stream::empty), - helperClassNameGenerators.values().stream()); + Optional.ofNullable(gridPartNameGenerator).map(Stream::of).orElseGet(Stream::empty), + helperPartNameGenerators.values().stream()); } @Override diff --git a/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/SelectionFilterHelper.java b/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/SelectionFilterHelper.java index 1af2867..40fbc83 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/SelectionFilterHelper.java +++ b/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/SelectionFilterHelper.java @@ -2,7 +2,7 @@ * #%L * Grid Helpers Add-on * %% - * Copyright (C) 2022 - 2024 Flowing Code + * Copyright (C) 2022 - 2025 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,11 +59,11 @@ public void setSelectionFilter(SerializablePredicate predicate) { currentSingleSelectedItem = null; if (predicate != null) { deselectIf(predicate.negate()); - helper.setHelperClassNameGenerator( + helper.setHelperPartNameGenerator( this.getClass(), row -> predicate.test(row) ? null : "fcGh-noselect"); selectionListenerRegistration = grid.addSelectionListener(this::onSelection); } else { - helper.setHelperClassNameGenerator(this.getClass(), null); + helper.setHelperPartNameGenerator(this.getClass(), null); } } diff --git a/src/main/resources/META-INF/frontend/fcGridHelper/vaadin-grid.css b/src/main/resources/META-INF/frontend/fcGridHelper/vaadin-grid.css index 7c56831..0c64597 100644 --- a/src/main/resources/META-INF/frontend/fcGridHelper/vaadin-grid.css +++ b/src/main/resources/META-INF/frontend/fcGridHelper/vaadin-grid.css @@ -2,7 +2,7 @@ * #%L * Grid Helpers Add-on * %% - * Copyright (C) 2022 - 2024 Flowing Code + * Copyright (C) 2022 - 2025 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ --fcgh-toggle-right: 24px; } -table[aria-multiselectable="true"] .fcGh-noselect[first-column] ::slotted(*) { +table[aria-multiselectable="true"] [part~="fcGh-noselect"][first-column] ::slotted(*) { opacity: var(--fcgh-noselect-opacity, 0.5); pointer-events: none; } From c74c3aa2257f61ebe3cb46a96887a0841255a976 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Mon, 15 Dec 2025 13:12:44 -0300 Subject: [PATCH 4/5] deprecate: deprecate footer/header styles --- .../vaadin/addons/gridhelpers/GridHelper.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java b/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java index 675af25..9a668d1 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java +++ b/src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelper.java @@ -433,18 +433,54 @@ public static boolean isFooterVisible(Grid grid) { private final HeaderFooterStylesHelper headerFooterStylesHelper = new HeaderFooterStylesHelper(this); + /** + * Returns a helper for managing CSS styles on cells within a header row. + * + * @param grid the grid containing the header row + * @param row the header row to style + * @return a {@link GridStylesHelper} for managing styles on the header row's cells + * @deprecated Use {@link HeaderCell#setPartName(String)} and {@link HeaderCell#getPartName()} + */ + @Deprecated public static GridStylesHelper getHeaderStyles(Grid grid, HeaderRow row) { return getHelper(grid).headerFooterStylesHelper.getStyles(row); } + /** + * Returns a helper for managing CSS styles on cells within a footer row. + * + * @param grid the grid containing the footer row + * @param row the footer row to style + * @return a {@link GridStylesHelper} for managing styles on the footer row's cells + * @deprecated Use {@link FooterCell#setPartName(String)} and {@link FooterCell#getPartName()} + */ + @Deprecated public static GridStylesHelper getFooterStyles(Grid grid, FooterRow row) { return getHelper(grid).headerFooterStylesHelper.getStyles(row); } + /** + * Returns a helper for managing CSS styles on a specific header cell. + * + * @param grid the grid containing the header cell + * @param cell the header cell to style + * @return a {@link GridStylesHelper} for managing styles on the header cell + * @deprecated Use {@link HeaderCell#setPartName(String)} and {@link HeaderCell#getPartName()} + */ + @Deprecated public static GridStylesHelper getHeaderStyles(Grid grid, HeaderCell cell) { return getHelper(grid).headerFooterStylesHelper.getStyles(cell); } + /** + * Returns a helper for managing CSS styles on a specific footer cell. + * + * @param grid the grid containing the footer cell + * @param cell the footer cell to style + * @return a {@link GridStylesHelper} for managing styles on the footer cell + * @deprecated Use {@link FooterCell#setPartName(String)} and {@link FooterCell#getPartName()} + */ + @Deprecated public static GridStylesHelper getFooterStyles(Grid grid, FooterCell cell) { return getHelper(grid).headerFooterStylesHelper.getStyles(cell); } From 26017f34d2b86acf54b6db06e6e13fbf005e7318 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Mon, 15 Dec 2025 13:50:46 -0300 Subject: [PATCH 5/5] build: remove vaadin pre-release repositories --- pom.xml | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/pom.xml b/pom.xml index 221bddc..7bbd80a 100644 --- a/pom.xml +++ b/pom.xml @@ -79,16 +79,6 @@ Vaadin Directory https://maven.vaadin.com/vaadin-addons - - - - Vaadin prereleases - https://maven.vaadin.com/vaadin-prereleases - - - - vaadin-snapshots - https://oss.sonatype.org/content/repositories/vaadin-snapshots/ FlowingCode Snapshots @@ -102,26 +92,6 @@ - - - central - https://repo.maven.apache.org/maven2 - - false - - - - - Vaadin prereleases - https://maven.vaadin.com/vaadin-prereleases - - - vaadin-snapshots - https://oss.sonatype.org/content/repositories/vaadin-snapshots/ - false - - - org.projectlombok @@ -569,18 +539,6 @@ 25.0.0-rc1 11.0.26 - - - vaadin-prerelease - https://maven.vaadin.com/vaadin-prereleases - - - - - vaadin-prerelease - https://maven.vaadin.com/vaadin-prereleases - - com.flowingcode.vaadin.addons.demo