Explicitly Set Window Size for CardService.newOpenLink().setOpenAs(CardService.OpenAs.OVERLAY)?

130 views
Skip to first unread message

Avana Vana

unread,
Aug 3, 2023, 10:41:40 AM8/3/23
to Google Apps Script Community
Hi,

I am opening a few popups using CardService.newOpenLink().setOpenAs(CardService.OpenAs.OVERLAY), the content of which is generated by HTMLService and doGet() and served along with the Add-on itself.

However, the "overlay" windows that open up are a bit small and I would like to be able to explicitly set their size, just like with the window.open() function in Javascript.

Is there a way to control the size of these overlay popups?

Best,
Avana

Bruce Mcpherson

unread,
Aug 3, 2023, 11:59:36 AM8/3/23
to google-apps-sc...@googlegroups.com
At the moment there doesn't seem to be a way to control either the size or the placement.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/01ba636a-5f99-4c07-8ad6-8ed7a0d275e8n%40googlegroups.com.

Avana Vana

unread,
Aug 3, 2023, 12:51:51 PM8/3/23
to Google Apps Script Community
This is a major drawback.  It seems so trivial to implement (e.g CardService.newOpenLink().setHeight(600).setWidth(800).setOpenAs(... ) yet such crucial functionality.

The default overlay windows are tiny and it's exceedingly difficult to cram UI into such a tiny frame.

Bruce Mcpherson

unread,
Aug 3, 2023, 12:56:38 PM8/3/23
to google-apps-sc...@googlegroups.com
Indeed. It's especially a problem when you implement a file picker popup. You can file a feature request at the Apps Script issue tracker (there may already be one open).


Reply all
Reply to author
Forward
0 new messages