Updated drag-and-drop in the Wipple Playground

An early preview of the updated drag-and-drop functionality in the Wipple Playground.

Wipple


I’m working on a new version of the Wipple Playground in Svelte, and not only is it much faster, but I also had the opportunity to rework the drag-and-drop implementation for commands like repeat that “wrap” other code.

Currently, the default behavior for repeat is to wrap the entire program, which can be annoying if you only want to repeat a portion. If you select the portion with your mouse before dragging, repeat will only wrap that selection, but this mechanism isn’t very discoverable.

In the new implementation, repeat wraps from the cursor down, scanning until it finds a closing brace or the end of the file:

Screen recording of drag-and-drop in the Wipple Playground

In addition, drag and drop no longer requires holding down the mouse. If you click and release quickly, the command will “stick” until you click again. I can’t demonstrate it over video, but it works similarly to menus in macOS and iOS.

Wipple remains a fundamentally text-based language, and you can always write code with your mouse and your keyboard interchangeably.