Skip to content

Inline extensions: the frame never shrinks below its start height because the shell measures a body with min-height 100% #4664

Description

@efernandezr

Inline extensions: the frame never shrinks below its start height because the shell measures a body with min-height: 100%

Version: @agent-native/core 0.176.4.

What happens. A transient render-inline-extension control with one row of buttons renders inside a frame 260 pixels tall (the initialHeight default). The frame grows when content is taller but never shrinks to fit shorter content.

Why. dist/extensions/html-shell.js reports Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) on resize, and the shell's own stylesheet (dist/client/extensions/portable-extension.js) sets html, body { min-height: 100% }. The document is therefore always at least as tall as the iframe viewport, so the reported height is never smaller than the current height, and InlineExtensionFrame (which honours reports down to 96 pixels) never receives a smaller value.

Expected. Measure the content, not the viewport: drop min-height: 100% from the shell body, or report the height of a content wrapper element, so a one-row control renders at its natural height plus padding.

Workaround used. Every control passes initialHeight: 120 (the schema floor) so the frame starts small and only grows.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions