Add sizeSignal to MissingAPI and simplify UseCase11View#164
Merged
Conversation
Extract ResizeObserver setup into a reusable MissingAPI.sizeSignal() method that mirrors the future Component.sizeSignal() API (vaadin/flow#23618). UseCase11View now uses this instead of manual JS setup/teardown.
sizeSignal() now only takes a Component, matching the future Component.sizeSignal() API. Initial size is always (0, 0) until the ResizeObserver reports from the browser.
Store ResizeObserver on window[uuid] instead of the element so cleanup can run via detachEvent.getUI().getPage().executeJs() after the component is already detached.
Legioth
requested changes
Mar 16, 2026
Use implicit this from Element.executeJs instead of passing the element as $0. Simplify event handling with getEventDetail(ComponentSize.class) instead of manual field extraction.
Legioth
approved these changes
Mar 16, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract ResizeObserver setup into a reusable MissingAPI.sizeSignal() method that mirrors the future Component.sizeSignal() API (vaadin/flow#23618). UseCase11View now uses this instead of manual JS setup/teardown.