openpanel icon indicating copy to clipboard operation
openpanel copied to clipboard

[Feature Request] Adopt Plausible's iframe height setting mechanism

Open keiwanmosaddegh opened this issue 1 month ago • 4 comments

What

When embedding a Plausible Dashboard one is given a script tag that sets the height of the iframe automatically. Plausible is emitting an event with the height data that is listened to and applied to the Plausible iframe.

Adding the same to OpenPanel is a great way to improve the quality of life of embeddings.

keiwanmosaddegh avatar Nov 02 '25 10:11 keiwanmosaddegh

Sure, sounds like a good idea. Please provide me with code sample and I can do that

lindesvard avatar Nov 03 '25 12:11 lindesvard

I dug in the Plausible codebase and found this:

https://github.com/plausible/analytics/blob/master/assets/js/embed.host.js

keiwanmosaddegh avatar Nov 03 '25 14:11 keiwanmosaddegh

I got this working but radix modals screws me a bit, since they are miss-placed (centered of the content height) and you cannot scroll (since radix disables scroll). Not really sure how to get around this now.

https://github.com/user-attachments/assets/2b590d8d-c738-4363-8954-5e804d463d12

You have a branch up if you want to play around with it or if you have any solutions I would love to hear them.

IF ANYONE WANT TO CONTRIBUTE, HERE IS A GREAT FIRST ISSUE

lindesvard avatar Nov 10 '25 19:11 lindesvard

Oh, that looks neat - well done @lindesvard ! Might have some time later this week to look into this, thanks!

keiwanmosaddegh avatar Nov 10 '25 19:11 keiwanmosaddegh

@keiwanmosaddegh if you have time for this I would very happy 🙏

lindesvard avatar Dec 02 '25 21:12 lindesvard