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

Prevent re-render of preview overlay when there are no changes #3096

Merged

Conversation

jamesricky
Copy link
Contributor

@jamesricky jamesricky commented Jan 13, 2025

Description

When an input is rendered, it's name and type attributes change from null to their actual value.
This triggers a re-calculation of the preview overlays, due to #2682.
The re-calculation then causes a re-render of the site-content, which causes an infinite loop.
This is prevented by preventing a re-render when no values of IFrameBridgeContext are changed.

This issue does not seem to occur with other elements, such as textarea or select.

Acceptance criteria

Open TODOs/questions

  • Add changeset

Further information

@jamesricky jamesricky force-pushed the fix-infinite-rerenders-of-preview-overlay-with-input-2 branch from b795f1a to a5b6b5b Compare January 13, 2025 12:10
@jamesricky jamesricky marked this pull request as ready for review January 13, 2025 12:11
@auto-assign auto-assign bot requested a review from johnnyomair January 13, 2025 12:11
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Co-authored-by: Johannes Obermair <[email protected]>
@johnnyomair johnnyomair merged commit e92e6df into main Jan 21, 2025
11 checks passed
@johnnyomair johnnyomair deleted the fix-infinite-rerenders-of-preview-overlay-with-input-2 branch January 21, 2025 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants