Refactor ComponentOverlay.tsx to use HTML comments annotations to find components in the preview

Created on 8 November 2024, 3 months ago

Overview

Building on the work in 📌 Add HTML comments to twig output to attempt to allow in-place editing Active to wrap each component in a pair of HTML comments, the work to update the React app to use those annotations can begin.

Proposed resolution

To start with, removing the injected <div class="xb--sortable-item" data-xb-uuid="%s" data-xb-component-id="%s"> tags wrapping each component will mean the preview is immediately more accurate to the final rendered page.

Once that is done, the overlay for each component rendered by ComponentOverlay.tsx needs to be based on the new prefixed/suffixed comments. In doing this, support for SDC's that have more than 1 top level element.

User interface changes

📌 Task
Status

Active

Version

0.0

Component

Page builder

Created by

🇬🇧United Kingdom jessebaker

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

Comments & Activities

Production build 0.71.5 2024