Repository navigation
fix: span row group to the last row of the sheet - #10183
Conversation
The end index of a row group was resolved as -1 when the group extended to the last row of the sheet, because the search for the first row that is not part of the group always ran past the end of the sheet. The client then drew the grouping marker with no length and got -1 as the index to use for collapsing and expanding the group, so the group could not be collapsed at all. Resolve the end index to the last row of the sheet when no row outside the group is found. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds a test sheet where the row group ends on the last row of the sheet and verifies that the grouping marker spans the grouped rows and that clicking it collapses them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Drops the collapse and expand unit tests for a group ending on the last row: the collapse and expand logic itself is already covered for other sheets, and what is specific to this case - the group data sent to the client and the row level headers - is covered by the remaining tests. Merges the two browser tests into one, so that the sheet is loaded and scrolled only once. Also drops the unused row parameter of findEndOfRowGroup. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vaadin-review-bot
left a comment
There was a problem hiding this comment.
✅ Nothing to flag — the changes look good.
|
The fix looks good. The browser test covers most of #10164, but two things the issue asks for are not checked yet:
Both fit into // the collapse icon is at the end of the group, not at its start
WebElement collapseIcon = rowGrouping
.findElement(By.cssSelector(".expand"));
Assert.assertTrue("Collapse icon position",
collapseIcon.getLocation().getY() >= spreadsheetElement
.getRowHeader(LAST_ROW).getLocation().getY());
rowGrouping.click();
waitUntil(driver -> !spreadsheetElement.getRowHeader(LAST_ROW)
.isDisplayed());
findElementInShadowRoot(
By.cssSelector(".row-group-pane .grouping.plus")).click();
waitUntil(driver -> spreadsheetElement.getRowHeader(LAST_ROW)
.isDisplayed());If you add the expand step, the test name could become |
Checks that the collapse icon sits at the end of the group instead of at its start, and that clicking the marker a second time expands the group again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
@DiegoCardoso Both checks are in now (8775249), and the test is renamed to
One deviation from your snippet: both clicks target the
|
|
|
Hi @totally-not-ai[bot] and @DiegoCardoso, when i performed cherry-pick to this commit to 24.10, i have encountered the following issue. Can you take a look and pick it manually? |
|
This ticket/PR has been released with Vaadin 25.4.0-alpha1. |



Fixes #10164
Summary
A row group that ends on the last row of a spreadsheet could not be collapsed. Its grouping marker also showed with no length. This change fixes how the end of the group is found, so these groups now work like all other row groups.
What changed
-1as the end index. The client then drew a marker with no length and used-1to collapse and expand the group, so nothing happened.rowparameter from the internal methodGroupingUtil.findEndOfRowGroup.row_group_at_last_row.xlsx, for the browser test.Behavior change: This only affects row groups that end on the last row of the sheet. They now show a full-length marker and can be collapsed and expanded. Other groups work as before. There is no public API change, because
GroupingUtilis package-private.Test summary
Row grouping data:
Row level headers:
Grouping marker (browser):