cncf / cncf.io

☁️♮🏛🚧 The CNCF.io WordPress website
https://cncf.io
MIT License
80 stars 37 forks source link

Landscape block improvements #852

Closed thetwopct closed 1 month ago

thetwopct commented 1 month ago

It seems we are loading the iFrame Resizer script twice

Screenshot-2024-05-13 --17 02 14

It's likely we no longer need to load the iFrame Resizer in our Landscape block. This could mean we no longer need the "landscape" block as we could just use regular iFrame block.

In our version of the file we are also loading a .map file that does not exist. If we keep this file then we should remove the link to the map.

https://www.cncf.io/wp-content/mu-plugins/wp-mu-plugins/lf-blocks/src/landscape/scripts/iframeResizer.min.js?ver=1715526316

Lets discuss and decide on next course of action

cjyabraham commented 1 month ago

I looked into this and it appears the two files you're pointing out are actually different files: iframeSizer.contentWindow.min.js is being correctly loaded on the content page and iframeSizer.min.js is being correctly loaded on the parent page.

Also, isn't the reference to the .map file commented out in iframeSizer.min.js? I don't see an attempt to load it anywhere?

cjyabraham commented 1 month ago

I don't see any action needed here but please reopen if my assessment is incorrect.

thetwopct commented 1 month ago

https://www.cncf.io/about/members/ production site

Screenshot-2024-05-17 --16 35 13

cjyabraham commented 1 month ago

Interesting. I can duplicate what you are seeing in Safari but not Chrome or FF.

When I search our code, however, I only find a reference to that map file here but it's commented out. Could it be that Safari is trying to be helpful by loading a non-existent map file?