Plugin SDK: host should sync root font size

The Dato main interface modifies its root font size (14.4px, 15px, 16px) at different breakpoints, however plugin iframes are always set to 16px. This causes plugin UI to often appear out of sync (larger) compared to similar elements in the native UI. This cannot be robustly addressed within the plugin.

The SDK should set the prevailing native interface root font size on the iframe documentElement, and update it with breakpoints.

Iโ€™m going to reclassify this as a bug instead and report it for you. Good catch and thank you!

Awesome. Will you post when itโ€™s resolved? Then I can remove the hacky code from my plugins that accommodates for this!

Yes, absolutely will update here when itโ€™s fixed :slight_smile:

Just adding to this bug report with a further behaviour I noticed.

When resizing a record editor across 1024px, all plugin iframes reload.

Crossing (max-width: 1024px) switches the editor layout and relocates its portal container. This temporarily removes the plugin iframe subtree from the document. Chrome reports frameDetached with reason remove, followed by new frames being attached.

This creates a minor disruption during a breakpoint change. Thatโ€™s not a common occurrence for editors anyway, so this is a really minor point.

I thought it is only worth mentioning as it feels related to the same issue as the font-size not being updated through to the plugin surface during breakpoint changes.

Got it. Thank you @convincible!

I apologize for the delay here โ€” this was my fault, I got assigned to work on this but I was partially sick over the last few weeks.

Iโ€™ll try to work on all of these plugins-sdk issues together: