Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/maven-v1.yml
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +18 to +29
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Upgrade to actions/setup-java@v4.

The actions/setup-java@v3 action is deprecated. Update to v4 to ensure compatibility with current GitHub Actions runners.

Apply this diff:

     - name: Set up JDK
-      uses: actions/setup-java@v3
+      uses: actions/setup-java@v4
       with:
         java-version: '11'
         distribution: 'temurin'
         cache: maven
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
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-vaadin23:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build (Vaadin 23)
run: mvn -B package --file pom.xml -Pv23
🧰 Tools
🪛 actionlint (1.7.9)

23-23: the runner of "actions/setup-java@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
.github/workflows/maven-v1.yml lines 18-29: the workflow uses the deprecated
actions/setup-java@v3; update the step to use actions/setup-java@v4, keeping the
same with inputs (java-version: '11', distribution: 'temurin', cache: maven) and
ensure the step name remains "Set up JDK" so the runner uses the supported v4
action.


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
16 changes: 8 additions & 8 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +31 to +42
Copy link

@coderabbitai coderabbitai bot Dec 16, 2025

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Vaadin 25 profile correctly configured.

The job correctly updates to Java 21 and activates the v25 profile, enabling testing against Vaadin 25 RC.

However, update to actions/setup-java@v4 to avoid deprecation:

     - name: Set up JDK
-      uses: actions/setup-java@v3
+      uses: actions/setup-java@v4
       with:
         java-version: '21'
         distribution: 'temurin'
         cache: maven
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
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
build-vaadin25:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Build (Vaadin 25)
run: mvn -B package --file pom.xml -Pv25
🧰 Tools
🪛 actionlint (1.7.9)

36-36: the runner of "actions/setup-java@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
.github/workflows/maven.yml lines 31-42: the workflow uses actions/setup-java@v3
which is deprecated; update the action reference to actions/setup-java@v4 in the
"Set up JDK" step and keep the existing with: parameters (java-version: '21',
distribution: 'temurin', cache: maven); ensure the uses line is changed only to
@v4 and commit the updated workflow.

Copy link
Member Author

Choose a reason for hiding this comment

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

@coderabbitai Please create issue about it and mention that the change must be applied across all repos

Copy link

Choose a reason for hiding this comment

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Create GitHub issue about updating actions/setup-java to v4 across all repositories

gh issue create \
  --title "Update actions/setup-java from v3 to v4 across all repositories" \
  --body "## Description

The GitHub Actions workflow is currently using \`actions/setup-java@v3\`, which is deprecated. This action should be updated to \`actions/setup-java@v4\` to avoid deprecation warnings.

## Scope

This change needs to be applied across **all repositories** that use GitHub Actions workflows with the \`actions/setup-java\` action.

## Context

This issue was identified during the review of PR #153.

- PR: https://github.com/FlowingCode/GridHelpers/pull/153
- Comment: https://github.com/FlowingCode/GridHelpers/pull/153#discussion_r2623351457

## Action Items

1. Identify all repositories with GitHub Actions workflows using \`actions/setup-java@v3\`
2. Update the action reference to \`actions/setup-java@v4\` in each repository
3. Verify that existing \`with:\` parameters remain compatible

Requested by: @javier-godoy" \
  --assignee javier-godoy

Length of output: 53


@javier-godoy, I've created issue #154 about updating actions/setup-java from v3 to v4. The issue mentions that this change needs to be applied across all repositories and includes backlinks to this PR and comment for reference.

🔗 https://github.com/FlowingCode/GridHelpers/issues/154

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

@javier-godoy, thank you for the update! I've noted that the issue has been transferred to the AddonsInternal repository. The new tracking link is:

🔗 https://github.com/FlowingCode/AddonsInternal/issues/134

98 changes: 12 additions & 86 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
<url>https://www.flowingcode.com/en/open-source/</url>

<properties>
<vaadin.version>23.3.35</vaadin.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<vaadin.version>24.8.14</vaadin.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<drivers.dir>${project.basedir}/drivers</drivers.dir>
<jetty.version>9.4.36.v20210114</jetty.version>
<jetty.version>11.0.26</jetty.version>
<webdrivermanager.version>6.1.0</webdrivermanager.version>
<driver-binary-downloader-maven-plugin.version>1.0.17</driver-binary-downloader-maven-plugin.version>
<driver-binary-downloader-maven-plugin.version>1.0.18</driver-binary-downloader-maven-plugin.version>
<frontend.hotdeploy>true</frontend.hotdeploy>
</properties>

<organization>
Expand Down Expand Up @@ -62,7 +63,7 @@
<dependency>
<groupId>com.flowingcode.vaadin.addons.demo</groupId>
<artifactId>commons-demo</artifactId>
<version>3.8.0</version>
<version>4.3.0</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand All @@ -78,16 +79,6 @@
<repository>
<id>Vaadin Directory</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
</repository>
<!-- Repository needed for prerelease versions of Vaadin -->
<repository>
<id>Vaadin prereleases</id>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</repository>
<!-- Repository needed for the snapshot versions of Vaadin -->
<repository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
</repository>
<repository>
<id>FlowingCode Snapshots</id>
Expand All @@ -101,26 +92,6 @@
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<!-- Repository needed for prerelease versions of Vaadin -->
<pluginRepository>
<id>Vaadin prereleases</id>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>
<pluginRepository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases><enabled>false</enabled></releases>
</pluginRepository>
</pluginRepositories>

<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down Expand Up @@ -546,43 +517,6 @@
</build>
</profile>

<profile>
<id>v23</id>
<properties>
<vaadin.version>23.3.5</vaadin.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</profile>

<profile>
<id>v24</id>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<vaadin.version>24.2.6</vaadin.version>
<jetty.version>11.0.12</jetty.version>
<frontend.hotdeploy>true</frontend.hotdeploy>
<webdrivermanager.version>5.6.3</webdrivermanager.version>
<driver-binary-downloader-maven-plugin.version>1.0.18</driver-binary-downloader-maven-plugin.version>
</properties>

<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.17.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.flowingcode.vaadin.addons.demo</groupId>
<artifactId>commons-demo</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>

<profile>
<id>release</id>
<build>
Expand All @@ -602,28 +536,20 @@
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<vaadin.version>25.0.0-beta7</vaadin.version>
<vaadin.version>25.0.0-rc1</vaadin.version>
<jetty.version>11.0.26</jetty.version>
</properties>
<repositories>
<repository>
<id>vaadin-prerelease</id>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>vaadin-prerelease</id>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>com.flowingcode.vaadin.addons.demo</groupId>
<artifactId>commons-demo</artifactId>
<version>5.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
</dependency>
</dependencies>
Comment on lines 536 to 553
Copy link

@coderabbitai coderabbitai bot Dec 16, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Vaadin 25 profile uses an outdated release candidate.

The v25 profile specifies 25.0.0-rc1, but Vaadin 25.0.0-rc2 is available. Consider upgrading to rc2 for the latest pre-release improvements. The vaadin-dev dependency addition and Java 21 requirement are appropriate for Vaadin 25.

🤖 Prompt for AI Agents
In pom.xml around lines 536 to 553, the vaadin.version property is pinned to
25.0.0-rc1 which is outdated; update the <vaadin.version> value to 25.0.0-rc2
(or the latest available rc) in the properties section, save the file, then run
a quick mvn -DskipTests package or mvn dependency:resolve to ensure all Vaadin
artifacts (including vaadin-dev) resolve cleanly and adjust any related
plugin/configuration if incompatible.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will be handled in a separate task

Copy link

Choose a reason for hiding this comment

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

@javier-godoy, understood! I've noted that the Vaadin version update will be addressed separately.

</profile>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,20 @@ public final class GridHelper<T> implements Serializable {
@Getter(value = AccessLevel.PACKAGE)
private final Grid<T> grid;

private final GridHelperClassNameGenerator<T> helperClassNameGenerator;
private final GridHelperPartNameGenerator<T> helperPartNameGenerator;

protected void setHelperClassNameGenerator(
protected void setHelperPartNameGenerator(
Class<?> clazz, SerializableFunction<T, String> generator) {
getHelper(grid).helperClassNameGenerator.setHelperClassNameGenerator(clazz, generator);
getHelper(grid).helperPartNameGenerator.setHelperPartNameGenerator(clazz, generator);
grid.getDataCommunicator().reset();
}

private boolean selectOnClick;

private GridHelper(Grid<T> 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()) {
Expand Down Expand Up @@ -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.
*
* <p>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.
* <p>
* 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<T, String> classNameGenerator) {
grid.setClassNameGenerator(helperClassNameGenerator);
if (classNameGenerator instanceof GridHelperClassNameGenerator) {
helperClassNameGenerator.setGridClassNameGenerator(
((GridHelperClassNameGenerator<T>) classNameGenerator).getGridClassNameGenerator());
public void setPartNameGenerator(SerializableFunction<T, String> partNameGenerator) {
grid.setPartNameGenerator(helperPartNameGenerator);
if (partNameGenerator instanceof GridHelperPartNameGenerator) {
helperPartNameGenerator.setGridPartNameGenerator(
((GridHelperPartNameGenerator<T>) partNameGenerator).getGridPartNameGenerator());
} else {
helperClassNameGenerator.setGridClassNameGenerator(classNameGenerator);
helperPartNameGenerator.setGridPartNameGenerator(partNameGenerator);
}
}

Expand Down Expand Up @@ -435,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);
}
Expand Down
Loading