+1
I have been meaning to post about this EXACT same issue I’ve run into with a custom widget that I’m developing. I have figured out how to reduce the height, but it’s kind of a two-part solution, at least if you are loading the widget from a host that is different from where you’re loading Grist (due to cross-origin browser policies).
I found I can adjust the height of the widget container by doing the following (in case you ARE loading Grist + widget from the same domain):
- Find the DIV that contains the IFRAME of the widget; set the CSS
height
andmin-height
to your desired height in pixels. You may need the!important
on there as well. - Set the height of the
body
tag within your Widget as well – i.e,. within the ‘document’ that is within theiframe
tag that is created when you add a custom widget. If the Grist page and the Widget are on the same domain, you can do all of this dynamically from within your widget. Otherwise, you have to do the part outside of the iframe from a custom.css in Grist, and the “inside” part you can do from your widget, which is super hacky.
IMO, the right long-term solution here is to set a smaller default value for widgets – or AT LEAST for custom widgets.
In my case, I’m working on a simple widget to show content (Markdown or HTML) which can be easily edited inline, and I also want to be able to have a ‘thin’ widget - e.g., a heading, which is not currently possible.