Skip to content

Commit fe6230d

Browse files
committed
Merge branch 'v3.0.0' of github.com:FlowingCode/TwinColGridAddon into v3.0.0
2 parents 5617769 + aa49587 commit fe6230d

File tree

5 files changed

+59
-4
lines changed

5 files changed

+59
-4
lines changed

.github/workflows/commits.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Check Commits
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
check-commits:
8+
uses: FlowingCode/GithubActions/.github/workflows/check-commits.yml@main

pom.xml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.flowingcode.vaadin.addons</groupId>
55
<artifactId>twincolgrid</artifactId>
6-
<version>2.9.3-SNAPSHOT</version>
6+
<version>3.0.0-SNAPSHOT</version>
77
<name>TwinColGrid add-on</name>
88
<properties>
99
<vaadin.version>14.8.20</vaadin.version>
1010
<maven.compiler.source>1.8</maven.compiler.source>
1111
<maven.compiler.target>1.8</maven.compiler.target>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1313
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
14+
<jetty.version>9.4.36.v20210114</jetty.version>
1415
</properties>
1516
<organization>
1617
<name>Flowing Code</name>
@@ -126,7 +127,7 @@
126127
<dependency>
127128
<groupId>com.flowingcode.vaadin.addons.demo</groupId>
128129
<artifactId>commons-demo</artifactId>
129-
<version>3.5.0</version>
130+
<version>3.6.0</version>
130131
<scope>test</scope>
131132
</dependency>
132133
</dependencies>
@@ -161,10 +162,23 @@
161162
</configuration>
162163
</plugin>
163164

165+
<plugin>
166+
<groupId>com.vaadin</groupId>
167+
<artifactId>vaadin-maven-plugin</artifactId>
168+
<version>${vaadin.version}</version>
169+
<executions>
170+
<execution>
171+
<goals>
172+
<goal>prepare-frontend</goal>
173+
</goals>
174+
</execution>
175+
</executions>
176+
</plugin>
177+
164178
<plugin>
165179
<groupId>org.eclipse.jetty</groupId>
166180
<artifactId>jetty-maven-plugin</artifactId>
167-
<version>9.4.36.v20210114</version>
181+
<version>${jetty.version}</version>
168182
<configuration>
169183
<scanIntervalSeconds>3</scanIntervalSeconds>
170184
<!-- Use test scope because the UI/demo classes are in
@@ -322,7 +336,7 @@
322336
<properties>
323337
<maven.compiler.source>17</maven.compiler.source>
324338
<maven.compiler.target>17</maven.compiler.target>
325-
<vaadin.version>24.0.0.alpha6</vaadin.version>
339+
<vaadin.version>24.0.0.beta1</vaadin.version>
326340
<jetty.version>11.0.12</jetty.version>
327341
</properties>
328342
<repositories>

src/main/resources/META-INF/resources/frontend/styles/twincol-grid.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
* #L%
1919
*/
2020

21+
.twincol-grid {
22+
min-height: calc(var(--lumo-space-m) * 13);
23+
}
2124
.twincol-grid .twincol-grid-label {
2225
color: var(--lumo-secondary-text-color);
2326
font-weight: 500;
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.flowingcode.vaadin.addons.twincolgrid;
2+
3+
import com.vaadin.flow.component.select.Select;
4+
import java.lang.reflect.InvocationTargetException;
5+
import java.lang.reflect.Method;
6+
7+
/** Binary compatibility utils for Vaadin 14-24 */
8+
public class CompatibilityExtension {
9+
10+
private static final Method setItems = lookupSetItems();
11+
12+
private static Method lookupSetItems() {
13+
try {
14+
return Select.class.getMethod("setItems", Object[].class);
15+
} catch (NoSuchMethodException e) {
16+
throw new RuntimeException(e);
17+
}
18+
}
19+
20+
public static <T> void setItems(Select<T> select, T[] items) {
21+
try {
22+
setItems.invoke(select, (Object) items);
23+
} catch (IllegalAccessException | InvocationTargetException e) {
24+
throw new RuntimeException(e);
25+
}
26+
}
27+
28+
}

src/test/java/com/flowingcode/vaadin/addons/twincolgrid/OrientationDemo.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@
3030
import java.util.HashSet;
3131
import java.util.List;
3232
import java.util.Set;
33+
import lombok.experimental.ExtensionMethod;
3334

3435
@SuppressWarnings("serial")
3536
@PageTitle("Orientation")
3637
@DemoSource
3738
@Route(value = "twincolgrid/orientation", layout = TwincolDemoView.class)
39+
@ExtensionMethod(CompatibilityExtension.class) // hide-source
3840
public class OrientationDemo extends VerticalLayout {
3941

4042
private final Set<Book> selectedBooks = new HashSet<>();

0 commit comments

Comments
 (0)