easyblockshq / easyblocks

The open-source visual builder framework.
https://easyblocks.io
GNU Affero General Public License v3.0
241 stars 33 forks source link

Bug: iFrame can sometimes be underneath the sidebar #52

Closed timoconnellaus closed 1 month ago

timoconnellaus commented 1 month ago

This happens when you switch from isEditing false to true. The sidebar appears and can sometimes overlap the canvas.

This triggers a rerender of the viewport after changing editing state so the canvas will fit correctly

vercel[bot] commented 1 month ago

@timoconnellaus is attempting to deploy a commit to the Shopstory Team on Vercel.

A member of the Team first needs to authorize it.

r00dY commented 1 month ago

Can you please provide an info how to reproduce it? The EditorContent has isEditing state variable so it should re-render anyway.

timoconnellaus commented 1 month ago

To replicate:

  1. Open the editor
  2. Use desktop size
  3. Resize browser so that the canvas has no space on the left and right (touching the edges)
  4. switch edit mode off then back on again
  5. The canvas should now be behind the sidebar
  6. You should now need to resize the browser window to trigger the canvas to reset to not be behind the

Note that this is more prominent with the PR #53 because it appears above the left sidebar (not below like the right sidebar)

r00dY commented 1 month ago

will check this out on Monday

r00dY commented 1 month ago

I made it so that there's only one re-renderer here: #55. Thoughts?

timoconnellaus commented 1 month ago

You're the expert @r00dY. Looks good to me!

r00dY commented 1 month ago

Implemented and merged here: https://github.com/easyblockshq/easyblocks/pull/55