Overview

I worked on a demo last Friday and realized that occasionally (e.g., after drag and dropping components), the annotations are misplaced relative to the preview. Unfortunately, I don't have consistent steps to reproduce this. After zooming in / out, the annotations get realigned. Here's how this looks like:

Proposed resolution

User interface changes

Steps to reproduce

See video attached here
You may need to play with it a little bit but I've reproduced it by:

1. Adding a 2 column with a hero in each slot and an image component.
2. Adding and removing elements from the 2 column component slots. In between putting and removing things into slots, zoom in and out. At the zoom change, the overlay seems to get misplaced somewhat consistently.
3. Changing the two column column width sometimes. (may be possible to reproduce without doing this? unsure.)

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lauriii created an issue. See original summary.

lauriii’s picture

Issue summary: View changes
jessebaker’s picture

jessebaker’s picture

Assigned: Unassigned » jessebaker

I've not got any further in providing steps to reproduce this, but it did happen to me just now and I was able to deduce that the issue is occuring in ui/src/features/layout/previewOverlay/ViewportOverlay.tsx. It seems that updateRect() is either not being called, or being called and failing to correctly update the rect.

I've raised an MR that I hope will be more reliable, but it's hard to be sure given I'm not sure the exact sequence of events that cause the issue.

jessebaker’s picture

Assigned: jessebaker » Unassigned
Status: Active » Needs review
hooroomoo’s picture

Status: Needs review » Needs work
StatusFileSize
new7.39 MB

I was able to reproduce the problem on the MR. Attached video

hooroomoo’s picture

Issue summary: View changes
Issue tags: -Needs steps to reproduce

Updated issue summary with the steps i used to reproduce.

hooroomoo’s picture

Issue summary: View changes
StatusFileSize
new6.31 MB

Replacing with audio-free video

hooroomoo’s picture

Issue summary: View changes
hooroomoo’s picture

Issue summary: View changes
lauriii’s picture

Priority: Normal » Major
StatusFileSize
new1.79 MB

I was recording some demos of XB yesterday and was running into this fairly consistently when placing sections.

jessebaker’s picture

Assigned: Unassigned » hooroomoo
Status: Needs work » Needs review
Issue tags: +stable blocker

Hey @hooroomoo - could you please re-test.

1) I think the fix in the MR is still valuable
2) since this was last tested we introduced mutation observers elsewhere that have made the overlay generally more robust.

I don't seem to be able to reproduce the issue any more.

hooroomoo’s picture

Tested manually and I also can't reproduce the issue anymore :D

  • hooroomoo committed e42289c7 on 0.x authored by jessebaker
    Issue #3484140 by jessebaker, hooroomoo, lauriii: Overlay / annotations...
hooroomoo’s picture

Assigned: hooroomoo » Unassigned
Status: Needs review » Fixed
Issue tags: -stable blocker

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.