Hi guys, sorry in advance if this isn’t the correct category.
The issue is, I need to embed a report into a page that has a certain specific design, to achieve that I need the iframe to have the height of the content, by consequence, without a scroll bar.
Since CrossDomain forbids me to access the height attributes of the internal document, is there any way to achieve this ?
I found out that Sigma has an event/message that’s sent to the parent document called workbook:pageheight:onchange which isn’t helpful since it returns me the size of the Iframe itself, not the content size.
I’m not sure about editing the Iframe in particular. Hopefully, someone else can add to this thread!
You can sort of control the size of the page through the workbook settings (bottom left of the screen in edit mode). You could also try adding a parameter that forces the user to choose if they want to see items 1-10,11-20, etc to act like a scroll bar.
For embedding within an iFrame we’re actually adding a new URL parameter to make workbook:pageheight:onchange give the expected value that you want. We’re currently in the process of adding an option via the URL Parameters which you can add to the Sigma URL
We’re also open to thoughts on what the name of it should be. (It’s currently named :emitHeight if you want to try it out adding :emitHeight=true into the URL but this might be subject to change real soon! So test it out but don’t use this yet! We will update you as soon as possible about what the name will be changed to.) Also let us know if this flag helped!
Edit: We updated this to be called :responsive_height and made it so that workbook:pageheight:onchange doesn’t activate until after adding :responsive_height=true
Using the :emitHeight=true flag when generating the link resulted in exactly what I was looking for.
I noticed that there’s an element inside the embedded frame id=dashboard-layout-id that causes a scrollbar to happen even tho now the content fits perfectly.
With a CSS trick is easy to hide that, but is there any way to control those styles from the application side ?
About the naming, this looks great to me, or maybe emit_height to keep it like the other parameters.
Ah good call out for the snake_case. We’ll update it to emit_height soon. We’ll fix up the scrollbar to not show up. Thanks for catching that! Will keep you updated when those changes are deployed!
@hjfigueira We just released the change with the scrollbar fix! We decided to update this to be called :responsive_height instead it does affect the way the container accounts for the content heights. (one of the reason why the changes need to be opt in). Let us know if you have encounter any issues!