Earlier quoted context omitted.
Probably Bret Victor - "Inventing on Principle" (2012) - https://www.youtube.com/watch?v=PUv66718DII
Bret Victor is our idol! I didn't even have to click the video to know exactly which one you were talking about :)
Utopia, a visual design tool for React, with code as the source of truth
161–170 of 175 posts
Re: Utopia, a visual design tool for React, with code as the source of truth
#162The critical piece almost all current-gen UI editing tools are missing is that there needs to be a sync between changes in the code and changes in the design. John Otander and Chris Biscardi built a complex system based on Babel to manage syncing visual changes to the code.
I wonder how Utopia solved this! How do you "move" the visual changes made in the editor to the code?
Re: Utopia, a visual design tool for React, with code as the source of truth
#163How does it detect source element when hovered on preview? Preview would have a dynamic ID that maps to the source JSX.
At the very high level, yeah that's pretty much what's happening. We generate IDs that we map to each of the elements statically and that we inject into the DOM so that we can capture metadata about the element. We're currently writing an in-depth explanation of how this all works, which will be uploaded on our blog in the very near future.
Re: Utopia, a visual design tool for React, with code as the source of truth
#164Also worth looking at some of what was possible back in 2008 (and was sidetracked for unrelated reasons) - it's great to see these ideas coming back in a viable way https://www.youtube.com/watch?v=ouzAPLaFO7I [280 North Atlas]
I've only skimmed the video but it looks like your philosophy was a bit different, in that you were pursuing a visual programming / no-code approach?
- Objective-J (JavaScript equivalent of Objective-C)
- Cappuccino (Objective-J equivalent of Cocoa, from what I remember)
- Atlas (equivalent of InterfaceBuilder)
- Slides (equivalent of Keynote)
The UI builder serialized to the nib equivalent so code wasn't the source of truth, but it was definitely not a no-code approach (code methods were exposed in their GUI builder, and you could consume the nib artifact from your code).Re: Utopia, a visual design tool for React, with code as the source of truth
#165So, say I were to attempt to swap out React for Vue 3, how difficult would it be? How tightly coupled is React?
At the moment, it's coupled but not tightly so: we rely on the TS compiler to do the heavy lifting re: mapping design to code. The code that does that is of course React-specific, and we make somewhat implicit assumptions in other places. We do want to make sure we support React well before we expand out to other systems, but if you're technically minded and want to help explore this, would love to talk more!
Re: Utopia, a visual design tool for React, with code as the source of truth
#166Is Vue support in the works? Or maybe even react native?
Re: Utopia, a visual design tool for React, with code as the source of truth
#167What I really want is a way to sync back changes made in the inspector to my css-in-js code. Does Chrome offer hooks that a library could use to accomplish this?
If you're referring to the Chrome devtools inspector - unfortunately, that's a no. To start with, no such hooks are available. Additionally, the truly hard bit is figuring out what code the resulting HTML maps to, especially when there's lists, conditional content, and nested components involved.
Re: Utopia, a visual design tool for React, with code as the source of truth
#168Re: Utopia, a visual design tool for React, with code as the source of truth
#169Re: Utopia, a visual design tool for React, with code as the source of truth
#170Pretty cool, congratulations. Any plans to support Vue in the future?
We've had a lot of requests for Vue. It's not going to be a walk in the park, and we want to make sure we support React well before we add more surface area. But we're not super tightly coupled to React, so (hello, Dunning-Kruger) it shouldn't be impossible! If you're technically minded & want to have a chat about helping us explore that, would love to chat more!