Make height of Forge macro app dynamic based on Custom UI height

Hi! How do I make the height of my confluence Forge macro app take the height of the custom UI app that was added to it? At the moment I am using the viewportSize: (‘small’,‘medium’,‘large’or‘xlarge’) but it is really static because it can be either too small or too large. I want something more dynamic that is based on the size of the custom UI app I have added to the forge app.

3 Likes

Yeah, I don’t think this is possible at the moment. We’d also love to be able to do something AP.resize() can do in Connect.

Cheers,
Sven

7 Likes

This is a blocker for us too.

We’re experimenting with porting one of our Connect apps, which is typically the only thing on a page.

In Connect, the iframe automatically resizes to fit the rendered macro content.

The fixed viewportSize options are not useful in our case.

We would be unable to move to Forge without some way of having the iframe resize like Connect does.

1 Like

Same here. Iframe resizing on demand is critical for virtually everything we want to do with Forge.

If Atlassian added metrics to AP.resize() to see just how many times it gets called, they would easily get an idea of what a deal breaker it is.

A lot of people cannot move forward in migrating to Forge without this basic functionality.

Hey all,

here [FRGE-259] Dynamically change the Jira Issue panel size based on the content size in Custom UI - Ecosystem Jira is one ticket in Review. I dont know if its somewhere else too :slight_smile:

1 Like

It looks like dynamic height just got fixed for forge/jira: https://ecosystem.atlassian.net/browse/FRGE-259?focusedCommentId=643902

simply deploy your app with the latest version of the CLI and omit viewportSize from your module in your manifest to enable automatic resizing.

Automatic resizing will also be coming to Confluence soon.

Just waiting on the Confluence fix too.

5 Likes

I just tested in on the confluence panel. It works just remove the viewport size from the manifest.yaml modules => macros => viewportSize

It automatically changes size to wrap the children and there is no scroll bar.