You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With autoResize: true (the useApp() default), opening any portal-based popover — a date-picker calendar, a Select dropdown, a tooltip — never emits ui/notifications/size-changed, so the host iframe stays at the pre-popover height and the popover is clipped.
Two independent gaps in setupSizeChangedNotifications (v1.7.4):
Trigger gap: the ResizeObserver watches only document.documentElement and document.body border-boxes. Component libraries (Mantine, Radix, MUI, Floating UI…) render popovers into an absolutely-positioned portal appended to <body> — typically inside a zero-height positioned wrapper. Neither observed border-box changes, so no measurement is ever scheduled.
Measurement gap: even when a measure does run, it reports documentElement.getBoundingClientRect().height under a transient height: max-content — which excludes out-of-flow content. An absolutely-positioned dropdown extending past the in-flow content does not contribute, so the reported height is unchanged anyway. (fix(app): autoResize collapses height:100% layouts; expose autoResize in useApp #619's proposed body.scrollHeight measure would fix this half, but not gap 1.)
Repro
Any React app embedded via the SDK:
const{ app }=useApp({ appInfo,capabilities: {}});// autoResize default// render a Mantine <DatePickerInput /> near the bottom of the content
Click the input → calendar opens in a portal, extends ~300px past the content → no size-changed notification → host iframe clips the calendar. Verified against a host that resizes the iframe to every reported height (our wire-contract harness drives AppBridge directly).
Workaround we ship
A MutationObserver on body funnelled through the public API:
scrollHeight includes the out-of-flow portal; the MutationObserver supplies the missing trigger.
Suggested fix
In setupSizeChangedNotifications, add a (debounced) MutationObserver on body alongside the existing ResizeObserver, and measure with Math.max(body.scrollHeight, documentElement.scrollHeight) (compatible with the direction #619 proposes) so out-of-flow portals are both detected and measured.
Problem
With
autoResize: true(theuseApp()default), opening any portal-based popover — a date-picker calendar, a Select dropdown, a tooltip — never emitsui/notifications/size-changed, so the host iframe stays at the pre-popover height and the popover is clipped.Two independent gaps in
setupSizeChangedNotifications(v1.7.4):ResizeObserverwatches onlydocument.documentElementanddocument.bodyborder-boxes. Component libraries (Mantine, Radix, MUI, Floating UI…) render popovers into an absolutely-positioned portal appended to<body>— typically inside a zero-height positioned wrapper. Neither observed border-box changes, so no measurement is ever scheduled.documentElement.getBoundingClientRect().heightunder a transientheight: max-content— which excludes out-of-flow content. An absolutely-positioned dropdown extending past the in-flow content does not contribute, so the reported height is unchanged anyway. (fix(app): autoResize collapses height:100% layouts; expose autoResize in useApp #619's proposedbody.scrollHeightmeasure would fix this half, but not gap 1.)Repro
Any React app embedded via the SDK:
Click the input → calendar opens in a portal, extends ~300px past the content → no
size-changednotification → host iframe clips the calendar. Verified against a host that resizes the iframe to every reported height (our wire-contract harness drivesAppBridgedirectly).Workaround we ship
A
MutationObserveronbodyfunnelled through the public API:scrollHeightincludes the out-of-flow portal; the MutationObserver supplies the missing trigger.Suggested fix
In
setupSizeChangedNotifications, add a (debounced)MutationObserveronbodyalongside the existingResizeObserver, and measure withMath.max(body.scrollHeight, documentElement.scrollHeight)(compatible with the direction #619 proposes) so out-of-flow portals are both detected and measured.Related: #502 (height-management umbrella), #619 (measurement strategy), #567 (auto-resize side effects).