Skip to content

Add sizeSignal to MissingAPI and simplify UseCase11View#164

Merged
Legioth merged 5 commits intomainfrom
component-size
Mar 16, 2026
Merged

Add sizeSignal to MissingAPI and simplify UseCase11View#164
Legioth merged 5 commits intomainfrom
component-size

Conversation

@Artur-
Copy link
Member

@Artur- Artur- commented Mar 15, 2026

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.

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.
@Artur- Artur- requested a review from Legioth March 15, 2026 11:22
Artur- added 2 commits March 15, 2026 11:45
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.
Artur- added 2 commits March 16, 2026 11:51
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.
@Artur- Artur- requested a review from Legioth March 16, 2026 11:53
@Legioth Legioth merged commit 2a2fa67 into main Mar 16, 2026
2 checks passed
@Legioth Legioth deleted the component-size branch March 16, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants