Skip to content

25.3.0-beta1

@totally-not-ai totally-not-ai tagged this 02 Sep 08:26
The `Table` component family covers everything the `Native*` table
components do, so the older family is on its way out.

`NativeTable`, `NativeTableRow` and the three section components extend
`HtmlContainer` and therefore inherit a generic `add(Component)` that
happily builds tables the HTML specification does not allow. The rest of
the family is deprecated because it belongs to the same family and only
exists to be used with it. The matching TestBench element classes are
deprecated too, so an integration test migrating off `NativeTable` gets
a compiler signal now rather than discovering the removal in 26.

## What changed

- `@Deprecated(since = "25.3", forRemoval = true)` on the components:
`NativeTable`, `NativeTableCaption`, `NativeTableHeader`,
`NativeTableBody`, `NativeTableFooter`, `NativeTableRow`,
`NativeTableHeaderCell`, `NativeTableCell`, and the package-private
`NativeTableRowContainer`.
- The same annotation on the TestBench element classes:
`NativeTableElement`, `NativeTableCaptionElement`,
`NativeTableHeaderElement`, `NativeTableBodyElement`,
`NativeTableFooterElement`, `NativeTableRowElement`,
`NativeTableHeaderCellElement`, `NativeTableCellElement`.
- Each `@deprecated` Javadoc names the replacement in the `Table` family
and, for `NativeTable`, says why moving is worth it: `Table` does not
extend `HtmlContainer`, so there is no generic `add(Component)` and it
cannot be given children the specification disallows; it keeps caption,
column groups and sections in specification order whatever order they
are added in; and it adds `<colgroup>`/`<col>` support, row and cell
factories that set `scope`, `colspan` and `rowspan`, and binding a
section's rows to a signal.

Nothing changes behaviourally — this only marks the classes, so existing
code keeps compiling and gets a warning naming the replacement. The
replacements are referenced in `{@code}` rather than `{@link}` form
because this PR stands on its own: the `Table` family arrives separately
in #25380.

## API Changes

16 classes affected, 0 methods added, 0 removed, 16 class declarations
changed (deprecation only).

### com.vaadin.flow.component.html.NativeTable

```java
// Changed
- public class NativeTable extends HtmlContainer implements ClickNotifier<NativeTable>
+ @Deprecated(since = "25.3", forRemoval = true) public class NativeTable extends HtmlContainer implements ClickNotifier<NativeTable> // use Table instead
```

### com.vaadin.flow.component.html.NativeTableCaption

```java
// Changed
- public class NativeTableCaption extends HtmlContainer
+ @Deprecated(since = "25.3", forRemoval = true) public class NativeTableCaption extends HtmlContainer // use TableCaption instead
```

### com.vaadin.flow.component.html.NativeTableHeader

```java
// Changed
- public class NativeTableHeader extends HtmlContainer implements NativeTableRowContainer, ClickNotifier<NativeTableHeader>
+ @Deprecated(since = "25.3", forRemoval = true) public class NativeTableHeader extends HtmlContainer implements NativeTableRowContainer, ClickNotifier<NativeTableHeader> // use TableHead instead
```

### com.vaadin.flow.component.html.NativeTableBody

```java
// Changed
- public class NativeTableBody extends HtmlContainer implements NativeTableRowContainer, ClickNotifier<NativeTableBody>
+ @Deprecated(since = "25.3", forRemoval = true) public class NativeTableBody extends HtmlContainer implements NativeTableRowContainer, ClickNotifier<NativeTableBody> // use TableBody instead
```

### com.vaadin.flow.component.html.NativeTableFooter

```java
// Changed
- public class NativeTableFooter extends HtmlContainer implements NativeTableRowContainer, ClickNotifier<NativeTableFooter>
+ @Deprecated(since = "25.3", forRemoval = true) public class NativeTableFooter extends HtmlContainer implements NativeTableRowContainer, ClickNotifier<NativeTableFooter> // use TableFoot instead
```

### com.vaadin.flow.component.html.NativeTableRow

```java
// Changed
- public class NativeTableRow extends HtmlContainer implements HasOrderedComponents, ClickNotifier<NativeTableRow>
+ @Deprecated(since = "25.3", forRemoval = true) public class NativeTableRow extends HtmlContainer implements HasOrderedComponents, ClickNotifier<NativeTableRow> // use TableRow instead
```

### com.vaadin.flow.component.html.NativeTableHeaderCell

```java
// Changed
- public class NativeTableHeaderCell extends HtmlContainer implements ClickNotifier<NativeTableHeaderCell>
+ @Deprecated(since = "25.3", forRemoval = true) public class NativeTableHeaderCell extends HtmlContainer implements ClickNotifier<NativeTableHeaderCell> // use TableHeaderCell instead
```

### com.vaadin.flow.component.html.NativeTableCell

```java
// Changed
- public class NativeTableCell extends HtmlContainer implements ClickNotifier<NativeTableCell>
+ @Deprecated(since = "25.3", forRemoval = true) public class NativeTableCell extends HtmlContainer implements ClickNotifier<NativeTableCell> // use TableDataCell instead
```

### com.vaadin.flow.component.html.testbench.NativeTableElement

```java
// Changed
- @Element("table") public class NativeTableElement extends TestBenchElement
+ @Deprecated(since = "25.3", forRemoval = true) @Element("table") public class NativeTableElement extends TestBenchElement // use TableElement instead
```

### com.vaadin.flow.component.html.testbench.NativeTableCaptionElement

```java
// Changed
- @Element("caption") public class NativeTableCaptionElement extends TestBenchElement
+ @Deprecated(since = "25.3", forRemoval = true) @Element("caption") public class NativeTableCaptionElement extends TestBenchElement // use TableCaptionElement instead
```

### com.vaadin.flow.component.html.testbench.NativeTableHeaderElement

```java
// Changed
- @Element("thead") public class NativeTableHeaderElement extends TestBenchElement
+ @Deprecated(since = "25.3", forRemoval = true) @Element("thead") public class NativeTableHeaderElement extends TestBenchElement // use TableHeadElement instead
```

### com.vaadin.flow.component.html.testbench.NativeTableBodyElement

```java
// Changed
- @Element("tbody") public class NativeTableBodyElement extends TestBenchElement
+ @Deprecated(since = "25.3", forRemoval = true) @Element("tbody") public class NativeTableBodyElement extends TestBenchElement // use TableBodyElement instead
```

### com.vaadin.flow.component.html.testbench.NativeTableFooterElement

```java
// Changed
- @Element("tfoot") public class NativeTableFooterElement extends TestBenchElement
+ @Deprecated(since = "25.3", forRemoval = true) @Element("tfoot") public class NativeTableFooterElement extends TestBenchElement // use TableFootElement instead
```

### com.vaadin.flow.component.html.testbench.NativeTableRowElement

```java
// Changed
- @Element("tr") public class NativeTableRowElement extends TestBenchElement
+ @Deprecated(since = "25.3", forRemoval = true) @Element("tr") public class NativeTableRowElement extends TestBenchElement // use TableRowElement instead
```

###
com.vaadin.flow.component.html.testbench.NativeTableHeaderCellElement

```java
// Changed
- @Element("th") public class NativeTableHeaderCellElement extends TestBenchElement
+ @Deprecated(since = "25.3", forRemoval = true) @Element("th") public class NativeTableHeaderCellElement extends TestBenchElement // use TableHeaderCellElement instead
```

### com.vaadin.flow.component.html.testbench.NativeTableCellElement

```java
// Changed
- @Element("td") public class NativeTableCellElement extends TestBenchElement
+ @Deprecated(since = "25.3", forRemoval = true) @Element("td") public class NativeTableCellElement extends TestBenchElement // use TableDataCellElement instead
```

---------

Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>
Co-authored-by: Artur Signell <artur@vaadin.com>
Assets 2
Loading