odoo/odoo#170438

Created by fw-bot
Merged at bda8c39c984d0bf531425db3485985009194194e

Statuses:

label
odoo-dev:master-16.0-fix-facebook-dynamic-content-not-responsive-paru-d5oc-fw
head
40031ca948fd54bbe0cabcdab8e611b9d956451d
merged
1 year ago by Website, Rudra Patel (paru)
odoo/odoo
16.0 #163739
saas-16.3 #170127
17.0 #170292
saas-17.1 #170374
saas-17.2 #170397
saas-17.3 #170412
saas-17.4
18.0
saas-18.1
saas-18.2
saas-18.3
master #170438

[FW][FIX] website: make facebook snippet dynamically responsive

This PR aims to fix an issue with the Facebook snippet not being dynamically responsive for mobile views.

Steps to reproduce
1. Drop inner content facebook (dynamic content) anywhere
2. Go to mobile view
3. Try to scroll horizontally.

As you can see, facebook iframe is overflowing

Before v16, the mechanism for mobile view was different. The switch between mobile and desktop views caused snippets/pages to be re-render because a new dialog for mobile was opened every time. Starting from version 16, we have removed the dialog and introduced a mobile frame. As a result, the rendering now occurs only when the start function is called. Consequently, the params width does not change when we switch to mobile view.

2024-04-29_14-34

After this PR, the snippet will be re-render every time the window resizes, ensuring that the width adjustment is responsive. This enhancement also allows parameters to be provided at the time of rendering.

2024-04-29_14-35

task-2736174

Forward-Port-Of: #170292
Forward-Port-Of: #163739