Open Irev-Dev opened 4 months ago
I've created a flow for how this could work in our Sketch Mode Figma page
The important step in the flow is here:
It shows the code pane with an overlay that prevents editing outside of the current sketch, with a little confirm/cancel button group that mirrors the new confirm/cancel button group below the toolbar in the far right. Both of these button groups do the same thing, maintaining our goal of mirrored behavior between code and point-and-click editing. The principle here is that modeling "tools" as we define them–XState nested states, which can be equipped and unequipped—also have the right to isolate parts of the AST for editing.
When your in sketch mode, we do partial executions of just the pipe that makes up the sketch, so it doesn't make sense to let users to edit everything, we might want to introduce the editable sections that we had in the litterbox codeMirror instance.