Vaadin Flow Components 25.1.8
This is a release of the Java integration for Vaadin Components to be used from the Java server side with Vaadin Flow.
Changes in Flow Components from 25.1.7
Changes in vaadin-spreadsheet-flow
- Fixes:
-
⧉ Make spreadsheet overlays native popover, per instance (#9303) (CP: 25.1). PR:9496
This PR cherry-picks changes from the original PR #9303 to branch 25.1. --- #### Original PR description > The spreadsheet attaches a
<div id="spreadsheet-overlays">to host its overlay widgets (context menu, tooltips, comment overlays, popup buttons). It has historically lived in<body>to escape clipping by ancestoroverflow/transformrules and as a singleton shared by all spreadsheet instances on the page. Switching the overlays to native popover changes the picture: every overlay enters the top layer regardless of DOM position, so neither the body-attachment nor the singleton are load-bearing anymore. > > This PR includes the native popover changes proposed in #9270 and adds the structural changes that the popover approach enables: > > - the container moves into the<vaadin-spreadsheet>light DOM, projected into the shadow root via a newoverlaysslot, with one container per instance; > - the reference is threaded from JS into the GWT widget chain instead of being looked up by id; > -SpreadsheetConnector— notApplicationConnection— now owns theSpreadsheetContextMenu. > > Tooltips and the cell-comment overlay are created inSheetWidget's constructor (before the host is known), so the container is wired in via a setter rather than a constructor argument. > > A side benefit: spreadsheet overlays inside a modalDialogare interactive again. The modal setsbody { pointer-events: none }to disable everything outside the dialog overlay; with the container now inside the dialog's slotted content, the overlays inheritpointer-events: autofrom the dialog's overlay part instead ofpointer-events: nonefrom<body>. > > Intended to replace #9270. > > Related to #9270 > > --- > > 🤖 Generated with Claude Code -
⧉ Defer Spreadsheet.selectCellRange until sheet widget layout is ready (#9381) (CP: 25.1). PR:9486
This PR cherry-picks changes from the original PR #9381 to branch 25.1. --- > > Follow-up to #9333. When a Spreadsheet inside a closed Dialog is opened, Flow > flushes the property writes and the
setSelectedCellAndRangeRPC in the same > task. The api receives the call before the deferred init scheduled in >SheetWidget.resetFromModelhas run — soSheetWidget.getRowHeightreads an > uninitializeddefinedRowHeightsand throws > >> Uncaught TypeError: Cannot read properties of undefined (reading 'length') >> > That throw drops the selection and trips the*_noErrors/*_noConsoleErrors> console-log assertions. > > #9333's connector-side guard masked this by probingdefinedRowHeights> through the api's private GWT fields — names that only survive >-Dgwt.style=pretty(local/dev). CI compiles the GWT client with >-Dgwt.style=OBF, where those private names are renamed andapi.spreadsheetWidget> isundefined. The guard itself then threw, producing the same SEVERE log and > the same ~20 spreadsheet IT failures on the cherry-pick PRs. > > > Move the layout-readiness handling into the widget that owns the operation: > > -SheetWidget.isLoaded()(package-private) — exposes the already-existing >loadedflag that flips at the end ofresetFromModel's deferred command. > -SpreadsheetWidget.selectCellRange— if!sheetWidget.isLoaded(), store the > latest args andScheduler.scheduleDeferred(this::applyPendingSelectCellRange). > The deferred re-checks, applies, or re-schedules. Latest-wins (rapid successive > calls collapse to the final selection). Bounded at 100 hops as a safety net; > in the typical case the layout init has already been scheduled before us, so > GWT's FIFO scheduler resolves us in 0–1 hops. > -vaadin-spreadsheet.js—setSelectedCellAndRangegoes back to a one-liner > (this._flush(); this.api.setSelectedCellAndRange(...args)). No try/catch, > no pending state, no constants. > > OnlyselectCellRangeis deferred — it's the only RPC that touches row/column > metrics. Other RPCs (cellsUpdated, popup ops, etc.) don't need this and > didn't fail in the original CI runs. > > > Reproduce locally by compiling the client with-Dgwt.style=OBF(matching CI) > and running the merged ITs in production mode: > >> mvn clean install -DskipTests -Dgwt.style=OBF \ > -pl vaadin-spreadsheet-flow-parent/vaadin-spreadsheet-flow-client,vaadin-spreadsheet-flow-parent/vaadin-spreadsheet-flow > node scripts/mergeITs.js spreadsheet > mvn verify -Drun-it -pl integration-tests -Dvaadin.productionMode=true \ > -Dit.test='NavigationIT,SpreadsheetDialogIT' -DskipUnitTests >> > - With this PR → NavigationIT 26/0, SpreadsheetDialogIT 1/0. > - Reverting only the GWT-side change → SpreadsheetDialogIT fails with the > underlyingCannot read properties of undefined (reading 'length')in >FlowClient-…js— the actualdefinedRowHeightsNPE. > > Follow-up to #9333. > > --- > > 🤖 Generated with Claude Code -
⧉ Hide already-filtered values from other spreadsheet column filters (#9386). PR:9464
This PR cherry-picks changes from the original PR #9386 to branch 25.1. --- #### Original PR description > ## Description > > In a
SpreadsheetFilterTablewith filters on multiple columns, opening any column's filter dropdown showed values from rows already hidden by other columns as unchecked, suggesting they were filtered by this column. Re-checking them did nothing because another column still hid the row. > > Applying a second filter then implicitly added those already-hidden rows to the second column'sfilteredRows, so clearing the first filter did not bring the rows back — the second column now also filtered them. > > Root cause:ItemFilterreadspreadsheet.isRowHidden(r)for both building option lists and deciding which rows belong in its ownfilteredRows. That property reflects the union of all column filters, so each filter could not tell its own work from a sibling's. > > EachItemFilternow operates only on its ownfilteredRows. The dropdown option list omits values whose rows are all hidden by other columns via a newSpreadsheetFilterTable.getRowsHiddenByOtherFilters(self)helper.clearAllFiltersdoes a second pass to refresh option lists so cleared siblings are reflected immediately. > > Fixes #9329 > > ## Reproduction > >java > @Route("spreadsheet-filter-cross-column") > public class SpreadsheetFilterCrossColumnPage extends VerticalLayout { > > public SpreadsheetFilterCrossColumnPage() { > Spreadsheet spreadsheet = new Spreadsheet(); > spreadsheet.setTheme(SpreadsheetTheme.LUMO); > spreadsheet.setHeight("400px"); > > spreadsheet.createCell(0, 0, "Column A"); > spreadsheet.createCell(0, 1, "Column B"); > spreadsheet.createCell(0, 2, "Column C"); > > spreadsheet.createCell(1, 0, "Alpha"); > spreadsheet.createCell(1, 1, "Foo"); > spreadsheet.createCell(1, 2, "Alice"); > > spreadsheet.createCell(2, 0, "Beta"); > spreadsheet.createCell(2, 1, "Bar"); > spreadsheet.createCell(2, 2, "Bob"); > > spreadsheet.createCell(3, 0, "Gamma"); > spreadsheet.createCell(3, 1, "Baz"); > spreadsheet.createCell(3, 2, "Carol"); > > CellRangeAddress range = new CellRangeAddress(0, 3, 0, 2); > SpreadsheetFilterTable table = new SpreadsheetFilterTable(spreadsheet, > range); > spreadsheet.registerTable(table); > spreadsheet.refreshAllCellValues(); > > add(spreadsheet); > } > } >> > | Column A | Column B | Column C | > | -------- | -------- | -------- | > | Alpha | Foo | Alice | > | Beta | Bar | Bob | > | Gamma | Baz | Carol | > > Steps to reproduce: > > - FilterBetain column A. > - Open the filter dropdown in column B →Barshows up unchecked (before the fix), suggesting column B filtered it. > - FilterFooin column B. > - Re-checkBetain column A → the row does not reappear (before the fix), because column B now also filters it. > > 🤖 Generated with Claude Code >
-
Changes in vaadin-upload-flow
- Fixes:
-
⧉ Avoid serializing full File instance for determining uploading state (#9444) (CP: 25.1). PR:9450
This PR cherry-picks changes from the original PR #9444 to branch 25.1. --- > ## Description > > The Flow Upload component currently listens to several web component events to determine whether the component is still processing any upload or not. To facilitate that it sends fully serialized instances of all JS
Fileobjects to the server in order to access theuploadingproperty of each. Serializing the full File object can lead to circular serialization issues as reported in #9434. > > This changes the respective event listeners to determine the uploading state on the client via a JS expression and then only sends a single boolean with the event, rather than the full File object. This avoids serializing File objects completely and also reduces the payload of the event. > > Fixes #9434 > > ## Type of change > > - Bugfix
-