Preview positions are miscalculated for code components

Created on 23 February 2025, 14 days ago

Overview

When code components are added to content, the dimensions of their preview are not always calculated properly. As a result, they can't be selected, and displaying the component overlay for other components can be misaligned by not taking code components into account, resulting in misplaced annotations.

Proposed resolution

Update the logic in ui/src/hooks/useSyncPreviewElementSize.ts to handle code components. They are rendered in Astro islands, where the component code gets hydrated and rendered client-side. Currently, calculating their dimensions usually — not always — happens before the component output is rendered.

🐛 Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

🇳🇱Netherlands balintbrews Amsterdam, NL

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024