https://kotlinlang.org logo
Title
f

Fedor Ryzhenkov

04/12/2023, 12:09 PM
Is there any way to replicate what figma relay does for jetpack if I’m using desktop-compose?
m

mikehearn

04/12/2023, 3:14 PM
There is a dirty, dirty but wonderful hack I've been experimenting with to get a visual layout designer for CfD
I suspect you won't like it though - it turns out that GPT4 can convert FXML to Jetpack Compose code pretty well. So I design a layout in JavaFX Scene Builder, convert it with AI, and now I have the same layout in code. Watch out though. GPT3 is not quite as good and will miss some details or get it wrong.
o

orangy

04/12/2023, 3:16 PM
I think the question is specifically about Relay (https://relay.material.io/) and how to use it for desktop flavor of Compose.
m

mikehearn

04/12/2023, 3:18 PM
Yes but it doesn't work with regular IntelliJ I think. So unless the question is how to hack around that, alternatives are needed.
o

orangy

04/12/2023, 3:20 PM
I suspect the problem is somewhere around gradle plugin. Looks like Figma and IJ parts work fine, but build magic fails. Likely it assumes android source sets or something. Couldn’t find source for it either
But yeah, dirty GPT hack is a nice one :)
j

jim

04/12/2023, 5:21 PM
@Fedor Ryzhenkov If you want Relay to support multiplatform, I would recommend filing a Relay feedback here: https://goo.gle/relay-feedback
That will go directly to the Relay team and they can use that as signal as to what users are requesting.