I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects

Console: Fix iframe size issues

Merged zzz requested to merge zzz/i2p.i2p:iframe into master

for the four iframe-able apps, by switching to Iframe-resizer as used/recommended by i2p+ This is a two-part solution. Both parent and child have a js file. Child js is inactive unless iframed and activated by parent.

This will also be used in susimail html iframe to follow.

We leave old iframed.js active as a backup.

Source: https://github.com/davidjbradshaw/iframe-resizer Iframe-resizer 4.3.9: Copyright (c) 2013-2023 David J. Bradshaw License: MIT See licenses/LICENSE-Iframe-resizer.txt

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • zzz changed milestone to %2.5.0

    changed milestone to %2.5.0

  • zzz added console label

    added console label

  • zzz requested review from @idk

    requested review from @idk

  • zzz assigned to @zzz

    assigned to @zzz

  • Owner

    This one's going to take a little more time and a little more computer for me to review and test, I want to look at the 2 side-by-side. Will get back to you by the end of the week.

  • Author Maintainer

    Details:

    The existing simple js iframe resizer added by str4d 10 years ago has severe limitations on accurately calculating the actual size of the iframe. Still, it works for the sidebar and the 4 iframable apps (i2ptunnel, susidns, susimail, i2psnark). Note that the first two are iframed by default and the last two are not unless the 'embed email and torrent apps' option is enabled on /configui.

    Your addition of js open/close sections on the i2ptunnel edit page a couple years ago revealed the limitations of the current resizer, and it looks like you've tried to fix it in the past, but it's not fixable.

    See the docs for the new resizer (link in OP) for why simple solutions don't work, and how it's done. The new resizer is used by and recommended by plus. You can also clone that repo and try the demo in there.

    This MR has only modest benefit, and only for i2ptunnel. However, an upcoming MR will add support for displaying HTML email to susimail, and it's going to be in an iframe. Testing revealed that the current iframe resizer is woefully insufficient to handle the wide variety of HTML emails out there. That's how I started researching alternatives, and plus pointed me to this new solution.

    So the upcoming HTML email MR depends on this one.

  • Owner

    OK I've finally had time to test it myself, and I understand the purpose of it. LGTM, please merge when you're ready.

  • idk approved this merge request

    approved this merge request

  • zzz merged

    merged

  • zzz mentioned in commit fc8cdfc7

    mentioned in commit fc8cdfc7

  • zzz mentioned in merge request !177 (merged)

    mentioned in merge request !177 (merged)

Please register or sign in to reply
Loading