Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] website: make facebook snippet dynamically responsive #163739

Draft
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

paru-odoo
Copy link

@paru-odoo paru-odoo commented Apr 29, 2024

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

@robodoo
Copy link
Contributor

robodoo commented Apr 29, 2024

Pull request status dashboard.

@C3POdoo C3POdoo added the RD research & development, internal work label Apr 29, 2024
@paru-odoo paru-odoo force-pushed the 16.0-fix-facebook-dynamic-content-not-responsive-paru branch from 410601c to 5b9ab98 Compare April 30, 2024 11:55
@msh-odoo msh-odoo force-pushed the 16.0-fix-facebook-dynamic-content-not-responsive-paru branch from 54fbd28 to 9a53419 Compare June 5, 2024 11:09
Step 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 rerendered
because a new dialog for the 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.

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

Task-2736174
@msh-odoo msh-odoo force-pushed the 16.0-fix-facebook-dynamic-content-not-responsive-paru branch from 9a53419 to 6fc0600 Compare June 5, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants