Skip to content

Conversation

@stephanegigandet
Copy link
Contributor

Some content pages contain code that was copy pasted from generated equalizer code with fixed heights, removing it.

Fixes openfoodfacts/openfoodfacts-server#12345

@github-project-automation github-project-automation bot moved this from To Discuss & Validate to In Progress in 📢 Open Food Facts Marketing Sep 16, 2025
@github-project-automation github-project-automation bot moved this from Todo to In Progress in 🚦Nutri-Score Sep 16, 2025
@github-project-automation github-project-automation bot moved this from To Discuss & Validate to Todo in Ultra-processed foods - NOVA Sep 16, 2025
@teolemon
Copy link
Member

@heymitali added that for Explorer because we litteraly had the same issue as Product Opener.

cc @VaiTon

Comment on lines -244 to -266
<script>
function onMount(fn) {
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", fn);
} else {
fn();
}
}

onMount(() => {
function sendHeight() {
const height = document.body.scrollHeight;
console.debug("Calculated height: " + height);
if (typeof parent !== 'undefined' && parent !== window) {
parent.postMessage({ frameHeight: height }, '*');
}
}
// Send the height on initial load
sendHeight();
// Send the height whenever the window is resized
window.addEventListener("resize", sendHeight);
});
</script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this for Explorer :)

Comment on lines -244 to -266
<script>
function onMount(fn) {
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", fn);
} else {
fn();
}
}

onMount(() => {
function sendHeight() {
const height = document.body.scrollHeight;
console.debug("Calculated height: " + height);
if (typeof parent !== 'undefined' && parent !== window) {
parent.postMessage({ frameHeight: height }, '*');
}
}
// Send the height on initial load
sendHeight();
// Send the height whenever the window is resized
window.addEventListener("resize", sendHeight);
});
</script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@hangy hangy self-requested a review September 16, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo
Status: In Progress
Status: In Progress

Development

Successfully merging this pull request may close these issues.

Bottom banners hide some content

5 participants