-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New canvas bridge implementation #1550
Conversation
@bytasv In this PR I'm also reducing the amount of flicker when loading/switching pages. The simplified init logic makes this a lot more straightforward. There are now only two loading states:
|
Great job, I think the experience is much better now. One thing that I noticed now - we use white background when loading, but the canvas is gray, which creates a bigger "flickering" effect. Maybe it would be worth to consider using same gray for loading screen too so there is "less change". |
It feels sensible to me to keep the themes separate for now. I'd like to concentrate rather of getting rid of the second loading state.
That's exactly how this works now, there is no other way to overcome the flicker in iframe loading between when navigation has started and the onload event.
Not at all, the MUI Fade component makes this trivial to implement. |
Trying to set up a system where the editor can run expressions inside of the canvas. The goal of which is to improve debuggability of bindings. Running the watch expressions in the actual execution engine allows us to attach information about the page state it's depending on.
This PR aims to simplify the bridge that communicates between the editor and canvas by just having a single instance in the module scope of the page. It's always there, so it can be reached immediately on iframe
onload
. It also make the bridge more expressive and allow two-way communication by separating events and commands both in the direction of the editor and the direction of the canvas.The init workflow is:
ready
event, it will also make ready state available synchronously throughisReady()
.We keep the bridge a stable object during the full lifetime of a page. For this I introduced a new primitive
Commands
.