-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add raw html table and related components (#18553)
* feat: add <table>, <thead>, <tbody>, <tfoot>, <tr>, <th> and <td> elements * refactor: rename Table to HtmlTable * refactor: rename to NativeTable * feat: add colspan and rowspan * feat: add TableRowContainer interface * chore: run formatter * feat: add TableCaption * feat: add caption to the table * feat: add methods for managing body elements in a table * feat: add methods to manage the table's head and foot sections. * chore: remove unused imports * feat: add methods to manage cells in a row * chore: run formatter * feat: add TestBench class for caption element * chore: fix JavaDoc * docs: complete JavaDocs * chore: add TableCaption test * chore: run formatter * Rename & cleanup * Add missing copyright headers * Add caption tag; reorder tags * Fix tests * test: add tests for colspan and rowspan methods in native table cell * test: add tests for NativeTableRowContainer interface * test: add table caption tests * test: add tests for table header and footer methods * test: add tests for table body methods --------- Co-authored-by: Teppo Kurki <teppo.kurki@vaadin.com> Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
- Loading branch information
1 parent
135bcfe
commit f4bf965
Showing
28 changed files
with
1,960 additions
and
2 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...tbench/src/main/java/com/vaadin/flow/component/html/testbench/NativeTableBodyElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2000-2024 Vaadin Ltd. | ||
* | ||
* 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. | ||
*/ | ||
package com.vaadin.flow.component.html.testbench; | ||
|
||
import com.vaadin.testbench.TestBenchElement; | ||
import com.vaadin.testbench.elementsbase.Element; | ||
|
||
/** | ||
* A TestBench element representing a <code><tbody></code> element. | ||
* | ||
* @since 24.4 | ||
*/ | ||
@Element("tbody") | ||
public class NativeTableBodyElement extends TestBenchElement { | ||
} |
28 changes: 28 additions & 0 deletions
28
...nch/src/main/java/com/vaadin/flow/component/html/testbench/NativeTableCaptionElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2000-2024 Vaadin Ltd. | ||
* | ||
* 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. | ||
*/ | ||
package com.vaadin.flow.component.html.testbench; | ||
|
||
import com.vaadin.testbench.TestBenchElement; | ||
import com.vaadin.testbench.elementsbase.Element; | ||
|
||
/** | ||
* A TestBench element representing a <code><caption></code> element. | ||
* | ||
* @since 24.4 | ||
*/ | ||
@Element("caption") | ||
public class NativeTableCaptionElement extends TestBenchElement { | ||
} |
28 changes: 28 additions & 0 deletions
28
...tbench/src/main/java/com/vaadin/flow/component/html/testbench/NativeTableCellElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2000-2024 Vaadin Ltd. | ||
* | ||
* 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. | ||
*/ | ||
package com.vaadin.flow.component.html.testbench; | ||
|
||
import com.vaadin.testbench.TestBenchElement; | ||
import com.vaadin.testbench.elementsbase.Element; | ||
|
||
/** | ||
* A TestBench element representing a <code><td></code> element. | ||
* | ||
* @since 24.4 | ||
*/ | ||
@Element("td") | ||
public class NativeTableCellElement extends TestBenchElement { | ||
} |
28 changes: 28 additions & 0 deletions
28
...-testbench/src/main/java/com/vaadin/flow/component/html/testbench/NativeTableElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2000-2024 Vaadin Ltd. | ||
* | ||
* 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. | ||
*/ | ||
package com.vaadin.flow.component.html.testbench; | ||
|
||
import com.vaadin.testbench.TestBenchElement; | ||
import com.vaadin.testbench.elementsbase.Element; | ||
|
||
/** | ||
* A TestBench element representing a <code><table></code> element. | ||
* | ||
* @since 24.4 | ||
*/ | ||
@Element("table") | ||
public class NativeTableElement extends TestBenchElement { | ||
} |
28 changes: 28 additions & 0 deletions
28
...ench/src/main/java/com/vaadin/flow/component/html/testbench/NativeTableFooterElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2000-2024 Vaadin Ltd. | ||
* | ||
* 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. | ||
*/ | ||
package com.vaadin.flow.component.html.testbench; | ||
|
||
import com.vaadin.testbench.TestBenchElement; | ||
import com.vaadin.testbench.elementsbase.Element; | ||
|
||
/** | ||
* A TestBench element representing a <code><tfoot></code> element. | ||
* | ||
* @since 24.4 | ||
*/ | ||
@Element("tfoot") | ||
public class NativeTableFooterElement extends TestBenchElement { | ||
} |
28 changes: 28 additions & 0 deletions
28
.../src/main/java/com/vaadin/flow/component/html/testbench/NativeTableHeaderCellElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2000-2024 Vaadin Ltd. | ||
* | ||
* 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. | ||
*/ | ||
package com.vaadin.flow.component.html.testbench; | ||
|
||
import com.vaadin.testbench.TestBenchElement; | ||
import com.vaadin.testbench.elementsbase.Element; | ||
|
||
/** | ||
* A TestBench element representing a <code><th></code> element. | ||
* | ||
* @since 24.4 | ||
*/ | ||
@Element("th") | ||
public class NativeTableHeaderCellElement extends TestBenchElement { | ||
} |
28 changes: 28 additions & 0 deletions
28
...ench/src/main/java/com/vaadin/flow/component/html/testbench/NativeTableHeaderElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2000-2024 Vaadin Ltd. | ||
* | ||
* 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. | ||
*/ | ||
package com.vaadin.flow.component.html.testbench; | ||
|
||
import com.vaadin.testbench.TestBenchElement; | ||
import com.vaadin.testbench.elementsbase.Element; | ||
|
||
/** | ||
* A TestBench element representing a <code><thead></code> element. | ||
* | ||
* @since 24.4 | ||
*/ | ||
@Element("thead") | ||
public class NativeTableHeaderElement extends TestBenchElement { | ||
} |
28 changes: 28 additions & 0 deletions
28
...stbench/src/main/java/com/vaadin/flow/component/html/testbench/NativeTableRowElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2000-2024 Vaadin Ltd. | ||
* | ||
* 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. | ||
*/ | ||
package com.vaadin.flow.component.html.testbench; | ||
|
||
import com.vaadin.testbench.TestBenchElement; | ||
import com.vaadin.testbench.elementsbase.Element; | ||
|
||
/** | ||
* A TestBench element representing a <code><tr></code> element. | ||
* | ||
* @since 24.4 | ||
*/ | ||
@Element("tr") | ||
public class NativeTableRowElement extends TestBenchElement { | ||
} |
Oops, something went wrong.