You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Problem:**
Followup to #6326
In a Remix project it can happen that in the dispatch flow we don't have
the results of the rendering in the dom yet. It can even happen, that
after a build error is fixed, we still don't have the canvas root
container in the dom.
That is a critical issue, because we attach the mutation/resize
observers to the canvas root container element, so when we don't have
that we can subscribe them, so the dom sample is not going to run when
the rendering is finished.
**Fix:**
I needed an element, which is an ancestor of the canvas root container
and
1 is always rendered
2 does not contain canvas controls or other content
I choose canvas-container-outer, but I needed to modify its ancestors so
it is always rendered, even when there is a build error.
To make sure we don't observe unnecessary elements, I filtered the query
for the resize observer to only include elements with the `data-uid`
attribute.
I needed to update the tests to make sure the observers from the
previous domwalkermutablestate don't continue to fire when there is a
change, because the outer canvas container can stay persistent between
test runs.
**Manual Tests:**
I hereby swear that:
- [x] I opened a hydrogen project and it loaded
- [x] I could navigate to various routes in Preview mode
Fixes#6345
No description provided.
The text was updated successfully, but these errors were encountered: