Skip to content
Open
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
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<dependency>
<groupId>com.flowingcode.vaadin.test</groupId>
<artifactId>testbench-rpc</artifactId>
<version>1.3.0</version>
<version>1.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -544,6 +544,10 @@
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
</dependency>
Comment on lines +547 to +550
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove duplicate vaadin-dev dependency.

The vaadin-dev dependency is declared twice in the v25 profile. Lines 543-546 already include this dependency.

🔎 Proposed fix
 			<groupId>com.vaadin</groupId>
 			<artifactId>vaadin-dev</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>com.vaadin</groupId>
-			<artifactId>vaadin-dev</artifactId>
-		</dependency>
 	</dependencies>
 </profile>
📝 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
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
</dependency>
</dependency>
</dependencies>
</profile>
🤖 Prompt for AI Agents
In pom.xml around lines 547 to 550, the com.vaadin:vaadin-dev dependency is
duplicated in the v25 profile; remove this duplicate declaration (delete the
<dependency> block at lines 547-550) and verify there is only one
com.vaadin:vaadin-dev entry in that profile to avoid redundancy and potential
build issues.

</dependencies>
</profile>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
*/
package com.flowingcode.vaadin.addons.gridhelpers.it;

import static org.junit.Assert.assertEquals;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import com.flowingcode.vaadin.addons.gridhelpers.it.HeaderFooterStylesCallables.HeaderCellWrapper;
import com.flowingcode.vaadin.addons.gridhelpers.it.HeaderFooterStylesCallables.HeaderRowWrapper;
import com.flowingcode.vaadin.testbench.rpc.HasRpcSupport;
Expand Down Expand Up @@ -54,11 +55,11 @@ public void testHeaderClassesApplied() {
row1.getCell(i).setClassName("row1-cell" + i);
}

assertEquals("row0-cell0", grid.getHeaderCellAt(0, 0).getAttribute("class"));
assertEquals("row0-cell1", grid.getHeaderCellAt(0, 1).getAttribute("class"));
assertThat(grid.getHeaderCellAt(0, 0).getAttribute("class"), containsString("row0-cell0"));
assertThat(grid.getHeaderCellAt(0, 1).getAttribute("class"), containsString("row0-cell1"));

for (int i = 0; i < 5; i++) {
assertEquals("row1-cell" + i, grid.getHeaderCellAt(1, i).getAttribute("class"));
assertThat(grid.getHeaderCellAt(1, i).getAttribute("class"), containsString("row1-cell" + i));
}
}

Expand All @@ -72,8 +73,8 @@ public void testHeaderCellMutability() {
$server.setColumnOrder(2, 3, 0, 1, 4);
header0.setClassName("row0-cell0");
header1.setClassName("row0-cell1");
assertEquals("row0-cell1", grid.getHeaderCellAt(0, 0).getAttribute("class"));
assertEquals("row0-cell0", grid.getHeaderCellAt(0, 1).getAttribute("class"));
assertThat(grid.getHeaderCellAt(0, 0).getAttribute("class"), containsString("row0-cell1"));
assertThat(grid.getHeaderCellAt(0, 1).getAttribute("class"), containsString("row0-cell0"));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@

import com.flowingcode.vaadin.addons.gridhelpers.GridHelper;
import com.flowingcode.vaadin.addons.gridhelpers.GridStylesHelper;
import com.vaadin.flow.component.ClientCallable;
import com.flowingcode.vaadin.jsonmigration.InstrumentedRoute;
import com.flowingcode.vaadin.jsonmigration.LegacyClientCallable;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.grid.Grid.Column;
import com.vaadin.flow.component.grid.HeaderRow;
import com.vaadin.flow.component.grid.HeaderRow.HeaderCell;
import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.router.Route;
import elemental.json.JsonObject;
import elemental.json.JsonValue;
import java.util.List;
Expand All @@ -38,7 +38,7 @@
import lombok.experimental.ExtensionMethod;

@SuppressWarnings("serial")
@Route(HeaderFooterStylesView.ROUTE)
@InstrumentedRoute(HeaderFooterStylesView.ROUTE)
@ExtensionMethod(GridHelper.class)
public class HeaderFooterStylesView extends Div implements HeaderFooterStylesCallables {

Expand All @@ -59,7 +59,7 @@ public HeaderFooterStylesView() {
}

@Override
@ClientCallable
@LegacyClientCallable
public JsonValue $call(JsonObject invocation) {
return HeaderFooterStylesCallables.super.$call(invocation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -21,13 +21,13 @@

import com.flowingcode.vaadin.addons.gridhelpers.GridHelper;
import com.flowingcode.vaadin.addons.gridhelpers.HeightMode;
import com.vaadin.flow.component.ClientCallable;
import com.flowingcode.vaadin.jsonmigration.InstrumentedRoute;
import com.flowingcode.vaadin.jsonmigration.LegacyClientCallable;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.BeforeEvent;
import com.vaadin.flow.router.HasUrlParameter;
import com.vaadin.flow.router.OptionalParameter;
import com.vaadin.flow.router.Route;
import elemental.json.JsonObject;
import elemental.json.JsonValue;
import java.util.Arrays;
Expand All @@ -36,7 +36,7 @@
import lombok.experimental.ExtensionMethod;

@ExtensionMethod(GridHelper.class)
@Route(HeightByRowsITView.ROUTE)
@InstrumentedRoute(HeightByRowsITView.ROUTE)
public class HeightByRowsITView extends VerticalLayout
implements HeightByRowsITViewCallables, HasUrlParameter<String> {

Expand Down Expand Up @@ -86,7 +86,7 @@ public void setParameter(BeforeEvent event, @OptionalParameter String parameter)
}

@Override
@ClientCallable
@LegacyClientCallable
public JsonValue $call(JsonObject invocation) {
return HeightByRowsITViewCallables.super.$call(invocation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -23,15 +23,15 @@
import com.flowingcode.vaadin.addons.gridhelpers.GridRadioSelectionColumn;
import com.flowingcode.vaadin.addons.gridhelpers.Person;
import com.flowingcode.vaadin.addons.gridhelpers.TestData;
import com.flowingcode.vaadin.jsonmigration.InstrumentedRoute;
import com.flowingcode.vaadin.jsonmigration.LegacyClientCallable;
import com.flowingcode.vaadin.testbench.rpc.JsonArrayList;
import com.vaadin.flow.component.ClientCallable;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.grid.Grid.Column;
import com.vaadin.flow.component.grid.Grid.SelectionMode;
import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.component.html.Span;
import com.vaadin.flow.data.provider.ListDataProvider;
import com.vaadin.flow.router.Route;
import elemental.json.JsonObject;
import elemental.json.JsonValue;
import java.util.List;
Expand All @@ -40,7 +40,7 @@
import lombok.experimental.ExtensionMethod;

@SuppressWarnings("serial")
@Route("it")
@InstrumentedRoute("it")
@ExtensionMethod(GridHelper.class)
public class IntegrationView extends Div implements IntegrationViewCallables {

Expand Down Expand Up @@ -77,7 +77,7 @@ public IntegrationView() {
}

@Override
@ClientCallable
@LegacyClientCallable
public JsonValue $call(JsonObject invocation) {
return IntegrationViewCallables.super.$call(invocation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -22,10 +22,10 @@
import com.flowingcode.vaadin.addons.gridhelpers.GridHelper;
import com.flowingcode.vaadin.addons.gridhelpers.GridResponsiveStep;
import com.flowingcode.vaadin.addons.gridhelpers.GridResponsiveStep.GridResponsiveStepListenerRegistration;
import com.vaadin.flow.component.ClientCallable;
import com.flowingcode.vaadin.jsonmigration.InstrumentedRoute;
import com.flowingcode.vaadin.jsonmigration.LegacyClientCallable;
import com.vaadin.flow.component.grid.Grid;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.Route;
import elemental.json.JsonObject;
import elemental.json.JsonValue;
import java.util.List;
Expand All @@ -36,7 +36,7 @@
import lombok.experimental.ExtensionMethod;

@ExtensionMethod(GridHelper.class)
@Route(ResponsiveGridITView.ROUTE)
@InstrumentedRoute(ResponsiveGridITView.ROUTE)
public class ResponsiveGridITView extends VerticalLayout implements ResponsiveGridITViewCallables {

public static final String ROUTE = "it/responsive";
Expand All @@ -60,7 +60,7 @@ public ResponsiveGridITView() {
}

@Override
@ClientCallable
@LegacyClientCallable
public JsonValue $call(JsonObject invocation) {
return ResponsiveGridITViewCallables.super.$call(invocation);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*-
* #%L
* RPC for Vaadin TestBench
* %%
* Copyright (C) 2021 - 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
Comment on lines +1 to +19
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix incorrect license header project name.

The license header incorrectly identifies this as "RPC for Vaadin TestBench" when it should be "Grid Helpers Add-on" to match the other files in this project.

🔎 Proposed fix
 /*-
  * #%L
- * RPC for Vaadin TestBench
+ * Grid Helpers Add-on
  * %%
  * Copyright (C) 2021 - 2025 Flowing Code
📝 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
/*-
* #%L
* RPC for Vaadin TestBench
* %%
* Copyright (C) 2021 - 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/*-
* #%L
* Grid Helpers Add-on
* %%
* Copyright (C) 2021 - 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
🤖 Prompt for AI Agents
In
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java
lines 1-19, the license header's project name is incorrect ("RPC for Vaadin
TestBench"); update the header to use the correct project name "Grid Helpers
Add-on" so it matches other files in the repository—edit the text in the header
block only, preserving the rest of the license boilerplate and formatting.

package com.flowingcode.vaadin.addons.gridhelpers.it;

import com.flowingcode.vaadin.jsonmigration.InstrumentationViewInitializer;
import com.vaadin.flow.server.ServiceInitEvent;

@SuppressWarnings("serial")
public class ViewInitializerImpl extends InstrumentationViewInitializer {

@Override
public void serviceInit(ServiceInitEvent event) {
registerInstrumentedRoute(IntegrationView.class);
registerInstrumentedRoute(HeightByRowsITView.class);
registerInstrumentedRoute(HeaderFooterStylesView.class);
registerInstrumentedRoute(ResponsiveGridITView.class);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com.flowingcode.vaadin.addons.gridhelpers.it.ViewInitializerImpl